This commit is contained in:
syuilo 2018-02-23 07:50:42 +09:00
parent fc23ee8a92
commit 0162f68cce

View File

@ -87,6 +87,19 @@ export default (callback: (launch: (api: (os: MiOS) => API) => [Vue, MiOS]) => v
// アプリ基底要素マウント
document.body.innerHTML = '<div id="app"></div>';
const launch = (api: (os: MiOS) => API) => {
os.apis = api(os);
Vue.mixin({
data() {
return {
os,
api: os.api,
apis: os.apis
};
}
});
const app = new Vue({
router: new VueRouter({
mode: 'history'
@ -104,19 +117,6 @@ export default (callback: (launch: (api: (os: MiOS) => API) => [Vue, MiOS]) => v
os.app = app;
const launch = (api: (os: MiOS) => API) => {
os.apis = api(os);
Vue.mixin({
data() {
return {
os,
api: os.api,
apis: os.apis
};
}
});
// マウント
app.$mount('#app');