main.js 524 B

1234567891011121314151617181920212223242526272829
  1. import App from './App'
  2. import store from '@/store/index.js'; // 引入vuex
  3. Vue.prototype.$store = store
  4. import common from 'static/js/common.js';
  5. Vue.prototype.$dialog = common;
  6. // #ifndef VUE3
  7. import Vue from 'vue'
  8. import './uni.promisify.adaptor'
  9. Vue.config.productionTip = false
  10. App.mpType = 'app'
  11. const app = new Vue({
  12. ...App,
  13. store
  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. }
  24. }
  25. // #endif