[bugfix] Field: Modified value invalid

This commit is contained in:
Jake 2019-07-26 10:03:37 +08:00 committed by rex
parent 9a3438e891
commit 0601001950

View File

@ -37,9 +37,15 @@ VantComponent({
}, },
onCancel() { onCancel() {
this.set({ value: '' }); /**
this.$emit('cancel'); *
this.$emit('change', ''); * // https://github.com/youzan/vant-weapp/issues/1768
*/
setTimeout(() => {
this.set({ value: '' });
this.$emit('cancel');
this.$emit('change', '');
}, 200);
}, },
onSearch() { onSearch() {