main.js 594 B

12345678910111213141516171819202122232425262728293031
  1. import App from './App'
  2. import store from './store'
  3. // #ifndef VUE3
  4. import Vue from 'vue'
  5. import './uni.promisify.adaptor'
  6. import uniui from '@dcloudio/uni-ui';
  7. Vue.use(uniui);
  8. Vue.config.productionTip = false
  9. Vue.prototype.$store = store
  10. App.mpType = 'app'
  11. const app = new Vue({
  12. store,
  13. ...App
  14. })
  15. app.$mount()
  16. // #endif
  17. // #ifdef VUE3
  18. import { createSSRApp } from 'vue'
  19. import CommonTabbar from './components/commonTabbar.vue'
  20. export function createApp() {
  21. const app = createSSRApp(App)
  22. app.use(store)
  23. app.component('CommonTabbar', CommonTabbar)
  24. return {
  25. app
  26. }
  27. }
  28. // #endif