From 9d4216e5654eeee8d4426b478a5e5eb7ba085c18 Mon Sep 17 00:00:00 2001 From: MadCcc <1075746765@qq.com> Date: Tue, 7 Feb 2023 20:58:40 +0800 Subject: [PATCH] fix: disabled DataPicker should not have status style (#40608) --- components/date-picker/style/index.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/date-picker/style/index.ts b/components/date-picker/style/index.ts index 5355b863db..8699394a47 100644 --- a/components/date-picker/style/index.ts +++ b/components/date-picker/style/index.ts @@ -869,14 +869,14 @@ const genPickerStatusStyle: GenerateStyle = (token) => { } = token; return { - [componentCls]: { - [`&-status-error${componentCls}`]: { + [`${componentCls}:not(${componentCls}-disabled)`]: { + [`&${componentCls}-status-error`]: { '&, &:not([disabled]):hover': { backgroundColor: colorBgContainer, borderColor: colorError, }, - '&-focused, &:focus': { + [`&${componentCls}-focused, &:focus`]: { ...genActiveStyle( mergeToken(token, { inputBorderActiveColor: colorError, @@ -891,13 +891,13 @@ const genPickerStatusStyle: GenerateStyle = (token) => { }, }, - [`&-status-warning${componentCls}`]: { + [`&${componentCls}-status-warning`]: { '&, &:not([disabled]):hover': { backgroundColor: colorBgContainer, borderColor: colorWarning, }, - '&-focused, &:focus': { + [`&${componentCls}-focused, &:focus`]: { ...genActiveStyle( mergeToken(token, { inputBorderActiveColor: colorWarning,