main.js 924 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import '.env.js'
  2. import App from './App'
  3. //引入前置路由颜值
  4. import {
  5. router,
  6. RouterMount
  7. } from './service/router.js' //路径换成自己的
  8. Vue.use(router)
  9. // #ifndef VUE3
  10. import Vue from 'vue'
  11. import store from './store'
  12. import Nav from './components/en-utils/en-nav/en-nav.vue'
  13. import 'animate.css'
  14. import { WOW } from 'wowjs'
  15. Vue.prototype.$wow = new WOW({
  16. boxClass: 'wow',
  17. animateClass: 'animate__animated',
  18. offset: 0,
  19. mobile: true,
  20. live: true,
  21. })
  22. Vue.component('Nav', Nav)
  23. Vue.config.productionTip = false
  24. App.mpType = 'app'
  25. const app = new Vue({
  26. ...App,
  27. store
  28. })
  29. // app.$mount()
  30. // #ifdef H5
  31. RouterMount(app, router, '#app')
  32. // #endif
  33. // #ifndef H5
  34. app.$mount(); //为了兼容小程序及app端必须这样写才有效果
  35. // #endif
  36. // #endif
  37. // #ifdef VUE3
  38. import {
  39. createSSRApp
  40. } from 'vue'
  41. export function createApp() {
  42. const app = createSSRApp(App)
  43. return {
  44. app,
  45. }
  46. }
  47. // #endif