main.js 728 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // #ifndef VUE3
  2. import Vue from 'vue'
  3. import App from './App'
  4. import navBar from '@/components/navBar/index.vue'
  5. Vue.component('navBar', navBar)
  6. import uView from '@/uni_modules/uview-ui'
  7. Vue.use(uView)
  8. import store from 'store/index.js'
  9. Vue.prototype.$store = store
  10. // import store from "@/store";
  11. // let vuexStore = require('@/store/$t.mixin.js');
  12. // Vue.mixin(vuexStore);
  13. // 引入请求封装
  14. require('./utils/request/index')(app)
  15. Vue.config.productionTip = false
  16. App.mpType = 'app'
  17. const app = new Vue({
  18. ...App
  19. })
  20. app.$mount()
  21. // #endif
  22. // #ifdef VUE3
  23. import {
  24. createSSRApp
  25. } from 'vue'
  26. import App from './App.vue'
  27. export function createApp() {
  28. const app = createSSRApp(App)
  29. return {
  30. app
  31. }
  32. }
  33. // #endif