fix: textarea scroll bar, deactive count message

This commit is contained in:
jialin
2025-10-21 13:24:21 +08:00
parent 32ad9525a6
commit ccb6e72057
10 changed files with 52 additions and 18 deletions
+4 -2
View File
@@ -24,6 +24,7 @@ const LabelWrapper = styled.div.attrs({
interface InputTextareaProps extends TextAreaProps {
scaleSize?: boolean;
alwaysFocus?: boolean;
}
const SealTextArea: React.FC<InputTextareaProps & SealFormItemProps> = (
@@ -45,6 +46,7 @@ const SealTextArea: React.FC<InputTextareaProps & SealFormItemProps> = (
addAfter,
trim,
scaleSize,
alwaysFocus,
...rest
} = props;
const [isFocus, setIsFocus] = useState(false);
@@ -119,7 +121,7 @@ const SealTextArea: React.FC<InputTextareaProps & SealFormItemProps> = (
<Wrapper
status={status}
label={<LabelWrapper>{label}</LabelWrapper>}
isFocus={isFocus}
isFocus={alwaysFocus || isFocus}
required={required}
description={description}
className="seal-textarea-wrapper"
@@ -134,7 +136,7 @@ const SealTextArea: React.FC<InputTextareaProps & SealFormItemProps> = (
spellCheck={rest.spellCheck ?? false}
autoSize={autoSize}
ref={inputRef}
style={{ minHeight: '80px', ...style }}
style={{ ...style }}
className="seal-textarea"
onFocus={handleOnFocus}
onBlur={handleOnBlur}
@@ -163,6 +163,12 @@ const InputWrapper = styled.div`
.seal-textarea-wrapper {
height: auto;
padding-right: 10px;
.ant-input-outlined {
height: auto !important;
}
textarea {
overflow-y: auto !important;
}
}
.ant-input-textarea-allow-clear.ant-input-affix-wrapper {
padding: 0;