fix(Radio): fix disabled not work (#2711)

fix #2708
This commit is contained in:
rex 2020-01-22 11:44:15 +08:00 committed by GitHub
parent d6f67f083f
commit cc95c58635
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,4 @@
import { VantComponent } from '../common/component'; import { VantComponent } from '../common/component';
import { Weapp } from 'definitions/weapp';
VantComponent({ VantComponent({
field: true, field: true,
@ -44,9 +43,10 @@ VantComponent({
instance.$emit('change', value); instance.$emit('change', value);
}, },
onChange(event: Weapp.Event) { onChange() {
console.log(event); if (!this.data.disabled) {
this.emitChange(this.data.name); this.emitChange(this.data.name);
}
}, },
onClickLabel() { onClickLabel() {