main.js 555 B

123456789101112131415161718192021222324252627282930
  1. import App from './App'
  2. // #ifndef VUE3
  3. import Vue from 'vue'
  4. import time from '@/commit/item.js';
  5. import store from '@/store/index.js'
  6. import uView from '@/uni_modules/uview-ui';
  7. Vue.config.productionTip = false
  8. Vue.prototype.$time = time
  9. Vue.prototype.$store = store
  10. App.mpType = 'app'
  11. Vue.use(uView);
  12. const app = new Vue({
  13. ...App,
  14. store
  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