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] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E6=97=B6=E8=AE=BE=E7=BD=AE=E5=85=A8=E5=B1=80=E5=B0=BA=E5=AF=B8?= =?UTF-8?q?=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 } }