form表单initialValue可以设置初始值
对于将textarea的高度进行变化,可以在原生js dom中操作
placeholder="请输入"
value={value}
onFocus={(e) => {
e.target.setAttribute('style', 'height: 110px;min-height: 110px;max-height: 110px');
}}
onBlur={(e) => {
e.target.setAttribute('style', 'height: 76px;min-height: 76px;max-height: 76px');
}}
关于性能优化:
- 减少dom的渲染
- 减少并发请求
- 或者将重要的请求放在最前面