'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: { meta: {
title: '首页', title: '首页',
isLink: '', isLink: '',
isHide: false isHide: false,
icon: 'iconfont icon-shouye'
}, },
children: [{ children: [{
path: '/home', path: '/home',
@ -142,7 +143,7 @@ const dynamicRoutes = [
title: '大数据图表', title: '大数据图表',
isLink: '', isLink: '',
isHide: false, isHide: false,
icon: 'iconfont icon-chanyedashujufuwupingtai' icon: 'iconfont icon-ico_shuju'
} }
}, },
{ {

View File

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

View File

@ -779,7 +779,7 @@
// 第三方图标字体间距/大小设置 // 第三方图标字体间距/大小设置
.el-menu-item .iconfont, .el-menu-item .iconfont,
.el-submenu .iconfont { .el-submenu .iconfont {
font-size: 18px !important; font-size: 14px !important;
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
margin-right: 5px; margin-right: 5px;

View File

@ -1,5 +1,5 @@
// 字体图标 url // 字体图标 url
const urlArr = ["//at.alicdn.com/t/font_2298093_3atw1lxsgot.css"] const urlArr = ["//at.alicdn.com/t/font_2298093_0pyjdtieuwp.css"]
// 动态设置字体图标 // 动态设置字体图标
export function setIconfont() { export function setIconfont() {

View File

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

View File

@ -5,8 +5,14 @@
<el-breadcrumb> <el-breadcrumb>
<transition-group name="breadcrumb" mode="out-in"> <transition-group name="breadcrumb" mode="out-in">
<el-breadcrumb-item v-for="(v,k) in breadcrumbList" :key="v.meta.title"> <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> <span v-if="k === breadcrumbList.length - 1" class="layout-navbars-breadcrumb-span">
<a v-else @click.prevent="onBreadcrumbClick(v)">{{v.meta.title}}</a> <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> </el-breadcrumb-item>
</transition-group> </transition-group>
</el-breadcrumb> </el-breadcrumb>
@ -31,9 +37,10 @@ export default {
const route = useRoute(); const route = useRoute();
const router = useRouter(); const router = useRouter();
const state = reactive({ const state = reactive({
breadcrumbList: [{ meta: { title: "" } }], // v-for breadcrumbList: [{ meta: { title: "", icon: "" } }], // v-for
}); });
const getBreadcrumbList = (matched: any) => { const getBreadcrumbList = (matched: any) => {
console.log(matched);
state.breadcrumbList = matched; state.breadcrumbList = matched;
}; };
const onBreadcrumbClick = (v: object) => { const onBreadcrumbClick = (v: object) => {
@ -81,6 +88,10 @@ export default {
opacity: 0.7; opacity: 0.7;
color: var(--bg-topBarColor); color: var(--bg-topBarColor);
} }
.layout-navbars-breadcrumb-iconfont {
font-size: 14px;
margin-right: 5px;
}
::v-deep(.el-breadcrumb__separator) { ::v-deep(.el-breadcrumb__separator) {
opacity: 0.7; opacity: 0.7;
color: var(--bg-topBarColor); color: var(--bg-topBarColor);

View File

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