木邻有你前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
696 B

1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
  1. import App from './App'
  2. // #ifndef VUE3
  3. import GlobalPopup from '@/pages/components/GlobalPopup.vue'
  4. import Vue from 'vue'
  5. import './uni.promisify.adaptor'
  6. import * as api from '@/api'
  7. import utils from '@/utils'
  8. import store from '@/stores'
  9. // import vuex from 'vuex'
  10. Vue.config.productionTip = false
  11. // 全局注册弹窗组件
  12. Vue.component('GlobalPopup', GlobalPopup)
  13. // 将api挂载到Vue的原型
  14. Vue.prototype.$api = api
  15. Vue.prototype.$utils = utils
  16. App.mpType = 'app'
  17. const app = new Vue({
  18. ...App,
  19. store
  20. })
  21. app.$mount()
  22. // #endif
  23. // #ifdef VUE3
  24. import { createSSRApp } from 'vue'
  25. export function createApp() {
  26. const app = createSSRApp(App)
  27. return {
  28. app
  29. }
  30. }
  31. // #endif