main.js 497 B

123456789101112131415161718192021222324252627282930
  1. import App from './App'
  2. // #ifndef VUE3
  3. import Vue from 'vue'
  4. // vuex
  5. import store from './store'
  6. import log from "@/static/logo.png";
  7. Vue.prototype.$store = store;
  8. Vue.filter('lazyImage',data=>{
  9. return data || log;
  10. })
  11. Vue.config.productionTip = false
  12. App.mpType = 'app'
  13. const app = new Vue({
  14. store,
  15. ...App
  16. })
  17. app.$mount()
  18. // #endif
  19. // #ifdef VUE3
  20. import { createSSRApp } from 'vue'
  21. export function createApp() {
  22. const app = createSSRApp(App)
  23. return {
  24. store,
  25. app
  26. }
  27. }
  28. // #endif