fix(field): always set value after input (#3313)

fix #3297
This commit is contained in:
rex 2020-06-24 15:55:27 +08:00 committed by GitHub
parent 978b59650c
commit b7ded1282f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,6 @@
import { VantComponent } from '../common/component';
import { Weapp } from 'definitions/weapp';
import { commonProps, inputProps, textareaProps } from './props';
import { canIUseModel } from '../common/version';
VantComponent({
field: true,
@ -122,9 +121,7 @@ VantComponent({
},
emitChange() {
if (canIUseModel()) {
this.setData({ value: this.value });
}
this.setData({ value: this.value });
wx.nextTick(() => {
this.$emit('input', this.value);