From 1351a0a8ae53b360901e307f4ac67b4b9f4d0c6a Mon Sep 17 00:00:00 2001 From: liyang <1711467488@qq.com> Date: Fri, 2 Nov 2018 13:18:30 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=8F=90=E9=AB=98=E5=85=BC=E5=AE=B9?= =?UTF-8?q?=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 7aee8f91a8c4ec487e5fc092d136a300641fe144 [formerly 7aee8f91a8c4ec487e5fc092d136a300641fe144 [formerly 7aee8f91a8c4ec487e5fc092d136a300641fe144 [formerly 7aee8f91a8c4ec487e5fc092d136a300641fe144 [formerly aad502e8ff4cf4678209bb8921f2fc2d45965794 [formerly f1480f51494bb1fc93892ea72bc99eda8a6229c8]]]]] Former-commit-id: fb18332801268dc982361987a826eba0607b1007 Former-commit-id: 879712f252ba19c5cec2fb904f370466768b5210 Former-commit-id: 001076c322678cbd02fc87d9dd46506f58c5993f [formerly f1b0c8012f1d8f956c36b5c93fc5303170409858] Former-commit-id: 9886d8add7568650ca8adb73420325edeff80471 Former-commit-id: 0fd1b00469e785facc1b98932dde1bb5e7941d8c Former-commit-id: fb277d5e092700756060d492f1c26164f937cb8c Former-commit-id: e99284b813c77bfc8772417e8a7aa6c2971c775a Former-commit-id: 28ae40fef1a2599e29b0880d35d15c8690abf192 --- src/layout/header-aside/components/menu-side/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layout/header-aside/components/menu-side/index.vue b/src/layout/header-aside/components/menu-side/index.vue index 54276a72..76e3585d 100644 --- a/src/layout/header-aside/components/menu-side/index.vue +++ b/src/layout/header-aside/components/menu-side/index.vue @@ -59,7 +59,7 @@ export default { handler (val) { this.active = val[val.length - 1].path this.$nextTick(() => { - if (this.aside.length > 0) { + if (this.aside.length > 0 && this.$refs.menu) { this.$refs.menu.activeIndex = this.active } }) From 43747ad0067562b2ac26e18197c35fc13589115a Mon Sep 17 00:00:00 2001 From: liyang <1711467488@qq.com> Date: Fri, 2 Nov 2018 13:21:54 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E6=97=B6=E8=AE=BE=E7=BD=AE=E5=85=A8=E5=B1=80=E5=B0=BA?= =?UTF-8?q?=E5=AF=B8=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 80bdb56c060ef778aa33b096bd3f02c6a40cb940 [formerly 80bdb56c060ef778aa33b096bd3f02c6a40cb940 [formerly 80bdb56c060ef778aa33b096bd3f02c6a40cb940 [formerly 80bdb56c060ef778aa33b096bd3f02c6a40cb940 [formerly c5f5a5839e8c8290f95f9eb58a6b7083a4d69c48 [formerly e022c140a93d7b8e0bed6d7efe3c305479add9a9]]]]] Former-commit-id: c20b43540e68f75e28cd2897457302ee665d8615 Former-commit-id: e5b0cf94eb857a1dd70bc76d7ac9f3d87694e6d8 Former-commit-id: ba8c19df70cb04ff53cba4d5e6cb680d57a3af60 [formerly afb9171556709c0bddf2d6f664ef24f9e3e55e88] Former-commit-id: f03b78a3fc2a1508177267a16149c87460bc98ec Former-commit-id: 2b50ca5b4b6459635598d513dd49c58f3e2fe9cc Former-commit-id: cada5f8d3029e4fcdb00fc9fd6392284c456ed0b Former-commit-id: 7bdc74f5cee467a4395561b6d74cb14be1859ee6 Former-commit-id: d143d99c5241d2bc1c7f7aee8cb1a791473c88fc --- src/plugin/d2admin/index.js | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/src/plugin/d2admin/index.js b/src/plugin/d2admin/index.js index e906ce4c..33620967 100644 --- a/src/plugin/d2admin/index.js +++ b/src/plugin/d2admin/index.js @@ -3,8 +3,6 @@ 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 图标 @@ -18,30 +16,19 @@ 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 - }) + // 设置为 false 以阻止 vue 在启动时生成生产提示。https://cn.vuejs.org/v2/api/#productionTip + Vue.config.productionTip = false + // 当前环境 + Vue.prototype.$env = process.env.NODE_ENV + // 当前的 baseUrl + Vue.prototype.$baseUrl = process.env.BASE_URL // Element - Vue.use(ElementUI, { - size - }) + Vue.use(ElementUI) // 插件 Vue.use(pluginError) Vue.use(pluginExport) Vue.use(pluginImport) 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 } }