1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-14 06:38:28 +09:00
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">
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>

View File

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