feat: vue3 compatible

This commit is contained in:
丁锐
2021-12-06 16:44:34 +08:00
parent ba8da67764
commit 7936bd38fc
9 changed files with 2316 additions and 161 deletions
+9 -5
View File
@@ -1,8 +1,12 @@
import Vue from 'vue'
import Vue, { createApp } from 'vue'
import App from './App.vue'
new Vue({
el: '#app',
render: (h) => h(App),
})
if (typeof createApp === 'function') {
createApp(App).mount('#app')
} else {
new Vue({
el: '#app',
render: h => h(App),
})
}