main.js 616 B

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