update 面包屑位置调整

This commit is contained in:
赵霄
2023-12-06 15:58:29 +08:00
parent 31a568be00
commit d6f59523a5
4 changed files with 52 additions and 48 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
/*用户信息部分的高度*/ /*用户信息部分的高度*/
@user-info-height: var(--user-info-height, 59px); @user-info-height: var(--user-info-height, 59px);
/*面包屑的高度,高度21,上下margin24*/ /*面包屑的高度,高度21,上下margin24 2023-12-06,面包屑挪到用户信息那一栏了,现在12px是margin的数值*/
@breadcrumb-height: var(--breadcrumb-height, 45px); @breadcrumb-height: var(--breadcrumb-height, 12px);
/* 页面不出全局滚动条的高度,如果在vue文件使用,就只能在style里引入common.less */ /* 页面不出全局滚动条的高度,如果在vue文件使用,就只能在style里引入common.less */
@page-content-h: calc(100vh - @user-info-height - @breadcrumb-height); @page-content-h: calc(100vh - @user-info-height - @breadcrumb-height);
+1 -4
View File
@@ -20,7 +20,6 @@
<!-- </a-tab-pane>--> <!-- </a-tab-pane>-->
<!--</a-tabs>--> <!--</a-tabs>-->
<breadcrumb v-if="!isEmbedded"/>
<div :style="!isEmbedded ? 'margin: 12px 12px 0;' : ''"> <div :style="!isEmbedded ? 'margin: 12px 12px 0;' : ''">
<!-- update-begin-author:taoyan date:20201221 for:此处删掉transition标签 不知道为什么加上后 页面路由切换的时候即1及菜单切到2及菜单的时候 两个菜单页面会同时出现300-500秒左右 --> <!-- update-begin-author:taoyan date:20201221 for:此处删掉transition标签 不知道为什么加上后 页面路由切换的时候即1及菜单切到2及菜单的时候 两个菜单页面会同时出现300-500秒左右 -->
<keep-alive v-if="multipage"> <keep-alive v-if="multipage">
@@ -44,7 +43,6 @@ import { triggerWindowResizeEvent } from '@/utils/util'
import Vue from 'vue' import Vue from 'vue'
import { CACHE_INCLUDED_ROUTES } from '@/store/mutation-types' import { CACHE_INCLUDED_ROUTES } from '@/store/mutation-types'
import BlankLayout from './BlankLayout.vue' import BlankLayout from './BlankLayout.vue'
import Breadcrumb from '../tools/Breadcrumb.vue'
import { mapState } from 'vuex' import { mapState } from 'vuex'
const indexKey = '/' const indexKey = '/'
@@ -54,8 +52,7 @@ export default {
components: { components: {
BlankLayout, BlankLayout,
GlobalLayout, GlobalLayout,
Contextmenu, Contextmenu
Breadcrumb
}, },
mixins: [mixin, mixinDevice], mixins: [mixin, mixinDevice],
data () { data () {
+48 -41
View File
@@ -15,18 +15,17 @@
v-else v-else
class="trigger" class="trigger"
:type="collapsed ? 'menu-unfold' : 'menu-fold'" :type="collapsed ? 'menu-unfold' : 'menu-fold'"
@click="toggle"/> @click="toggle" />
<span v-if="device === 'desktop'">中国重汽标准法规管理模块系统</span> <breadcrumb v-if="!isEmbedded" class="breadcrumb" />
<span v-else>Jero-Boot</span>
<user-menu :theme="theme"/> <user-menu :theme="theme" />
</div> </div>
<!-- 顶部导航栏模式 --> <!-- 顶部导航栏模式 -->
<div v-else :class="['top-nav-header-index', theme]"> <div v-else :class="['top-nav-header-index', theme]">
<div class="header-index-wide"> <div class="header-index-wide">
<div class="header-index-left" :style="topMenuStyle.headerIndexLeft"> <div class="header-index-left" :style="topMenuStyle.headerIndexLeft">
<logo class="top-nav-header" :show-title="device !== 'mobile'" :style="topMenuStyle.topNavHeader"/> <logo class="top-nav-header" :show-title="device !== 'mobile'" :style="topMenuStyle.topNavHeader" />
<div v-if="device !== 'mobile'" :style="topMenuStyle.topSmenuStyle"> <div v-if="device !== 'mobile'" :style="topMenuStyle.topSmenuStyle">
<s-menu <s-menu
mode="horizontal" mode="horizontal"
@@ -41,7 +40,7 @@
:type="collapsed ? 'menu-fold' : 'menu-unfold'" :type="collapsed ? 'menu-fold' : 'menu-unfold'"
@click="toggle"></a-icon> @click="toggle"></a-icon>
</div> </div>
<user-menu class="header-index-right" :theme="theme" :style="topMenuStyle.headerIndexRight"/> <user-menu class="header-index-right" :theme="theme" :style="topMenuStyle.headerIndexRight" />
</div> </div>
</div> </div>
@@ -53,10 +52,12 @@ import UserMenu from '../tools/UserMenu'
import SMenu from '../menu/' import SMenu from '../menu/'
import Logo from '../tools/Logo' import Logo from '../tools/Logo'
import { mixin } from '@/utils/mixin.js' import { mixin } from '@/utils/mixin.js'
import Breadcrumb from '../tools/Breadcrumb'
export default { export default {
name: 'GlobalHeader', name: 'GlobalHeader',
components: { components: {
Breadcrumb,
UserMenu, UserMenu,
SMenu, SMenu,
Logo Logo
@@ -166,57 +167,63 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
/* update_begin author:scott date:20190220 for: 缩小首页布局顶部的高度*/ /* update_begin author:scott date:20190220 for: 缩小首页布局顶部的高度*/
@height: 59px; @height: 59px;
.layout { .layout {
.top-nav-header-index { .top-nav-header-index {
.header-index-wide { .header-index-wide {
margin-left: 10px; margin-left: 10px;
.ant-menu.ant-menu-horizontal { .ant-menu.ant-menu-horizontal {
height: @height; height: @height;
line-height: @height; line-height: @height;
}
}
.trigger {
line-height: 64px;
&:hover {
background: rgba(0, 0, 0, 0.05);
}
} }
} }
.header { .trigger {
z-index: 2; line-height: 64px;
color: #1D2129;
height: @height;
background-color: white;
transition: background 300ms;
/* dark 样式 */ &:hover {
&.dark {
color: #000000;
box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
background-color: white !important;
}
}
.header, .top-nav-header-index {
&.dark .trigger:hover {
background: rgba(0, 0, 0, 0.05); background: rgba(0, 0, 0, 0.05);
} }
} }
} }
.ant-layout-header { .header {
z-index: 2;
color: #1D2129;
height: @height; height: @height;
line-height: @height; background-color: white;
transition: background 300ms;
/* dark 样式 */
&.dark {
color: #000000;
box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
background-color: white !important;
}
} }
/* update_end author:scott date:20190220 for: 缩小首页布局顶部的高度*/ .header, .top-nav-header-index {
&.dark .trigger:hover {
background: rgba(0, 0, 0, 0.05);
}
}
}
.ant-layout-header {
height: @height;
line-height: @height;
}
/* update_end author:scott date:20190220 for: 缩小首页布局顶部的高度*/
.breadcrumb {
display: inline-block;
margin: 0;
}
</style> </style>
+1 -1
View File
@@ -104,7 +104,7 @@ const updatePageHeight = () => {
const obj = { const obj = {
'primary-color': '#D52C26', 'primary-color': '#D52C26',
'user-info-height': isEmbedded ? '0px' : '59px', // 用户信息的高度 'user-info-height': isEmbedded ? '0px' : '59px', // 用户信息的高度
'breadcrumb-height': isEmbedded ? '0px' : '45px' // 面包屑的高度 'breadcrumb-height': isEmbedded ? '0px' : '12px' // 面包屑的高度(2023-12-06,面包屑挪到用户信息那一栏了,现在12px是margin的数值)
} }
// 计算表格竖向滚动条使用 // 计算表格竖向滚动条使用
const storeObj = Object.assign(obj, { const storeObj = Object.assign(obj, {