diff --git a/src/i18n/lang/en.js b/src/i18n/lang/en.js index b2a7d8e..6ed7fab 100644 --- a/src/i18n/lang/en.js +++ b/src/i18n/lang/en.js @@ -52,12 +52,17 @@ export default { layoutIfameView: 'IfameView', }, user: { + title0: 'Component size', title1: 'Language switching', title2: 'Menu search', title3: 'Layout configuration', title4: 'news', title5: 'Full screen on', title6: 'Full screen off', + dropdownDefault: 'default', + dropdownMedium: 'medium', + dropdownSmall: 'small', + dropdownMini: 'mini', dropdown1: 'home page', dropdown2: 'Personal Center', dropdown3: '404', diff --git a/src/i18n/lang/zh-cn.js b/src/i18n/lang/zh-cn.js index 4f122ec..a99fc14 100644 --- a/src/i18n/lang/zh-cn.js +++ b/src/i18n/lang/zh-cn.js @@ -52,12 +52,17 @@ export default { layoutIfameView: '内嵌 iframe', }, user: { + title0: '组件大小', title1: '语言切换', title2: '菜单搜索', title3: '布局配置', title4: '消息', title5: '开全屏', title6: '关全屏', + dropdownDefault: '默认', + dropdownMedium: '中等', + dropdownSmall: '小型', + dropdownMini: '超小', dropdown1: '首页', dropdown2: '个人中心', dropdown3: '404', diff --git a/src/i18n/lang/zh-tw.js b/src/i18n/lang/zh-tw.js index 15ba536..e98320e 100644 --- a/src/i18n/lang/zh-tw.js +++ b/src/i18n/lang/zh-tw.js @@ -52,12 +52,17 @@ export default { layoutIfameView: '内嵌 iframe', }, user: { + title0: '組件大小', title1: '語言切換', title2: '選單蒐索', title3: '佈局配寘', title4: '消息', title5: '開全屏', title6: '關全屏', + dropdownDefault: '默認', + dropdownMedium: '中等', + dropdownSmall: '小型', + dropdownMini: '超小', dropdown1: '首頁', dropdown2: '個人中心', dropdown3: '404', diff --git a/src/main.js b/src/main.js index 7ccaa3d..18f7187 100644 --- a/src/main.js +++ b/src/main.js @@ -8,9 +8,10 @@ import Element from 'element-ui'; import 'element-ui/lib/theme-chalk/index.css'; import '@/theme/index.scss'; import { i18n } from '@/i18n/index.js'; +import { globalComponentSize } from '@/utils/componentSize.js'; Vue.use(Particles); -Vue.use(Element, { i18n: (key, value) => i18n.t(key, value) }); +Vue.use(Element, { i18n: (key, value) => i18n.t(key, value), size: globalComponentSize }); Vue.config.productionTip = false; Vue.prototype.bus = new Vue(); diff --git a/src/store/modules/themeConfig.js b/src/store/modules/themeConfig.js index 3a10923..08bb21f 100644 --- a/src/store/modules/themeConfig.js +++ b/src/store/modules/themeConfig.js @@ -52,6 +52,8 @@ const themeConfigModule = { globalViceDes: 'vue2.x后台管理系统免费开源模板', // 默认初始语言,可选值"",默认 zh-cn globalI18n: 'zh-cn', + // 默认全局组件大小,可选值"",默认 default + globalComponentSize: 'default', }, }, mutations: { diff --git a/src/utils/componentSize.js b/src/utils/componentSize.js new file mode 100644 index 0000000..5e1d3da --- /dev/null +++ b/src/utils/componentSize.js @@ -0,0 +1,4 @@ +import { getLocal } from '@/utils/storage.js'; + +// 全局组件大小 +export const globalComponentSize = getLocal('themeConfig') ? getLocal('themeConfig').globalComponentSize : 'default'; diff --git a/src/utils/setIconfont.js b/src/utils/setIconfont.js index b9363d0..cc37cba 100644 --- a/src/utils/setIconfont.js +++ b/src/utils/setIconfont.js @@ -1,5 +1,5 @@ // 字体图标 url -const cssCdnUrlList = ['//at.alicdn.com/t/font_2298093_cl2h21rqdau.css', '//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css']; +const cssCdnUrlList = ['//at.alicdn.com/t/font_2298093_vcabyobusxq.css', '//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css']; // 第三方 js url const jsCdnUrlList = []; diff --git a/src/views/layout/navBars/breadcrumb/user.vue b/src/views/layout/navBars/breadcrumb/user.vue index 63d8268..381e40c 100644 --- a/src/views/layout/navBars/breadcrumb/user.vue +++ b/src/views/layout/navBars/breadcrumb/user.vue @@ -1,5 +1,18 @@