textarea 组件 #8
yangxiaolu1993
started this conversation in
General
Replies: 0 comments 3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
1、使用 change 事件进行对 value 赋值,输入内容出错
<TextArea defaultValue={value1} change={change} /> const [value1, UpdateValue1] = useState('') const change = (value: string, event: Event) => { UpdateVale1(value) }
2、新增 emit 事件 demo
3、maxLength 设置为 ‘-1’ 时,则失效
4、defaultValue 设置的初始值的长度大于 maxlength 设置的长度
<TextArea defaultValue={value2} limitshow maxlength="2" /> const [value2, UpdateValue2] = useState('异步文本')
Beta Was this translation helpful? Give feedback.
All reactions