import App from './App' import Vue from 'vue' import store from './store' import FamilyEmptyState from './components/FamilyEmptyState/FamilyEmptyState.vue' import CustomTabBar from './custom-tab-bar/index.vue' import LoginSheet from './components/login-sheet.vue' import loginSheetMixin from './mixins/login-sheet.js' import { formatPriceWithSymbol, formatPrice, formatRate, formatScore } from '@/utils/format' Vue.config.productionTip = false Vue.component('FamilyEmptyState', FamilyEmptyState) Vue.component('custom-tab-bar', CustomTabBar) // 全局登录浮层:注册组件 + 注入 mixin(页面任意位置 this.openLoginSheet() 即从底部浮出) Vue.component('login-sheet', LoginSheet) Vue.mixin(loginSheetMixin) Vue.prototype.$store = store Vue.prototype.formatPriceWithSymbol = formatPriceWithSymbol Vue.prototype.formatPrice = formatPrice Vue.prototype.formatRate = formatRate Vue.prototype.formatScore = formatScore App.mpType = 'app' const app = new Vue({ store, render: h => h(App) }) app.$mount()