fix(Cascader): incorrect tabs

This commit is contained in:
chenjiahan 2020-12-20 19:50:19 +08:00 committed by neverland
parent a05da0644b
commit 04d6561315

View File

@ -27,7 +27,7 @@ export default createComponent({
watch: { watch: {
options() { options() {
// reset options and tab this.updateTabs();
}, },
value(value) { value(value) {
@ -92,7 +92,14 @@ export default createComponent({
return tab; return tab;
}); });
this.activeTab = selectedOptions.length - 1; if (optionsCursor) {
this.tabs.push({
options: optionsCursor,
selectedOption: null,
});
}
this.activeTab = this.tabs.length - 1;
return; return;
} }