小说小程序前端代码仓库(小程序)
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.

50 lines
833 B

3 months ago
3 months ago
3 months ago
  1. import App from './App'
  2. // #ifndef VUE3
  3. import Vue from 'vue'
  4. import './uni.promisify.adaptor'
  5. Vue.config.productionTip = false
  6. App.mpType = 'app'
  7. import store from '@/store/store.js'
  8. import './config'
  9. import './utils/index.js'
  10. import mixinConfigList from '@/mixins/configList.js'
  11. Vue.mixin(mixinConfigList)
  12. //组件注册
  13. import configPopup from '@/components/config/configPopup.vue'
  14. import navbar from '@/components/base/navbar.vue'
  15. Vue.component('configPopup',configPopup)
  16. Vue.component('navbar',navbar)
  17. // 注册全局store
  18. Vue.prototype.$store = store
  19. // 初始化主题模式
  20. store.commit('initThemeMode')
  21. const app = new Vue({
  22. ...App,
  23. store,
  24. })
  25. app.$mount()
  26. // #endif
  27. // #ifdef VUE3
  28. import {
  29. createSSRApp
  30. } from 'vue'
  31. export function createApp() {
  32. const app = createSSRApp(App)
  33. return {
  34. app
  35. }
  36. }
  37. // #endif