【发布时间】:2017-02-12 17:53:16
【问题描述】:
使用 vuejs 1 的代码是:
const App = Vue.extend(Index);
router.start(App, '#app');
Index 是一个组件。
我尝试像这样将其转换为 vue 2:
const App = Vue.extend(Index);
const app = new App(router).$mount('#app');
但这给出了[Vue warn]: Error when rendering root instance。
重写这个的正确方法是什么?
谢谢
【问题讨论】:
标签: vue.js vuejs2 vue-router vue-loader