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>'; 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({ const app = new Vue({
router: new VueRouter({ router: new VueRouter({
mode: 'history' mode: 'history'
@ -104,19 +117,6 @@ export default (callback: (launch: (api: (os: MiOS) => API) => [Vue, MiOS]) => v
os.app = app; 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'); app.$mount('#app');