main.js
let vm = new Vue({
router,
store,
render: (h) => h(App),
}).$mount('#app');
export default vm;
公共js
import Vue from '@/main.js';
此刻的Vue就是this
let vm = new Vue({
router,
store,
render: (h) => h(App),
}).$mount('#app');
export default vm;
import Vue from '@/main.js';
此刻的Vue就是this