工作总结

84 阅读1分钟

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');
              }}

关于性能优化:

  1. 减少dom的渲染
  2. 减少并发请求
  3. 或者将重要的请求放在最前面