Skip to content

Commit

Permalink
fix(form): fix LigthFilter close icon style error
Browse files Browse the repository at this point in the history
close #7089
  • Loading branch information
chenshuai2144 committed May 18, 2023
1 parent 278a2eb commit 38e5cd1
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 56 deletions.
10 changes: 7 additions & 3 deletions packages/utils/src/components/FieldLabel/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CloseOutlined, DownOutlined } from '@ant-design/icons';
import { CloseCircleFilled, DownOutlined } from '@ant-design/icons';
import { useIntl } from '@ant-design/pro-provider';
import { ConfigProvider } from 'antd';
import type { SizeType } from 'antd/lib/config-provider/SizeContext';
Expand Down Expand Up @@ -164,7 +164,7 @@ const FieldLabelFunction: React.ForwardRefRenderFunction<
>
{getTextByValue(label, value)}
{(value || value === 0) && allowClear && (
<CloseOutlined
<CloseCircleFilled
role="button"
title={intl.getMessage('form.lightFilter.clear', '清除')}
className={classNames(
Expand All @@ -182,7 +182,11 @@ const FieldLabelFunction: React.ForwardRefRenderFunction<
{downIcon !== false
? downIcon ?? (
<DownOutlined
className={classNames(`${prefixCls}-icon`, `${prefixCls}-arrow`)}
className={classNames(
`${prefixCls}-icon`,
hashId,
`${prefixCls}-arrow`,
)}
/>
)
: null}
Expand Down
12 changes: 4 additions & 8 deletions packages/utils/src/components/FieldLabel/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const genProStyle: GenerateStyle<ProToken> = (token) => {
},
'&-active': {
paddingBlock: 0,
paddingInline: 12,
paddingInline: 8,
backgroundColor: token.colorBgTextHover,
[`&${token.componentCls}-allow-clear:hover:not(${token.componentCls}-disabled)`]:
{
Expand All @@ -39,17 +39,13 @@ const genProStyle: GenerateStyle<ProToken> = (token) => {
paddingBlock: 1,
paddingInline: 1,
color: token.colorIcon,
fontSize: '12px',
fontSize: 14,
verticalAlign: 'middle',
[`&${token.componentCls}-close`]: {
display: 'none',
height: 1,
alignItems: 'center',
justifyContent: 'center',
width: 12,
color: token.colorBgContainer,
fontSize: 8,
backgroundColor: token.colorTextPlaceholder,
color: token.colorTextPlaceholder,
borderRadius: '50%',
'&:hover': {
color: token.colorIcon,
Expand Down Expand Up @@ -87,7 +83,7 @@ const genProStyle: GenerateStyle<ProToken> = (token) => {
'&-bordered': {
height: '32px',
paddingBlock: 0,
paddingInline: 12,
paddingInline: 8,
border: `${token.lineWidth}px solid ${token.colorBorder}`,
borderRadius: '@border-radius-base',
},
Expand Down
Loading

0 comments on commit 38e5cd1

Please sign in to comment.