fixed #183
This commit is contained in:
梁灏 2017-01-10 19:29:59 +08:00
parent c211f71778
commit 2810d8c78d
3 changed files with 137 additions and 111 deletions

View file

@ -87,7 +87,8 @@
prefixCls: prefixCls,
visible: false,
selected: [],
tmpSelected: []
tmpSelected: [],
updatingValue: false // to fix set value in changeOnSelect type
};
},
computed: {
@ -162,6 +163,7 @@
});
if (!fromInit) {
this.updatingValue = true;
this.value = newVal;
this.emitValue(this.value, oldVal);
}
@ -186,7 +188,11 @@
}
},
value () {
this.updateSelected();
if (this.updatingValue) {
this.updatingValue = false;
return;
}
this.updateSelected(true);
}
}
};