2018-08-22 10:24:02 +08:00
|
|
|
// Element
|
|
|
|
|
import ElementUI from 'element-ui'
|
|
|
|
|
import 'element-ui/lib/theme-chalk/index.css'
|
|
|
|
|
// flex 布局库
|
|
|
|
|
import 'flex.css'
|
|
|
|
|
// 组件
|
|
|
|
|
import '@/components'
|
|
|
|
|
// svg 图标
|
|
|
|
|
import '@/assets/svg-icons'
|
|
|
|
|
// 功能插件
|
|
|
|
|
import pluginAxios from '@/plugin/axios'
|
|
|
|
|
import pluginLog from '@/plugin/log'
|
|
|
|
|
import pluginOpen from '@/plugin/open'
|
|
|
|
|
import pluginError from '@/plugin/error'
|
|
|
|
|
import pluginImport from '@/plugin/import'
|
|
|
|
|
import pluginExport from '@/plugin/export'
|
|
|
|
|
|
2018-08-22 09:13:26 +08:00
|
|
|
export default {
|
|
|
|
|
install (Vue, options) {
|
2018-08-22 10:24:02 +08:00
|
|
|
// Element
|
|
|
|
|
Vue.use(ElementUI)
|
|
|
|
|
// 插件
|
|
|
|
|
Vue.use(pluginLog)
|
|
|
|
|
Vue.use(pluginOpen)
|
|
|
|
|
Vue.use(pluginAxios)
|
|
|
|
|
Vue.use(pluginError)
|
|
|
|
|
Vue.use(pluginImport)
|
|
|
|
|
Vue.use(pluginExport)
|
2018-08-22 09:13:26 +08:00
|
|
|
// 设置为 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
|
|
|
|
|
}
|
|
|
|
|
}
|