main.js 526 B

123456789101112131415161718192021222324252627282930
  1. import App from './App'
  2. import uView from '@/uni_modules/uview-ui'
  3. Vue.use(uView)
  4. //进入全局过滤器
  5. import * as filters from '@/utils/filters.js'
  6. Object.keys(filters).forEach(key => {
  7. Vue.filter(key, filters[key])
  8. })
  9. // #ifndef VUE3
  10. import Vue from 'vue'
  11. Vue.config.productionTip = false
  12. App.mpType = 'app'
  13. const app = new Vue({
  14. ...App
  15. })
  16. app.$mount()
  17. // #endif
  18. // #ifdef VUE3
  19. import { createSSRApp } from 'vue'
  20. export function createApp() {
  21. const app = createSSRApp(App)
  22. return {
  23. app
  24. }
  25. }
  26. // #endif