木邻有你前端代码仓库
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.

40 lines
757 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 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 config from '@/config'
  9. import store from '@/stores'
  10. // import vuex from 'vuex'
  11. Vue.config.productionTip = false
  12. // 全局注册弹窗组件
  13. Vue.component('GlobalPopup', GlobalPopup)
  14. // 将api挂载到Vue的原型
  15. Vue.prototype.$api = api
  16. Vue.prototype.$utils = utils
  17. Vue.prototype.$config = config
  18. App.mpType = 'app'
  19. const app = new Vue({
  20. ...App,
  21. store
  22. })
  23. app.$mount()
  24. // #endif
  25. // #ifdef VUE3
  26. import { createSSRApp } from 'vue'
  27. export function createApp() {
  28. const app = createSSRApp(App)
  29. return {
  30. app
  31. }
  32. }
  33. // #endif