我正在使用react semantic ui textarea,我想根据其内容设置宽度。最小宽度没有帮助。有任何想法吗?
<Textarea
key={idx}
defaultValue={formattedText}
className="customInput"
maxLength="100"
name={idx}
onChange={e => this.handleChange(e)}
/>
您可以在下面的vue中绑定样式attr
<Textarea :style="widthContent"/>
export default {
computed:{
widthContent(){
//caculate your width here
return {width: ...px}
}
}
}