fix(style): 修复黑暗模式下弹框、demo目录下、按钮样式问题 (#3208)

删除黑暗模式下冗余的样式代码
This commit is contained in:
zhang
2023-10-30 08:14:38 +08:00
committed by GitHub
parent 97f16271b1
commit 06a6c947a9
13 changed files with 313 additions and 1426 deletions

View File

@@ -7,7 +7,6 @@ import { theme } from 'ant-design-vue/lib';
import convertLegacyToken from 'ant-design-vue/lib/theme/convertLegacyToken';
const { defaultAlgorithm, defaultSeed } = theme;
const primaryColor = '#0960bd';
function generateAntColors(color: string, theme: 'default' | 'dark' = 'default') {
@@ -22,17 +21,14 @@ function generateAntColors(color: string, theme: 'default' | 'dark' = 'default')
export function generateModifyVars() {
const palettes = generateAntColors(primaryColor);
const primary = palettes[5];
const primaryColorObj: Record<string, string> = {};
for (let index = 0; index < 10; index++) {
primaryColorObj[`primary-${index + 1}`] = palettes[index];
}
// const modifyVars = getThemeVariables();
const mapToken = defaultAlgorithm(defaultSeed);
const v3Token = convertLegacyToken(mapToken);
return {
...v3Token,
// reference: Avoid repeated references
@@ -47,6 +43,5 @@ export function generateModifyVars() {
'font-size-base': '14px', // Main font size
'border-radius-base': '2px', // Component/float fillet
'link-color': primary, // Link color
'app-content-background': '#fafafa', // Link color
};
}