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.

39 lines
788 B

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. export function createApp() {
  22. const app = createSSRApp(App)
  23. app.component(uniIcons)
  24. app.component(uniDrawer)
  25. // #ifdef H5
  26. app.use(vant)
  27. // #endif
  28. return {
  29. app
  30. }
  31. }
  32. // #endif