mirror of
https://github.com/youzan/vant.git
synced 2025-10-17 00:14:18 +00:00
fix: field 计算autosize,需要nextTick (#78)
* textarea sizeAdjust 需要nextTick * fix field unit test
This commit is contained in:
@@ -120,10 +120,10 @@ describe('Field', () => {
|
||||
textarea.trigger('input');
|
||||
|
||||
wrapper.update();
|
||||
wrapper.vm.$nextTick(() => {
|
||||
setTimeout(() => {
|
||||
expect(wrapper.data().currentValue).to.equal('test');
|
||||
expect(textareaElement.style.height).to.equal((textareaElement.scrollHeight - textAreaDiff) + 'px');
|
||||
done();
|
||||
});
|
||||
}, 500);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user