mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
fix(components): 修复按钮Tab自适应主题颜色
This commit is contained in:
@ -3,10 +3,17 @@ import type { GlobalThemeOverrides } from 'naive-ui';
|
||||
import { themeSettings, defaultThemeSettings } from '@/settings';
|
||||
import { store } from '@/store';
|
||||
import type { ThemeSettings, NavMode, MultiTabMode, AnimateType, HorizontalMenuPosition } from '@/interface';
|
||||
import { shallowColor } from '@/utils';
|
||||
import { getHoverAndPressedColor } from './helpers';
|
||||
|
||||
type ThemeState = ThemeSettings;
|
||||
|
||||
interface relativeThemeColor {
|
||||
hover: string;
|
||||
pressed: string;
|
||||
shallow: string;
|
||||
}
|
||||
|
||||
const themeStore = defineStore({
|
||||
id: 'theme-store',
|
||||
state: (): ThemeState => ({
|
||||
@ -51,6 +58,13 @@ const themeStore = defineStore({
|
||||
}
|
||||
};
|
||||
},
|
||||
relativeThemeColor(): relativeThemeColor {
|
||||
const shallow = shallowColor(this.themeColor, 0.1);
|
||||
return {
|
||||
...getHoverAndPressedColor(this.themeColor),
|
||||
shallow
|
||||
};
|
||||
},
|
||||
isVerticalNav(): boolean {
|
||||
const { mode } = this.navStyle;
|
||||
return mode === 'vertical' || mode === 'vertical-mix';
|
||||
|
Reference in New Issue
Block a user