| 123456789101112131415161718192021222324252627282930 |
- // main.js(Vue 2)
- import Vue from 'vue'
- import App from './App.vue'
- import * as filters from './utils/filters.js'
- import store from './store'
- import uView from 'uview-ui'
- import config from '@/config/config'
- // 注册全局过滤器
- Object.keys(filters).forEach((key) => {
- Vue.filter(key, filters[key])
- })
- // 全局挂载变量(通过 Vue.prototype)
- Vue.prototype.$mainColor = config.mainColor
- Vue.prototype.$lightColor = config.lightColor
- Vue.prototype.$aiderLightColor = config.aiderLightColor
- // 使用 Vuex store
- Vue.use(store)
- // 使用 uView UI
- Vue.use(uView)
- Vue.config.productionTip = false
- new Vue({
- store,
- render: h => h(App)
- }).$mount('#app')
|