创建实例
- 主入口 main.ts 中
Vue3: creatApp()
import App from './App.vue';
import { createApp } from 'vue';
import { router } from './router';
const app = createApp(App);
app.use(router);
app.mount('#app')
Vue2: new Vue()
import App from './App.vue';
import Vue from 'vue';
import router from './router';
Vue.config.productionTip = false;
new Vue({
router,
render: h => h(App)
}).$mount('#app')