diff --git a/src/form/Form.tsx b/src/form/Form.tsx index bb018f7..3a92149 100755 --- a/src/form/Form.tsx +++ b/src/form/Form.tsx @@ -142,7 +142,7 @@ export interface ValidateFieldsOptions { // function create export interface WrappedFormUtils { /** 获取一组输入控件的值,如不传入参数,则获取全部组件的值 */ - getFieldsValue(fieldNames?: string[]): { [field: string]: any }; + getFieldsValue(fieldNames?: string[]): Record; /** 获取一个输入控件的值 */ getFieldValue(fieldName: string): any; /** 设置一组输入控件的值 */ diff --git a/src/form/interface.ts b/src/form/interface.ts index 9b67f7d..8f8e28b 100644 --- a/src/form/interface.ts +++ b/src/form/interface.ts @@ -50,9 +50,7 @@ interface FORWARD_REF_STATICS { type NonReactStatics< S extends React.ComponentType, - C extends { - [key: string]: true; - } = {} + C extends Record = {} > = { [key in Exclude< keyof S, diff --git a/src/icon/index.tsx b/src/icon/index.tsx index 873e2d5..f0b934c 100644 --- a/src/icon/index.tsx +++ b/src/icon/index.tsx @@ -62,9 +62,7 @@ export interface IconComponent

extends React.FC

{ setTwoToneColor: typeof setTwoToneColor; } -const iconsMap: { - [key: string]: any; -} = allIcons; +const iconsMap: Record = allIcons; const LegacyTypeIcon: React.FC = props => { const { type, theme } = props; diff --git a/src/theme/dark.ts b/src/theme/dark.ts index 063f029..cdcd9f4 100644 --- a/src/theme/dark.ts +++ b/src/theme/dark.ts @@ -62,6 +62,10 @@ const generateNeutralColorPalettes: GenerateNeutralColorMap = ( colorBorder: getSolidColor(colorBgBase, 26), colorBorderSecondary: getSolidColor(colorBgBase, 19), colorSplit: getAlphaColor(colorTextBase, 0.12), + + colorBgSolid: getAlphaColor(colorTextBase, 0.95), + colorBgSolidHover: getAlphaColor(colorTextBase, 1), + colorBgSolidActive: getAlphaColor(colorTextBase, 0.9), }; }; diff --git a/src/theme/default.ts b/src/theme/default.ts index c754390..0027d46 100644 --- a/src/theme/default.ts +++ b/src/theme/default.ts @@ -62,6 +62,10 @@ const generateNeutralColorPalettes: GenerateNeutralColorMap = ( colorBorder: getSolidColor(colorBgBase, 15), colorBorderSecondary: getSolidColor(colorBgBase, 6), colorSplit: getAlphaColor(colorTextBase, 0.06), + + colorBgSolid: getAlphaColor(colorTextBase, 1), + colorBgSolidHover: getAlphaColor(colorTextBase, 0.75), + colorBgSolidActive: getAlphaColor(colorTextBase, 0.95), }; };