84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
ringa_lee
Migrate from Vue 1.x to 2.xMigrate from Vue Router 0.7.x to 2.xMigrate from Vuex 0.6.x to 1.0(2.0)
Not much change in writing style. We provide you with two writing methods, you can use them according to your situation
const router = new VueRouter({ .... }) ... // 第一种写法 const app = new Vue({ router, ...App // 扩展 }).$mount('#app') // 第二种 new Vue({ el: '#app', router, template: '<App/>', components: { App } })
In additionVue.extend is to use the basic Vue constructor to create a "subclass". The parameter is an object containing the component's options. Look at the source code and it will be clear at a glance. global-api/extend
Vue.extend
Migrate from Vue 1.x to 2.x
Migrate from Vue Router 0.7.x to 2.x
Migrate from Vuex 0.6.x to 1.0(2.0)
Not much change in writing style.
We provide you with two writing methods, you can use them according to your situation
In addition
Vue.extend
is to use the basic Vue constructor to create a "subclass". The parameter is an object containing the component's options.Look at the source code and it will be clear at a glance. global-api/extend