zlpt_app/main.js

31 lines
572 B
JavaScript
Raw Permalink Normal View History

2023-12-12 09:14:42 +08:00
import App from './App'
2023-12-12 14:45:18 +08:00
// vuex
import store from './store'
Vue.prototype.$store = store
import sidsocket from "@/common/websocket/websocket.js"
2023-12-12 09:14:42 +08:00
// #ifndef VUE3
import Vue from 'vue'
import uView from '@/uni_modules/uview-ui'
import './uni.promisify.adaptor'
2023-12-12 14:45:18 +08:00
//websocket
Vue.prototype.$socket = sidsocket;
2023-12-12 09:14:42 +08:00
Vue.config.productionTip = false
2023-12-12 14:45:18 +08:00
Vue.use(uView)
2023-12-12 09:14:42 +08:00
App.mpType = 'app'
const app = new Vue({
2023-12-12 14:45:18 +08:00
...App
2023-12-12 09:14:42 +08:00
})
app.$mount()
// #endif
// #ifdef VUE3
2023-12-12 14:45:18 +08:00
import {
createSSRApp
} from 'vue'
2023-12-12 09:14:42 +08:00
export function createApp() {
2023-12-12 14:45:18 +08:00
const app = createSSRApp(App)
return {
app
}
2023-12-12 09:14:42 +08:00
}
// #endif