main.js 553 B

1234567891011121314151617181920212223242526272829
  1. import App from './App'
  2. import store from './store'
  3. // #ifndef VUE3
  4. import Vue from 'vue'
  5. import './uni.promisify.adaptor'
  6. // 将工具函数挂载到原型上面去
  7. import { showToast,loading } from '@/utils/index'
  8. Vue.prototype.$showToast = showToast
  9. Vue.prototype.$loading = loading
  10. Vue.config.productionTip = false
  11. App.mpType = 'app'
  12. const app = new Vue({
  13. ...App
  14. })
  15. app.$mount()
  16. // #endif
  17. // #ifdef VUE3
  18. import { createSSRApp } from 'vue'
  19. export function createApp() {
  20. const app = createSSRApp(App)
  21. return {
  22. app,
  23. store
  24. }
  25. }
  26. // #endif