样式修改

menu_style
jinna 4 months ago
parent b009767664
commit bc2db52d96
  1. BIN
      src/assets/right_pull.png
  2. BIN
      src/assets/right_pull_white.png
  3. 2
      src/page/index/index.vue
  4. 98
      src/page/index/sidebar/index.vue

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 B

@ -2,7 +2,7 @@
<el-watermark :content="watermark" style="height: 100%"> <el-watermark :content="watermark" style="height: 100%">
<div class="avue-contail" :class="{ 'avue--collapse': isCollapse }"> <div class="avue-contail" :class="{ 'avue--collapse': isCollapse }">
<div class="avue-layout" :class="{ 'avue-layout--horizontal': isHorizontal }"> <div class="avue-layout" :class="{ 'avue-layout--horizontal': isHorizontal }">
<div class="avue-sidebar" v-show="validSidebar" :style="{ width: setting.styleRadio == '3' && '195px' }" <div class="avue-sidebar" v-show="validSidebar" :style="{ width: setting.styleRadio == '3' && '195px',background: setting.styleRadio == '3' && '#f7fafc'}"
:class="setting.styleRadio == '2' ? 'styleRadio' : ''"> :class="setting.styleRadio == '2' ? 'styleRadio' : ''">
<!-- 左侧导航栏 --> <!-- 左侧导航栏 -->
<logo v-if="setting.styleRadio == '1' || setting.styleRadio == '3'|| setting.styleRadio == '4'" /> <logo v-if="setting.styleRadio == '1' || setting.styleRadio == '3'|| setting.styleRadio == '4'" />

@ -10,23 +10,35 @@
</el-menu> </el-menu>
<left-menu :menulist="menu" v-if="setting.styleRadio == '2'"></left-menu> <left-menu :menulist="menu" v-if="setting.styleRadio == '2'"></left-menu>
<div style="display: flex;" v-if="setting.styleRadio == '3'"> <div class="left_menu_box" style="display: flex;" v-if="setting.styleRadio == '3'">
<div :class="leftMenu.find(item => item.children) ? 'children' : 'no_child'"> <div :class="leftMenu.find(item => item.children) ? 'children' : 'no_child'">
<div class="top_title">{{ this.menu.find(item => item.id == this.leftMenu[selectIndex].parentId).name }}</div>
<div class="left_menu" @click="clickItem(item, index)" v-for="(item, index) in leftMenu" :key="item.id" <div class="left_menu" @click="clickItem(item, index)" v-for="(item, index) in leftMenu" :key="item.id"
:class="index == selectIndex ? 'active' : ''"> :class="index == selectIndex ? 'active' : ''">
<el-tooltip v-if="item.name && item.name.length > 4" class="item" effect="dark" :content="item.name" placement="right-start"> <el-popover placement="right-start" :show-arrow="false" :offset="0" :hide-after='0'
popper-class="log-popover"
popper-style="visibility: visible;width:auto;border:none; transform-origin: left center; z-index: 2051;padding:0;offset:0 !important;">
<template #reference>
<div class="left_menu_item"> <div class="left_menu_item">
<i :class="item.source" style="margin-bottom: 5px;"></i> <div style="display: flex;align-items: center;">
<i :class="item.source" ></i>
<span class="name_text">{{ item.name }}</span> <span class="name_text">{{ item.name }}</span>
</div> </div>
</el-tooltip> <div class="img_box" v-if="item.children"></div>
<div class="left_menu_item" v-else> </div>
<i :class="item.source" style="margin-bottom: 5px;"></i> </template>
<span class="name_text">{{ item.name }}</span> <template #default v-if="leftMenu && leftMenu.length != 0 && leftMenu[selectIndex].children && leftMenu[selectIndex].children.length != 0">
<div class="third_box" v-if="item.children && item.children.length != 0">
<div class="third_box_item" v-for="third in item.children" :key="third.id" @click='clickPage(third)'>
{{ third.name }}
</div> </div>
</div> </div>
</template>
</el-popover>
</div> </div>
<div style="flex: 1;"> </div>
<!-- <div style="flex: 1;">
<div <div
v-if="leftMenu && leftMenu.length != 0 && leftMenu[selectIndex].children && leftMenu[selectIndex].children.length != 0"> v-if="leftMenu && leftMenu.length != 0 && leftMenu[selectIndex].children && leftMenu[selectIndex].children.length != 0">
<div class="left_top">{{ leftMenu[selectIndex].name }} </div> <div class="left_top">{{ leftMenu[selectIndex].name }} </div>
@ -54,7 +66,7 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div> -->
</div> </div>
</template> </template>
@ -86,6 +98,8 @@ export default {
}, },
}, },
mounted() { mounted() {
console.log('left--------------------------',this.leftMenu)
console.log('menu--------------------------',this.menu)
if(this.setting.styleRadio=='3'){ if(this.setting.styleRadio=='3'){
this.index.openMenu2(); this.index.openMenu2();
}else{ }else{
@ -117,50 +131,76 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.left_menu_box{
// background: #f7fafc;
}
.no_child { .no_child {
width: 185px; width: 195px;
} }
.children { .children {
width: 60px; width: 195px;
}
.top_title{
font-size: 14px;
font-family: Microsoft YaHei-Bold, Microsoft YaHei;
font-weight: 700;
text-align: center;
height: 48px;
display: flex;
color: #5a6f82;
align-items: center;
justify-content: center;
} }
.left_menu { .left_menu {
width: 100%; width: 100%;
background: #f7fafc; // color: #41a5ff;
color: #41a5ff;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
color: #333;
font-family: Helvetica Neue, Helvetica, BlinkMacSystemFont, Segoe UI, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;
font-size: 14px;
&.active { &.active {
background: #41a5ff; // background: #41a5ff;
color: #fff; // color: #fff;
} }
.left_menu_item { .left_menu_item {
cursor: pointer; cursor: pointer;
padding: 10px 0;
display: flex; display: flex;
flex-direction: column; justify-content: space-between;
padding: 0 10px;
height: 46px;
align-items: center; align-items: center;
font-size: 12px; font-size: 12px;
font-family: Microsoft YaHei-Regular, Microsoft YaHei; font-family: Microsoft YaHei-Regular, Microsoft YaHei;
font-weight: 500; font-weight: 500;
color: var(--header-bkColor-hover); color: var(--header-bkColor-hover);
text-align: center; text-align: center;
width: 60px; width: 100%;
word-break: keep-all; word-break: keep-all;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
.img_box{
width: 14px;
height: 14px;
background: url('@/assets/right_pull.png');
}
.name_text{ .name_text{
display: inline-block; // display: inline-block;
width: 52px; // width: 52px;
overflow: hidden; margin-left: 10px;
text-overflow: ellipsis; /* 超出宽度200px后显示省略号 */ // overflow: hidden;
white-space: nowrap; /* 限制不允许换行 */ // text-overflow: ellipsis; /* 200px */
// white-space: nowrap; /* */
} }
@ -168,6 +208,12 @@ export default {
&:hover { &:hover {
background: #0066ff; background: #0066ff;
color: #fff; color: #fff;
.img_box{
width: 14px;
height: 14px;
background: url('@/assets/right_pull_white.png');
}
} }
} }
} }
@ -241,6 +287,7 @@ export default {
.third_box_item { .third_box_item {
min-width: 140px; min-width: 140px;
color: #5a6f82; color: #5a6f82;
cursor: pointer;
text-align: left; text-align: left;
font-size: 14px; font-size: 14px;
line-height: 46px; line-height: 46px;
@ -252,6 +299,11 @@ export default {
word-break: keep-all; word-break: keep-all;
white-space: nowrap; white-space: nowrap;
box-sizing: border-box; box-sizing: border-box;
&:hover{
background: #0066ff;
color: #fff;
}
} }
} }

Loading…
Cancel
Save