main.js 804 B

123456789101112131415161718192021222324252627282930313233343536
  1. // #ifndef VUE3
  2. import Vue from 'vue'
  3. import App from './App'
  4. import store from './store';
  5. // 引入自定义组件
  6. import NavBar from './components/nav-bar.vue'
  7. import baner from './components/swiper-baner.vue'
  8. import list from './components/list.vue'
  9. import imgList from './components/imgList.vue'
  10. import goosList from './components/goosList.vue'
  11. Vue.config.productionTip = false
  12. App.mpType = 'app'
  13. Vue.component('navbar', NavBar)
  14. Vue.component('baner', baner)
  15. Vue.component('list', list)
  16. Vue.component('imgList', imgList)
  17. Vue.component('goosList', goosList)
  18. const app = new Vue({
  19. store,
  20. ...App
  21. })
  22. app.$mount()
  23. // #endif
  24. // #ifdef VUE3
  25. import { createSSRApp } from 'vue'
  26. import App from './App.vue'
  27. export function createApp() {
  28. const app = createSSRApp(App)
  29. return {
  30. app
  31. }
  32. }
  33. // #endif