Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'onTabItemTap', //当前是 tab 页时, 点击 tab 时触发 (mpvue 0.0.16 支持)
'onPageReload'//刷新页面
])
Vue.config.productionTip = false
/* app-only-end */
if (isApp) {
// 在这个地方引入是为了registerHooks先执行
MyApp = require('./App.vue').default as IMpVue
}else {
// MyApp = require('./index.vue')
}
console.log('main.ts here !!')
const app:Vue = new Vue(MyApp)
app.$mount()
Vue.config.errorHandler = function (err) {
if (console && console.error) {
console.error(err)
}
}
/* app-only-end */
if (isApp) {
// 在这个地方引入是为了registerHooks先执行
MyApp = require('./App.vue').default as IMpVue
}else {
// MyApp = require('./index.vue')
}
const app = new Vue(MyApp)
app.$mount()
// }
// return shareObj
// }
})
}
}
// 使用插件
Vue.use(somePlugin)
// 在这个地方引入是为了registerHooks先执行
const MyApp = require('./App.vue').default as IMpVue
import mpvueToastRegistry from 'mptoast/registry'
mpvueToastRegistry(Vue)
const app = new Vue(MyApp)
app.$mount()
export default {
// 这个字段走 app.json
config: {
pages: [
// '^pages/index/main',
// '^pages/home/main',
'^pages/listRandom/main',
'pages/list/main',
'pages/details/main',
], // 页面前带有 ^ 符号的,会被编译成首页,其他页面可以选填,我们会自动把 webpack entry 里面的入口页面加进去
window: {
// navigationStyle: "custom", // window下的 navigationStyle 属性,设置为 custom 即可关闭原生头部导航,但会保留椭圆形菜单
backgroundTextStyle: 'light',
navigationBarBackgroundColor: '#fff',
private bdi( text: string ): HTMLElement {
return new Vue( {
render( createElement: CreateElement ) {
return createElement( 'bdi', text );
},
} ).$mount().$el as HTMLElement;
}
private async bootstrap(): Promise {
let options = {
el: '.main',
router: router(),
render: create => create(App)
};
return new Vue(options);
}
}
private async bootstrap(): Promise {
await this.seed();
let options = {
el: '.main',
router: router(),
render: create => create(App)
};
return new Vue(options);
}
}
private async bootstrap(): Promise {
await this.seed();
let options = {
el: '#app',
router: router(),
store,
i18n: this.translateService.i18n,
render: create => create(App)
};
return new Vue(options);
}
}
provide() {
return {
eventBus: new Vue(),
};
},
})