chore(deps): upgrade antd to v6

This commit is contained in:
jialin
2026-01-06 17:21:32 +08:00
parent b2f5eb8850
commit 17de9d98f4
69 changed files with 2490 additions and 2657 deletions
+2 -5
View File
@@ -32,6 +32,7 @@ const SealAutoComplete: React.FC<
loading,
allowClear,
clearSpaceOnBlur,
showSearch,
...rest
} = props;
const [isFocus, setIsFocus] = useState(false);
@@ -83,10 +84,6 @@ const SealAutoComplete: React.FC<
props.onBlur?.(e);
};
const handleSearch = (text: string) => {
props.onSearch?.(text);
};
const handleOnSelect = (value: any, option: any) => {
onSelect?.(value, option);
};
@@ -146,7 +143,7 @@ const SealAutoComplete: React.FC<
onSelect={handleOnSelect}
onFocus={handleOnFocus}
onBlur={handleOnBlur}
onSearch={handleSearch}
showSearch={showSearch}
onChange={handleChange}
popupRender={popupRender}
onInput={handleOnInput}
+3 -2
View File
@@ -146,9 +146,10 @@ const SealCascader: React.FC<
};
const handleOnBlur = (e: any) => {
if (allowNull && props.value === null) {
const noVal = !props.value || props.value.length === 0;
if (allowNull && noVal) {
setIsFocus(true);
} else if (!props.value) {
} else if (noVal) {
setIsFocus(false);
}
props.onBlur?.(e);
+2
View File
@@ -24,6 +24,7 @@ const SealSelect: React.FC<
isInFormItems = true,
notFoundContent = null,
loading,
footer,
...rest
} = props;
const intl = useIntl();
@@ -106,6 +107,7 @@ const SealSelect: React.FC<
>
<BaseSelect
{...rest}
footer={footer}
ref={inputRef}
options={children ? null : _options}
onFocus={handleOnFocus}
+6 -4
View File
@@ -196,8 +196,8 @@ const SimpleSelect: React.FC<SelectProps & { ref?: any; showTags?: boolean }> =
};
const handleOnSearch = (value: string) => {
if (restProps.onSearch) {
restProps.onSearch(value);
if (restProps.showSearch?.onSearch) {
restProps.showSearch?.onSearch?.(value);
} else {
const filteredOptions = options?.filter((option: any) =>
option.label.toLowerCase().includes(value.toLowerCase())
@@ -268,8 +268,10 @@ const SimpleSelect: React.FC<SelectProps & { ref?: any; showTags?: boolean }> =
tagRender={TagRender}
onBlur={handleOnBlur}
onFocus={handleOnFocus}
onSearch={handleOnSearch}
filterOption={filterOption}
showSearch={{
onSearch: handleOnSearch,
filterOption: restProps.showSearch?.filterOption || filterOption
}}
onOpenChange={handleOnOpenChange}
>
{props.children}
@@ -1,5 +0,0 @@
:local(.dropdown-visible) {
:local(.ant-select-selector) {
border-bottom: 0 !important;
}
}
@@ -160,6 +160,9 @@ const InputWrapper = styled.div`
top: 0;
height: ${WRAPHEIGHT - 2}px;
}
.ant-input-number-actions {
border-radius: 0 ${BORDERRADIUS}px ${BORDERRADIUS}px 0;
}
.seal-textarea-wrapper {
height: auto;
padding-right: 10px;
+27 -45
View File
@@ -8,10 +8,11 @@ const SelectWrapper = styled.div`
&.dropdown-visible {
.__wrapper__ {
.ant-select-selector {
.ant-cascader.ant-select.ant-select-outlined {
border-bottom: none !important;
border-radius: ${BORDERRADIUS}px ${BORDERRADIUS}px 0 0;
transition: all 0.2s ease;
box-shadow: none;
&::before {
content: '';
@@ -79,12 +80,14 @@ const SelectWrapper = styled.div`
top: 50%;
}
.ant-select-selector {
padding-block-start: 0 !important;
.ant-select .ant-select-input {
top: 5px !important;
}
.ant-select .ant-select-selection-search {
top: 10px !important;
.ant-select-placeholder {
position: absolute;
top: 10px;
left: 0;
right: 0;
}
}
}
@@ -96,6 +99,7 @@ const SelectWrapper = styled.div`
display: flex;
align-items: center;
height: 54px;
padding-inline: 14px !important;
.ant-select-selection-wrap {
height: 100%;
@@ -109,23 +113,25 @@ const SelectWrapper = styled.div`
&.ant-select-multiple.ant-cascader .ant-select-selection-search {
top: 0 !important;
}
}
.ant-select-selector {
flex: 1;
padding-inline: ${INPUT_INNER_PADDING}px !important;
border-width: var(--ant-line-width);
border-style: var(--ant-line-type);
border-color: var(--ant-color-border);
border-radius: ${BORDERRADIUS}px;
height: 54px !important;
padding-block: 20px 0 !important;
box-shadow: none !important;
.ant-select-content {
padding-block: 20px 0 !important;
box-shadow: none !important;
}
&.ant-cascader {
.ant-select-content-item-prefix + .ant-select-content-item-suffix {
margin-inline-start: 0 !important;
}
}
&:focus-within {
border-color: var(--ant-input-active-border-color) !important;
outline: 0;
background-color: var(--ant-input-active-bg);
.ant-select-input {
height: ${INPUTHEIGHT}px !important;
top: 14px !important;
}
.ant-select-placeholder {
> span {
padding-inline: 0 !important;
}
}
}
@@ -143,39 +149,15 @@ const SelectWrapper = styled.div`
padding-inline-end: 0 !important;
}
.ant-select-auto-complete .ant-select-selector {
padding-inline: 0 !important;
flex: 1;
}
.ant-select-arrow {
top: 32px;
}
.ant-select-outlined.ant-select-disabled:not(.ant-select-customize-input)
.ant-select-selector {
background-color: transparent;
}
.ant-select-selection-search-input {
height: ${INPUTHEIGHT}px !important;
}
&.validate-status-error {
.ant-select-selector {
border-width: var(--ant-line-width) !important;
border-style: var(--ant-line-type) !important;
border-color: var(--ant-color-error) !important;
&:hover {
border-color: var(--ant-color-error-border-hover) !important;
}
&:focus-within {
border-color: var(--ant-color-error) !important;
}
}
&.dropdown-visible {
.ant-select-dropdown {
border-color: var(--ant-color-error) !important;