侧边栏样式调整 (#1102)

* 添加侧边栏样式,增加变量配置,方便自定义主题

* 控制侧边栏二层传递样式
This commit is contained in:
奇淼(piexlmax
2022-05-28 23:59:09 +08:00
committed by GitHub
parent b0656e70b8
commit 72e11a7d31
5 changed files with 208 additions and 28 deletions
@@ -1,7 +1,19 @@
<template>
<component :is="menuComponent" v-if="!routerInfo.hidden" :router-info="routerInfo">
<component
:is="menuComponent"
v-if="!routerInfo.hidden"
:is-collapse="isCollapse"
:theme="theme"
:router-info="routerInfo"
>
<template v-if="routerInfo.children&&routerInfo.children.length">
<AsideComponent v-for="item in routerInfo.children" :key="item.name" :router-info="item" />
<AsideComponent
v-for="item in routerInfo.children"
:key="item.name"
:is-collapse="false"
:router-info="item"
:theme="theme"
/>
</template>
</component>
</template>
@@ -21,6 +33,18 @@ const props = defineProps({
type: Object,
default: () => null,
},
isCollapse: {
default: function() {
return false
},
type: Boolean
},
theme: {
default: function() {
return {}
},
type: Object
}
})
const menuComponent = computed(() => {