|
|
@ -1,6 +1,5 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div :class="`${prefixCls}-dom`" :style="getDomStyle"></div> |
|
|
<div :class="`${prefixCls}-dom`" :style="getDomStyle"></div> |
|
|
|
|
|
|
|
|
<div |
|
|
<div |
|
|
v-click-outside="handleClickOutside" |
|
|
v-click-outside="handleClickOutside" |
|
|
:style="getWrapStyle" |
|
|
:style="getWrapStyle" |
|
|
@ -27,15 +26,15 @@ |
|
|
[`${prefixCls}-module__item--active`]: item.path === activePath, |
|
|
[`${prefixCls}-module__item--active`]: item.path === activePath, |
|
|
}, |
|
|
}, |
|
|
]" |
|
|
]" |
|
|
|
|
|
v-bind="getItemEvents(item)" |
|
|
v-for="item in menuModules" |
|
|
v-for="item in menuModules" |
|
|
:key="item.path" |
|
|
:key="item.path" |
|
|
v-bind="getItemEvents(item)" |
|
|
|
|
|
> |
|
|
> |
|
|
<MenuTag :item="item" :showTitle="false" :isHorizontal="false" /> |
|
|
<SimpleMenuTag :item="item" collapseParent dot /> |
|
|
<Icon |
|
|
<Icon |
|
|
:class="`${prefixCls}-module__icon`" |
|
|
:class="`${prefixCls}-module__icon`" |
|
|
:size="getCollapsed ? 16 : 20" |
|
|
:size="getCollapsed ? 16 : 20" |
|
|
:icon="item.meta && item.meta.icon" |
|
|
:icon="item.icon || (item.meta && item.meta.icon)" |
|
|
/> |
|
|
/> |
|
|
<p :class="`${prefixCls}-module__name`"> |
|
|
<p :class="`${prefixCls}-module__name`"> |
|
|
{{ t(item.name) }} |
|
|
{{ t(item.name) }} |
|
|
@ -85,8 +84,8 @@ |
|
|
|
|
|
|
|
|
import { defineComponent, onMounted, ref, computed, unref } from 'vue'; |
|
|
import { defineComponent, onMounted, ref, computed, unref } from 'vue'; |
|
|
|
|
|
|
|
|
import { MenuTag } from '/@/components/Menu'; |
|
|
|
|
|
import { ScrollContainer } from '/@/components/Container'; |
|
|
import { ScrollContainer } from '/@/components/Container'; |
|
|
|
|
|
import { SimpleMenuTag } from '/@/components/SimpleMenu'; |
|
|
import Icon from '/@/components/Icon'; |
|
|
import Icon from '/@/components/Icon'; |
|
|
import { AppLogo } from '/@/components/Application'; |
|
|
import { AppLogo } from '/@/components/Application'; |
|
|
import Trigger from '../trigger/HeaderTrigger.vue'; |
|
|
import Trigger from '../trigger/HeaderTrigger.vue'; |
|
|
@ -111,9 +110,9 @@ |
|
|
ScrollContainer, |
|
|
ScrollContainer, |
|
|
AppLogo, |
|
|
AppLogo, |
|
|
SimpleMenu, |
|
|
SimpleMenu, |
|
|
MenuTag, |
|
|
|
|
|
Icon, |
|
|
Icon, |
|
|
Trigger, |
|
|
Trigger, |
|
|
|
|
|
SimpleMenuTag, |
|
|
}, |
|
|
}, |
|
|
directives: { |
|
|
directives: { |
|
|
clickOutside, |
|
|
clickOutside, |
|
|
@ -337,8 +336,6 @@ |
|
|
</script> |
|
|
</script> |
|
|
<style lang="less"> |
|
|
<style lang="less"> |
|
|
@prefix-cls: ~'@{namespace}-layout-mix-sider'; |
|
|
@prefix-cls: ~'@{namespace}-layout-mix-sider'; |
|
|
@tag-prefix-cls: ~'@{namespace}-basic-menu-item-tag'; |
|
|
|
|
|
@menu-prefix-cls: ~'@{namespace}-menu'; |
|
|
|
|
|
@width: 80px; |
|
|
@width: 80px; |
|
|
.@{prefix-cls} { |
|
|
.@{prefix-cls} { |
|
|
position: fixed; |
|
|
position: fixed; |
|
|
@ -349,15 +346,6 @@ |
|
|
overflow: hidden; |
|
|
overflow: hidden; |
|
|
background: @sider-dark-bg-color; |
|
|
background: @sider-dark-bg-color; |
|
|
transition: all 0.2s ease 0s; |
|
|
transition: all 0.2s ease 0s; |
|
|
.@{tag-prefix-cls} { |
|
|
|
|
|
position: absolute; |
|
|
|
|
|
top: 6px; |
|
|
|
|
|
right: 2px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.@{menu-prefix-cls} { |
|
|
|
|
|
width: 100% !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
&-dom { |
|
|
&-dom { |
|
|
height: 100%; |
|
|
height: 100%; |
|
|
@ -420,7 +408,7 @@ |
|
|
&.dark { |
|
|
&.dark { |
|
|
&.open { |
|
|
&.open { |
|
|
.@{prefix-cls}-logo { |
|
|
.@{prefix-cls}-logo { |
|
|
border-bottom: 1px solid @border-color; |
|
|
// border-bottom: 1px solid @border-color; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
> .scrollbar { |
|
|
> .scrollbar { |
|
|
@ -524,16 +512,6 @@ |
|
|
height: calc(100%); |
|
|
height: calc(100%); |
|
|
background: #fff; |
|
|
background: #fff; |
|
|
transition: all 0.2s; |
|
|
transition: all 0.2s; |
|
|
.@{tag-prefix-cls} { |
|
|
|
|
|
position: absolute; |
|
|
|
|
|
top: 10px; |
|
|
|
|
|
right: 30px; |
|
|
|
|
|
|
|
|
|
|
|
&--dot { |
|
|
|
|
|
top: 50%; |
|
|
|
|
|
margin-top: -3px; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
&__title { |
|
|
&__title { |
|
|
display: flex; |
|
|
display: flex; |
|
|
|