修改主题样式设置

This commit is contained in:
izory
2021-10-09 15:14:34 +08:00
parent 077e05ca36
commit 6dcfd0e855
9 changed files with 61 additions and 34 deletions

View File

@@ -42,6 +42,7 @@ export default {
methods: {
async setTheme(val) {
console.log('%c setTheme Color','color:' + val)
const oldVal = this.chalk ? this.theme : ORIGINAL_THEME
if (typeof val !== 'string') return
const themeCluster = this.getThemeCluster(val.replace('#', ''))

View File

@@ -8,7 +8,7 @@
</template>
<!-- 顶部菜单超出数量折叠 -->
<el-submenu index="more" v-if="topMenus.length > visibleNumber">
<el-submenu :style="{'--theme': theme}" index="more" v-if="topMenus.length > visibleNumber">
<template slot="title">更多菜单</template>
<template v-for="(item, index) in topMenus">
<el-menu-item :index="item.path" :key="index" v-if="index >= visibleNumber">