'admin-21.01.18:处理动画、默认主题优化等'

This commit is contained in:
lyt 2021-01-18 11:49:04 +08:00
parent ab70a196a7
commit 889645769b
7 changed files with 27 additions and 7 deletions

View File

@ -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'
}
},
{

View File

@ -29,6 +29,7 @@ export interface RootStateTypes {
isShowLogoChange: boolean,
isBreadcrumb: boolean,
isTagsview: boolean,
isBreadcrumbIcon: boolean,
isTagsviewIcon: boolean,
isFooter: boolean,
isGrayscale: boolean,

View File

@ -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;

View File

@ -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() {

View File

@ -26,6 +26,7 @@ export default {
isShowLogoChange: false,
isBreadcrumb: true,
isTagsview: true,
isBreadcrumbIcon: false,
isTagsviewIcon: false,
isFooter: false,
isGrayscale: false,

View File

@ -5,8 +5,14 @@
<el-breadcrumb>
<transition-group name="breadcrumb" mode="out-in">
<el-breadcrumb-item v-for="(v,k) in breadcrumbList" :key="v.meta.title">
<span v-if="k === breadcrumbList.length - 1" class="layout-navbars-breadcrumb-span">{{v.meta.title}}</span>
<a v-else @click.prevent="onBreadcrumbClick(v)">{{v.meta.title}}</a>
<span v-if="k === breadcrumbList.length - 1" class="layout-navbars-breadcrumb-span">
<i :class="v.meta.icon" class="layout-navbars-breadcrumb-iconfont"
v-if="getThemeConfig.isBreadcrumbIcon"></i>{{v.meta.title}}
</span>
<a v-else @click.prevent="onBreadcrumbClick(v)">
<i :class="v.meta.icon" class="layout-navbars-breadcrumb-iconfont"
v-if="getThemeConfig.isBreadcrumbIcon"></i>{{v.meta.title}}
</a>
</el-breadcrumb-item>
</transition-group>
</el-breadcrumb>
@ -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);

View File

@ -170,6 +170,12 @@
<el-switch v-model="getThemeConfig.isTagsview" @change="setLocalThemeConfig"></el-switch>
</div>
</div>
<div class="layout-breadcrumb-seting-bar-flex mt15">
<div class="layout-breadcrumb-seting-bar-flex-label">开启 Breadcrumb 图标</div>
<div class="layout-breadcrumb-seting-bar-flex-value">
<el-switch v-model="getThemeConfig.isBreadcrumbIcon" @change="setLocalThemeConfig"></el-switch>
</div>
</div>
<div class="layout-breadcrumb-seting-bar-flex mt15">
<div class="layout-breadcrumb-seting-bar-flex-label">开启 Tagsview 图标</div>
<div class="layout-breadcrumb-seting-bar-flex-value">