Merge branch 'hotfix/调整$baseUrl设置位置' into develop
Former-commit-id: 14e161213d3b85d2a2f2b438034e4d9fbf0641f4 [formerly 14e161213d3b85d2a2f2b438034e4d9fbf0641f4 [formerly 14e161213d3b85d2a2f2b438034e4d9fbf0641f4 [formerly 14e161213d3b85d2a2f2b438034e4d9fbf0641f4 [formerly 6a812787eeeffa91df05380e182b842d21621597 [formerly b466df8776599507e247166186a18d9945fe78c9]]]]] Former-commit-id: 416bf96117a7046c462a2e4a59ebcad9b9dd19e4 Former-commit-id: 2439d6a990045e8644713835a4b34870fd9d7f5e Former-commit-id: c65bcc6b9a06b4b0cc7dd82efcf47aa50030b1a8 [formerly 4c40c5f15f4fef80bbbe9d388082ade89711bf9f] Former-commit-id: a56e80ad12ab66e4bc911717a1a3028d0a0fb90a Former-commit-id: 070350378bb670d57b970e947daffa6996873c04 Former-commit-id: e32a6fe8370bb8414e83aa69fa67bc8f63998e1f Former-commit-id: 8ff476da36d47b3bc0b46719d086874634079997 Former-commit-id: eb2cfc01ee39674be316d25124311513115afeb5
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 图标
|
||||||
@@ -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
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user