1
0
mirror of https://gitee.com/vant-contrib/vant-weapp.git synced 2025-04-06 03:58:05 +08:00

fix(picker): recover emit ()

fix 
This commit is contained in:
rex 2020-11-12 22:23:49 +08:00 committed by GitHub
parent d64960d442
commit 805d426dca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -53,6 +53,21 @@ VantComponent({
return Promise.all(stack);
},
emit(event: WechatMiniprogram.TouchEvent) {
const { type } = event.currentTarget.dataset;
if (this.simple) {
this.$emit(type, {
value: this.getColumnValue(0),
index: this.getColumnIndex(0),
});
} else {
this.$emit(type, {
value: this.getValues(),
index: this.getIndexes(),
});
}
},
onChange(event: WechatMiniprogram.CustomEvent) {
if (this.simple) {
this.$emit('change', {