main.js 1.0 KB

123456789101112131415161718192021222324252627282930
  1. import App from './App'
  2. import Vue from 'vue'
  3. import store from './store'
  4. import FamilyEmptyState from './components/FamilyEmptyState/FamilyEmptyState.vue'
  5. import CustomTabBar from './custom-tab-bar/index.vue'
  6. import LoginSheet from './components/login-sheet.vue'
  7. import loginSheetMixin from './mixins/login-sheet.js'
  8. import { formatPriceWithSymbol, formatPrice, formatRate, formatScore } from '@/utils/format'
  9. Vue.config.productionTip = false
  10. Vue.component('FamilyEmptyState', FamilyEmptyState)
  11. Vue.component('custom-tab-bar', CustomTabBar)
  12. // 全局登录浮层:注册组件 + 注入 mixin(页面任意位置 this.openLoginSheet() 即从底部浮出)
  13. Vue.component('login-sheet', LoginSheet)
  14. Vue.mixin(loginSheetMixin)
  15. Vue.prototype.$store = store
  16. Vue.prototype.formatPriceWithSymbol = formatPriceWithSymbol
  17. Vue.prototype.formatPrice = formatPrice
  18. Vue.prototype.formatRate = formatRate
  19. Vue.prototype.formatScore = formatScore
  20. App.mpType = 'app'
  21. const app = new Vue({
  22. store,
  23. render: h => h(App)
  24. })
  25. app.$mount()