修改文本域长度
This commit is contained in:
@@ -29,8 +29,10 @@ const TextareaTag: React.FC<TextareaTagProps> = ({
|
||||
// 处理文本输入变化
|
||||
const handleTextChange = useCallback((val: string) => {
|
||||
console.log(val,'e.detail.value')
|
||||
onChange({...value, description: val})
|
||||
}, [onChange])
|
||||
const maxAllowedLength = Math.floor(maxLength * 1.2)
|
||||
const truncatedVal = val.length > maxAllowedLength ? val.slice(0, maxAllowedLength) : val
|
||||
onChange({...value, description: truncatedVal})
|
||||
}, [onChange, maxLength, value])
|
||||
|
||||
// 处理标签选择变化
|
||||
const handleTagChange = useCallback((selectedTags: string[]) => {
|
||||
|
||||
Reference in New Issue
Block a user