Merge branch 'hotfix/优化' into develop
Former-commit-id: 3a805dc7d2979a47f1ff070393262144a568a7ee
This commit is contained in:
@@ -59,7 +59,7 @@ export default {
|
|||||||
handler (val) {
|
handler (val) {
|
||||||
this.active = val[val.length - 1].path
|
this.active = val[val.length - 1].path
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (this.aside.length > 0) {
|
if (this.aside.length > 0 && this.$refs.menu) {
|
||||||
this.$refs.menu.activeIndex = this.active
|
this.$refs.menu.activeIndex = this.active
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -3,8 +3,6 @@ import ElementUI from 'element-ui'
|
|||||||
import 'element-ui/lib/theme-chalk/index.css'
|
import 'element-ui/lib/theme-chalk/index.css'
|
||||||
// flex 布局库
|
// flex 布局库
|
||||||
import 'flex.css'
|
import 'flex.css'
|
||||||
// store
|
|
||||||
import store from '@/store/index'
|
|
||||||
// 组件
|
// 组件
|
||||||
import '@/components'
|
import '@/components'
|
||||||
// svg 图标
|
// svg 图标
|
||||||
@@ -16,28 +14,17 @@ import pluginOpen from '@/plugin/open'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
async install (Vue, options) {
|
async install (Vue, options) {
|
||||||
// 获得用户设置的全局尺寸
|
// 设置为 false 以阻止 vue 在启动时生成生产提示。https://cn.vuejs.org/v2/api/#productionTip
|
||||||
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.config.productionTip = false
|
||||||
// 当前环境
|
// 当前环境
|
||||||
Vue.prototype.$env = process.env.NODE_ENV
|
Vue.prototype.$env = process.env.NODE_ENV
|
||||||
// 当前的 baseUrl
|
// 当前的 baseUrl
|
||||||
// 简化代码中 process.env.BASE_URL 取值
|
|
||||||
Vue.prototype.$baseUrl = process.env.BASE_URL
|
Vue.prototype.$baseUrl = process.env.BASE_URL
|
||||||
|
// Element
|
||||||
|
Vue.use(ElementUI)
|
||||||
|
// 插件
|
||||||
|
Vue.use(pluginError)
|
||||||
|
Vue.use(pluginLog)
|
||||||
|
Vue.use(pluginOpen)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user