Skip to content

Commit 38e5cd1

Browse files
committed
fix(form): fix LigthFilter close icon style error
close #7089
1 parent 278a2eb commit 38e5cd1

File tree

5 files changed

+56
-56
lines changed

5 files changed

+56
-56
lines changed

packages/utils/src/components/FieldLabel/index.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CloseOutlined, DownOutlined } from '@ant-design/icons';
1+
import { CloseCircleFilled, DownOutlined } from '@ant-design/icons';
22
import { useIntl } from '@ant-design/pro-provider';
33
import { ConfigProvider } from 'antd';
44
import type { SizeType } from 'antd/lib/config-provider/SizeContext';
@@ -164,7 +164,7 @@ const FieldLabelFunction: React.ForwardRefRenderFunction<
164164
>
165165
{getTextByValue(label, value)}
166166
{(value || value === 0) && allowClear && (
167-
<CloseOutlined
167+
<CloseCircleFilled
168168
role="button"
169169
title={intl.getMessage('form.lightFilter.clear', '清除')}
170170
className={classNames(
@@ -182,7 +182,11 @@ const FieldLabelFunction: React.ForwardRefRenderFunction<
182182
{downIcon !== false
183183
? downIcon ?? (
184184
<DownOutlined
185-
className={classNames(`${prefixCls}-icon`, `${prefixCls}-arrow`)}
185+
className={classNames(
186+
`${prefixCls}-icon`,
187+
hashId,
188+
`${prefixCls}-arrow`,
189+
)}
186190
/>
187191
)
188192
: null}

packages/utils/src/components/FieldLabel/style.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const genProStyle: GenerateStyle<ProToken> = (token) => {
2323
},
2424
'&-active': {
2525
paddingBlock: 0,
26-
paddingInline: 12,
26+
paddingInline: 8,
2727
backgroundColor: token.colorBgTextHover,
2828
[`&${token.componentCls}-allow-clear:hover:not(${token.componentCls}-disabled)`]:
2929
{
@@ -39,17 +39,13 @@ const genProStyle: GenerateStyle<ProToken> = (token) => {
3939
paddingBlock: 1,
4040
paddingInline: 1,
4141
color: token.colorIcon,
42-
fontSize: '12px',
42+
fontSize: 14,
4343
verticalAlign: 'middle',
4444
[`&${token.componentCls}-close`]: {
4545
display: 'none',
46-
height: 1,
4746
alignItems: 'center',
4847
justifyContent: 'center',
49-
width: 12,
50-
color: token.colorBgContainer,
51-
fontSize: 8,
52-
backgroundColor: token.colorTextPlaceholder,
48+
color: token.colorTextPlaceholder,
5349
borderRadius: '50%',
5450
'&:hover': {
5551
color: token.colorIcon,
@@ -87,7 +83,7 @@ const genProStyle: GenerateStyle<ProToken> = (token) => {
8783
'&-bordered': {
8884
height: '32px',
8985
paddingBlock: 0,
90-
paddingInline: 12,
86+
paddingInline: 8,
9187
border: `${token.lineWidth}px solid ${token.colorBorder}`,
9288
borderRadius: '@border-radius-base',
9389
},

0 commit comments

Comments
 (0)