侧边栏样式调整 (#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
@@ -17,12 +17,49 @@ export default {
</script>
<script setup>
defineProps({
import { ref, watch } from 'vue'
const props = defineProps({
routerInfo: {
default: function() {
return null
},
type: Object
},
isCollapse: {
default: function() {
return false
},
type: Boolean
},
theme: {
default: function() {
return {}
},
type: Object
}
})
// const activeBackground = ref(props.theme.activeBackground)
// const activeText = ref(props.theme.activeText)
const normalText = ref(props.theme.normalText)
// const hoverBackground = ref(props.theme.hoverBackground)
// const hoverText = ref(props.theme.hoverText)
watch(() => props.theme, () => {
// activeBackground.value = props.theme.activeBackground
// activeText.value = props.theme.activeText
normalText.value = props.theme.normalText
// hoverBackground.value = props.theme.hoverBackground
// hoverText.value = props.theme.hoverText
})
</script>
<style lang="scss" scoped>
.el-sub-menu{
::v-deep(.el-sub-menu__title){
color: v-bind(normalText);
}
}
</style>