报错时这样写的:
import * as Vue from 'vue' import App from './App.vue' new Vue({ el: '#app', render: c => c(App) });
修改后:
import { createApp } from 'vue' import App from "./App" createApp(App).mount('#app');
使用createApp就正常了,为什么呢?有老铁 知道的话请解惑,感激!
报错时这样写的:
import * as Vue from 'vue' import App from './App.vue' new Vue({ el: '#app', render: c => c(App) });
修改后:
import { createApp } from 'vue' import App from "./App" createApp(App).mount('#app');
使用createApp就正常了,为什么呢?有老铁 知道的话请解惑,感激!