mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
[bugfix] Field: Modified value invalid
This commit is contained in:
parent
9a3438e891
commit
0601001950
@ -37,9 +37,15 @@ VantComponent({
|
|||||||
},
|
},
|
||||||
|
|
||||||
onCancel() {
|
onCancel() {
|
||||||
|
/**
|
||||||
|
* 修复修改输入框值时,输入框失焦和赋值同时触发,赋值失效
|
||||||
|
* // https://github.com/youzan/vant-weapp/issues/1768
|
||||||
|
*/
|
||||||
|
setTimeout(() => {
|
||||||
this.set({ value: '' });
|
this.set({ value: '' });
|
||||||
this.$emit('cancel');
|
this.$emit('cancel');
|
||||||
this.$emit('change', '');
|
this.$emit('change', '');
|
||||||
|
}, 200);
|
||||||
},
|
},
|
||||||
|
|
||||||
onSearch() {
|
onSearch() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user