This commit is contained in:
syuilo 2018-02-28 00:30:36 +09:00
parent dbc421cb57
commit 41635ca3d3
2 changed files with 16 additions and 3 deletions

View file

@ -20,5 +20,18 @@
<script lang="ts"> <script lang="ts">
import Vue from 'vue'; import Vue from 'vue';
export default Vue.extend(); export default Vue.extend({
data() {
return {
fetching: true,
apps: []
};
},
mounted() {
(this as any).api('my/apps').then(apps => {
this.apps = apps;
this.fetching = false;
});
}
});
</script> </script>

View file

@ -84,8 +84,8 @@ export default (callback: (launch: (api?: (os: MiOS) => API) => [Vue, MiOS]) =>
// アプリ基底要素マウント // アプリ基底要素マウント
document.body.innerHTML = '<div id="app"></div>'; document.body.innerHTML = '<div id="app"></div>';
const launch = (api: (os: MiOS) => API) => { const launch = (api?: (os: MiOS) => API) => {
os.apis = api(os); os.apis = api ? api(os) : null;
Vue.mixin({ Vue.mixin({
data() { data() {