From 889645769b28be2bac179c35429df3e48a4cc4ec Mon Sep 17 00:00:00 2001 From: lyt <1105290566@qq.com> Date: Mon, 18 Jan 2021 11:49:04 +0800 Subject: [PATCH] =?UTF-8?q?'admin-21.01.18:=E5=A4=84=E7=90=86=E5=8A=A8?= =?UTF-8?q?=E7=94=BB=E3=80=81=E9=BB=98=E8=AE=A4=E4=B8=BB=E9=A2=98=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E7=AD=89'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vue-admin-wonderful-next/src/router/index.ts | 5 +++-- vue-admin-wonderful-next/src/store/index.ts | 1 + vue-admin-wonderful-next/src/theme/element.scss | 2 +- .../src/utils/setIconfont.ts | 2 +- .../src/utils/themeConfig.ts | 1 + .../layout/navBars/breadcrumb/breadcrumb.vue | 17 ++++++++++++++--- .../views/layout/navBars/breadcrumb/setings.vue | 6 ++++++ 7 files changed, 27 insertions(+), 7 deletions(-) diff --git a/vue-admin-wonderful-next/src/router/index.ts b/vue-admin-wonderful-next/src/router/index.ts index ee5d4d0d..c2613776 100644 --- a/vue-admin-wonderful-next/src/router/index.ts +++ b/vue-admin-wonderful-next/src/router/index.ts @@ -8,7 +8,8 @@ const dynamicRoutes = [ meta: { title: '首页', isLink: '', - isHide: false + isHide: false, + icon: 'iconfont icon-shouye' }, children: [{ path: '/home', @@ -142,7 +143,7 @@ const dynamicRoutes = [ title: '大数据图表', isLink: '', isHide: false, - icon: 'iconfont icon-chanyedashujufuwupingtai' + icon: 'iconfont icon-ico_shuju' } }, { diff --git a/vue-admin-wonderful-next/src/store/index.ts b/vue-admin-wonderful-next/src/store/index.ts index b4db66dc..c31144e2 100644 --- a/vue-admin-wonderful-next/src/store/index.ts +++ b/vue-admin-wonderful-next/src/store/index.ts @@ -29,6 +29,7 @@ export interface RootStateTypes { isShowLogoChange: boolean, isBreadcrumb: boolean, isTagsview: boolean, + isBreadcrumbIcon: boolean, isTagsviewIcon: boolean, isFooter: boolean, isGrayscale: boolean, diff --git a/vue-admin-wonderful-next/src/theme/element.scss b/vue-admin-wonderful-next/src/theme/element.scss index eaaf44ee..4d1c3427 100644 --- a/vue-admin-wonderful-next/src/theme/element.scss +++ b/vue-admin-wonderful-next/src/theme/element.scss @@ -779,7 +779,7 @@ // 第三方图标字体间距/大小设置 .el-menu-item .iconfont, .el-submenu .iconfont { - font-size: 18px !important; + font-size: 14px !important; display: inline-block; vertical-align: middle; margin-right: 5px; diff --git a/vue-admin-wonderful-next/src/utils/setIconfont.ts b/vue-admin-wonderful-next/src/utils/setIconfont.ts index 80dc705c..872ba01d 100644 --- a/vue-admin-wonderful-next/src/utils/setIconfont.ts +++ b/vue-admin-wonderful-next/src/utils/setIconfont.ts @@ -1,5 +1,5 @@ // 字体图标 url -const urlArr = ["//at.alicdn.com/t/font_2298093_3atw1lxsgot.css"] +const urlArr = ["//at.alicdn.com/t/font_2298093_0pyjdtieuwp.css"] // 动态设置字体图标 export function setIconfont() { diff --git a/vue-admin-wonderful-next/src/utils/themeConfig.ts b/vue-admin-wonderful-next/src/utils/themeConfig.ts index f12a0b5f..8c32d38a 100644 --- a/vue-admin-wonderful-next/src/utils/themeConfig.ts +++ b/vue-admin-wonderful-next/src/utils/themeConfig.ts @@ -26,6 +26,7 @@ export default { isShowLogoChange: false, isBreadcrumb: true, isTagsview: true, + isBreadcrumbIcon: false, isTagsviewIcon: false, isFooter: false, isGrayscale: false, diff --git a/vue-admin-wonderful-next/src/views/layout/navBars/breadcrumb/breadcrumb.vue b/vue-admin-wonderful-next/src/views/layout/navBars/breadcrumb/breadcrumb.vue index e14799f3..d6d7b43d 100644 --- a/vue-admin-wonderful-next/src/views/layout/navBars/breadcrumb/breadcrumb.vue +++ b/vue-admin-wonderful-next/src/views/layout/navBars/breadcrumb/breadcrumb.vue @@ -5,8 +5,14 @@ - {{v.meta.title}} - {{v.meta.title}} + + {{v.meta.title}} + + + {{v.meta.title}} + @@ -31,9 +37,10 @@ export default { const route = useRoute(); const router = useRouter(); const state = reactive({ - breadcrumbList: [{ meta: { title: "" } }], // 定义初始值,不能为空数组,否则 v-for 报错 + breadcrumbList: [{ meta: { title: "", icon: "" } }], // 定义初始值,不能为空数组,否则 v-for 报错 }); const getBreadcrumbList = (matched: any) => { + console.log(matched); state.breadcrumbList = matched; }; const onBreadcrumbClick = (v: object) => { @@ -81,6 +88,10 @@ export default { opacity: 0.7; color: var(--bg-topBarColor); } + .layout-navbars-breadcrumb-iconfont { + font-size: 14px; + margin-right: 5px; + } ::v-deep(.el-breadcrumb__separator) { opacity: 0.7; color: var(--bg-topBarColor); diff --git a/vue-admin-wonderful-next/src/views/layout/navBars/breadcrumb/setings.vue b/vue-admin-wonderful-next/src/views/layout/navBars/breadcrumb/setings.vue index a6194b7a..65c14f24 100644 --- a/vue-admin-wonderful-next/src/views/layout/navBars/breadcrumb/setings.vue +++ b/vue-admin-wonderful-next/src/views/layout/navBars/breadcrumb/setings.vue @@ -170,6 +170,12 @@ +
+
开启 Breadcrumb 图标
+
+ +
+
开启 Tagsview 图标