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.

46 lines
928 B

8 months ago
8 months ago
8 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. Vue.config.isCustomElement = tag => tag === 'image' || tag.startsWith('app-')
  7. App.mpType = 'app'
  8. const app = new Vue({
  9. ...App
  10. })
  11. app.$mount()
  12. // #endif
  13. // #ifdef VUE3
  14. import { createSSRApp } from 'vue'
  15. // #ifdef H5
  16. import 'vant/lib/index.css';
  17. import vant from 'vant';
  18. // #endif
  19. import uniIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
  20. import uniDrawer from '@/uni_modules/uni-drawer/components/uni-drawer/uni-drawer.vue'
  21. import mixinConfigList from '@/mixins/configList.js'
  22. import store from '@/store/store'
  23. export function createApp() {
  24. const app = createSSRApp(App)
  25. app.component(uniIcons)
  26. app.component(uniDrawer)
  27. // #ifdef H5
  28. app.use(vant)
  29. // #endif
  30. app.use(store)
  31. app.mixin(mixinConfigList)
  32. return {
  33. app
  34. }
  35. }
  36. // #endif