Former-commit-id: f4d2097b236a5c20e84ff57c2d4e9e62a3f0fefb
This commit is contained in:
liyang
2018-09-20 14:33:38 +08:00
parent e0ce56c7e9
commit 9839f47d20
170 changed files with 36620 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
// Element
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
// flex 布局库
import 'flex.css'
// store
import store from '@/store/index'
// 组件
import '@/components'
// svg 图标
import '@/assets/svg-icons'
// 功能插件
import pluginError from '@/plugin/error'
import pluginLog from '@/plugin/log'
import pluginOpen from '@/plugin/open'
export default {
async install (Vue, options) {
// 获得用户设置的全局尺寸
const size = await store.dispatch('d2admin/db/get', {
dbName: 'sys',
path: 'size.value',
defaultValue: '',
user: true
})
// Element
Vue.use(ElementUI, {
size
})
// 插件
Vue.use(pluginError)
Vue.use(pluginLog)
Vue.use(pluginOpen)
// 设置为 false 以阻止 vue 在启动时生成生产提示。
// https://cn.vuejs.org/v2/api/#productionTip
Vue.config.productionTip = false
// 当前环境
Vue.prototype.$env = process.env.NODE_ENV
// 当前的 baseUrl
// 简化代码中 process.env.BASE_URL 取值
Vue.prototype.$baseUrl = process.env.BASE_URL
}
}