t-comm
Version:
专业、稳定、纯粹的工具库
20 lines (18 loc) • 407 B
JavaScript
function initApp(options, router, store) {
var app = new options.Vue({
el: '#app',
i18n: options.i18n,
router: router,
store: store,
render: function render(h) {
return h(options.App);
},
mounted: function mounted() {
if (options.prerender) {
document.dispatchEvent(new Event('render-event'));
}
}
});
window.app = app;
}
export { initApp };