Merge branch 'hotfix/调整$baseUrl设置位置'

Former-commit-id: 0c60e5ec79af2d80f2c79f8377dfefba61c96228 [formerly f4c0c90c2fc66e3fa5608c3f77b85634424781f0] [formerly 0c60e5ec79af2d80f2c79f8377dfefba61c96228 [formerly f4c0c90c2fc66e3fa5608c3f77b85634424781f0] [formerly 0c60e5ec79af2d80f2c79f8377dfefba61c96228 [formerly f4c0c90c2fc66e3fa5608c3f77b85634424781f0] [formerly f4c0c90c2fc66e3fa5608c3f77b85634424781f0 [formerly 9b343ebf6580620e8b0b8d37994df13251c458ae [formerly da0f100a7ba043c2706e20a3ada0ce302b8798ee]]]]]
Former-commit-id: c300200ae65d25df04e60ab331575768e7719d89
Former-commit-id: da840b19eea03737178248ddeaf5e53c6f46d94c
Former-commit-id: 48f813963078e908919cdd9ab2596ecd904ce998 [formerly a5b48b0d40372ad4a141dd61d96b6b8001a28425]
Former-commit-id: 911d99696e0b1405ff3a6980314d22e82623332a
Former-commit-id: 82666ab0945c6a5a3c6cf64ce13af168a88afc34
Former-commit-id: 5b5e304274fc58ce13d1159c078d7aef7632de79
Former-commit-id: 0cbf2e29d355dfb93545bd672a9638acaa7e0628
Former-commit-id: 3ca40580ecbcffa9426e1a3c9a384485bc9ff0da
This commit is contained in:
liyang
2018-11-02 13:22:08 +08:00
2 changed files with 8 additions and 21 deletions

View File

@@ -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
} }
}) })

View File

@@ -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 图标
@@ -18,30 +16,19 @@ 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', { Vue.config.productionTip = false
dbName: 'sys', // 当前环境
path: 'size.value', Vue.prototype.$env = process.env.NODE_ENV
defaultValue: '', // 当前的 baseUrl
user: true Vue.prototype.$baseUrl = process.env.BASE_URL
})
// Element // Element
Vue.use(ElementUI, { Vue.use(ElementUI)
size
})
// 插件 // 插件
Vue.use(pluginError) Vue.use(pluginError)
Vue.use(pluginExport) Vue.use(pluginExport)
Vue.use(pluginImport) Vue.use(pluginImport)
Vue.use(pluginLog) Vue.use(pluginLog)
Vue.use(pluginOpen) 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
} }
} }