|
@@ -1,49 +1,16 @@
|
|
|
<!--左侧二级菜单树-->
|
|
|
<template>
|
|
|
<div class="sub-menu-main">
|
|
|
- <template v-for="(item, index) in $store.state.menu.subMenuRouter">
|
|
|
- <template v-if="isExpend">
|
|
|
- <div class="smm-parent">
|
|
|
- <div class="p-item __hover" :class="{current: item.name === $route.name}" @click="item.children?.length > 0 ? item.expend = !item.expend : toSubMenu(item)">
|
|
|
- <SvgIcon class="menu-logo" name="menu-mock" size="18" color="#ffffff" rotate="90"/>
|
|
|
+ <div class="sub-menu-main-content">
|
|
|
+ <template v-for="(item, index) in $store.state.menu.subMenuRouter">
|
|
|
+ <div class="sub-menu-item __hover" :class="{active: item.name === $route.name}" @click="toSubMenu(item)">
|
|
|
+ <div class="sub-menu-item-content">
|
|
|
+ <div class="icon"/>
|
|
|
{{item.meta.title}}
|
|
|
- <SvgIcon class="menu-expend" name="arrow_2" size="12" color="#ffffff" :class="{active: item.expend}" v-if="item.children?.length > 0"/>
|
|
|
- </div>
|
|
|
- <div class="smm-son" v-if="item.children?.length > 0 && item.expend">
|
|
|
- <template v-for="(subItem, subIndex) in item.children">
|
|
|
- <div class="s-item __hover" :class="{current: subItem.name === $route.name}" @click="toSubMenu(subItem)">
|
|
|
- {{subItem.meta.title}}
|
|
|
- </div>
|
|
|
- </template>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
- <template v-else>
|
|
|
- <template v-if="item.children?.length > 0">
|
|
|
- <el-popover placement="right" :teleported="false" popper-class="smm-parent-son">
|
|
|
- <template #reference>
|
|
|
- <div class="smm-parent-not-expend __hover" :class="{current: item.name === $route.name || item.children?.some(v => v.name === $route.name)}" @click="toSubMenu(item)">
|
|
|
- <SvgIcon class="menu-logo" name="menu-mock" size="18" color="#ffffff"/>
|
|
|
-<!-- <SvgIcon class="menu-expend" name="arrow_2" size="12" color="#ffffff" :class="{active: item.expend}" v-if="item.children?.length > 0"/>-->
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <div class="smm-son">
|
|
|
- <template v-for="(subItem, subIndex) in item.children">
|
|
|
- <div class="s-item __hover" :class="{current: subItem.name === $route.name}" @click="toSubMenu(subItem)">
|
|
|
- {{subItem.meta.title}}
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </div>
|
|
|
- </el-popover>
|
|
|
- </template>
|
|
|
- <template v-else>
|
|
|
- <div class="smm-parent-not-expend __hover" :class="{current: item.name === $route.name || item.children?.some(v => v.name === $route.name)}" @click="toSubMenu(item)">
|
|
|
- <SvgIcon class="menu-logo" name="menu-mock" size="18" color="#ffffff"/>
|
|
|
-<!-- <SvgIcon class="menu-expend" name="arrow_2" size="12" color="#ffffff" :class="{active: item.expend}" v-if="item.children?.length > 0"/>-->
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </template>
|
|
|
- </template>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -68,7 +35,6 @@ export default defineComponent({
|
|
|
name: '',
|
|
|
components: {},
|
|
|
props: {
|
|
|
- isExpend: {}
|
|
|
},
|
|
|
setup() {
|
|
|
const store = useStore();
|
|
@@ -101,82 +67,69 @@ export default defineComponent({
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
- .current {
|
|
|
- background-color: #0062E9;
|
|
|
- }
|
|
|
.sub-menu-main {
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- overflow-y: auto;
|
|
|
- background: linear-gradient(0deg, #021D78 0%, #0F44B6 100%);
|
|
|
- padding-top: 13px;
|
|
|
- .smm-parent {
|
|
|
- .p-item {
|
|
|
+ width: 290px;
|
|
|
+ height: 918px;
|
|
|
+ background-image: url("@/assets/images/layout/sub-menu_bg.png");
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ background-size: 100% auto;
|
|
|
+ position: relative;
|
|
|
+ .sub-menu-main-content {
|
|
|
+ position: absolute;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ top: 172px;
|
|
|
+ left: 30px;
|
|
|
+ .sub-menu-item {
|
|
|
+ width: 185px;
|
|
|
+ height: 66px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- height: 44px;
|
|
|
- line-height: 1;
|
|
|
- user-select: none;
|
|
|
- font-size: 14px;
|
|
|
- font-family: Microsoft YaHei;
|
|
|
- font-weight: 400;
|
|
|
- color: #FFFFFF;
|
|
|
- .menu-logo {
|
|
|
- margin: 0 13px 0 15px;
|
|
|
+ position: relative;
|
|
|
+ &:after {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ bottom: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 2px;
|
|
|
+ background: linear-gradient(270deg, rgba(51,146,255,0) 0%, #3392FF 51%, rgba(51,146,255,0) 100%);
|
|
|
}
|
|
|
- .menu-expend {
|
|
|
- margin: 0 12px 0 auto;
|
|
|
- transition: 0.2s;
|
|
|
- &.active {
|
|
|
- transform: rotate(90deg) !important;
|
|
|
+ &.active {
|
|
|
+ &:before {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ width: 167px;
|
|
|
+ height: 42px;
|
|
|
+ background: linear-gradient(90deg, rgba(0,242,254,0) 0%, #00F2FE 39%, #00F2FE 61%, rgba(0,242,254,0) 95%);
|
|
|
+ z-index: 1;
|
|
|
+ opacity: 0.4;
|
|
|
+ }
|
|
|
+ .sub-menu-item-content {
|
|
|
+ text-shadow: 0px 2px 4px rgba(0,0,0,0.4);
|
|
|
+ color: #FFFFFF;
|
|
|
+ .icon {
|
|
|
+ background-color: #75fbff;
|
|
|
+ box-shadow: 0px 0px 20px 3px #75fbff;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- .smm-son {
|
|
|
- .s-item {
|
|
|
- height: 44px;
|
|
|
- padding-left: 46px;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- line-height: 1.2;
|
|
|
- user-select: none;
|
|
|
- font-size: 14px;
|
|
|
- font-family: Microsoft YaHei;
|
|
|
- font-weight: 400;
|
|
|
- color: #FFFFFF;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- .smm-parent-not-expend {
|
|
|
- height: 44px;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- .menu-logo {
|
|
|
- margin: 0 13px 0 15px;
|
|
|
- }
|
|
|
- }
|
|
|
- :deep(.smm-parent-son) {
|
|
|
- background: #0a369f;
|
|
|
- border: none;
|
|
|
- padding: 0;
|
|
|
- width: auto !important;
|
|
|
- min-width: 0;
|
|
|
- .el-popper__arrow::before {
|
|
|
- background: #0a369f;
|
|
|
- border-color: #0a369f;
|
|
|
- }
|
|
|
- .smm-son {
|
|
|
- .s-item {
|
|
|
- padding: 0 20px;
|
|
|
- height: 44px;
|
|
|
+ .sub-menu-item-content {
|
|
|
+ height: 42px;
|
|
|
+ font-size: 20px;
|
|
|
+ font-family: Microsoft YaHei-Bold, Microsoft YaHei;
|
|
|
+ font-weight: bold;
|
|
|
+ color: rgba(255,255,255,0.5);
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- line-height: 1.2;
|
|
|
- user-select: none;
|
|
|
- font-size: 14px;
|
|
|
- font-family: Microsoft YaHei;
|
|
|
- font-weight: 400;
|
|
|
- color: #FFFFFF;
|
|
|
+ padding-left: 30px;
|
|
|
+ z-index: 2;
|
|
|
+ .icon {
|
|
|
+ width: 16px;
|
|
|
+ height: 16px;
|
|
|
+ background-color: rgba(42, 187, 255, 0.3);
|
|
|
+ margin-right: 10px;
|
|
|
+ transform: rotate(45deg);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|