import App from './App'
|
|
import uniIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
|
import uniDatetimePicker from '@/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue'
|
|
// #ifndef VUE3
|
import Vue from 'vue'
|
import './uni.promisify.adaptor'
|
|
// 全局注册 vform 组件
|
Vue.component('uni-icons', uniIcons)
|
Vue.component('uni-datetime-picker', uniDatetimePicker)
|
Vue.config.productionTip = false
|
App.mpType = 'app'
|
App.appName = 'test'
|
const app = new Vue({
|
...App
|
})
|
app.$mount()
|
// #endif
|
|
// #ifdef VUE3
|
import { createSSRApp } from 'vue'
|
export function createApp() {
|
const app = createSSRApp(App)
|
// 在 Vue3 分支全局注册 uni-icons,兜底保证组件可用
|
app.component('uni-icons', uniIcons)
|
app.component('uni-datetime-picker', uniDatetimePicker)
|
return {
|
app
|
}
|
}
|
// #endif
|