siteFront/main.js
2024-11-05 10:07:40 +08:00

33 lines
832 B
JavaScript

import App from './App'
import TnIcon from '@/uni_modules/tuniaoui-vue3/components/icon/src/icon.vue'
import TnNavbar from '@/uni_modules/tuniaoui-vue3/components/navbar/src/navbar.vue'
import TnButton from '@/uni_modules/tuniaoui-vue3/components/button/src/button.vue'
import TnTitle from '@/uni_modules/tuniaoui-vue3/components/title/src/title.vue'
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
...App
})
app.$mount()
// #endif
// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
const app = createSSRApp(App)
app.component('TnIcon', TnIcon)
app.component('TnNavbar', TnNavbar)
app.component('TnButton', TnButton)
app.component('TnTitle', TnTitle)
return {
app
}
}
// #endif