diff --git a/src/layout/theme/element-plus.ts b/src/layout/theme/element-plus.ts index f6597ea2f..5e9333b47 100644 --- a/src/layout/theme/element-plus.ts +++ b/src/layout/theme/element-plus.ts @@ -26,7 +26,9 @@ export const writeNewStyle = (newStyle: string): void => { }; // 根据主题色,生成最新的样式表 -export const createNewStyle = (primaryStyle: string): string => { +export const createNewStyle = ( + primaryStyle: Record +): Record => { // 根据主色生成色值表 const colors = createColors(primaryStyle); // 在当前ep的默认样式表中标记需要替换的色值 @@ -41,7 +43,9 @@ export const createNewStyle = (primaryStyle: string): string => { return cssText; }; -export const createColors = (primary: string) => { +export const createColors = ( + primary: Record +): Record => { if (!primary) return; const colors = { primary @@ -53,7 +57,7 @@ export const createColors = (primary: string) => { return colors; }; -const getStyleTemplate = (data: string): string => { +const getStyleTemplate = (data: Record): Record => { const colorMap = { "#3a8ee6": "shade-1", "#409eff": "primary",