首先监听input事件,在事件中添加下两行代码就好了,已在chrome 和移动端测试通过。
// An highlighted block
e.target.style.height = 'auto';
e.target.style.height = e.target.scrollHeight + 'px';
首先监听input事件,在事件中添加下两行代码就好了,已在chrome 和移动端测试通过。
// An highlighted block
e.target.style.height = 'auto';
e.target.style.height = e.target.scrollHeight + 'px';