main.js 532 B

12345678910111213141516171819202122232425262728
  1. import App from './App'
  2. import uView from '@/uni_modules/uview-ui'
  3. import store from './store' // store
  4. import plugins from './plugins' // plugins
  5. import Vue from 'vue'
  6. Vue.use(plugins)
  7. Vue.use(uView)
  8. uni.$u.config.unit = 'rpx'
  9. Vue.config.productionTip = false
  10. Vue.prototype.$store = store
  11. // #ifndef VUE3
  12. App.mpType = 'app'
  13. const app = new Vue({
  14. ...App
  15. })
  16. app.$mount()
  17. // #endif
  18. // #ifdef VUE3
  19. import { createSSRApp } from 'vue'
  20. export function createApp() {
  21. const app = createSSRApp(App)
  22. return {
  23. app
  24. }
  25. }
  26. // #endif