mirror of
https://github.com/youzan/vant.git
synced 2025-10-18 09:24:25 +00:00
fix(Cascader): incorrect tabs
This commit is contained in:
@@ -27,7 +27,7 @@ export default createComponent({
|
||||
|
||||
watch: {
|
||||
options() {
|
||||
// reset options and tab
|
||||
this.updateTabs();
|
||||
},
|
||||
|
||||
value(value) {
|
||||
@@ -92,7 +92,14 @@ export default createComponent({
|
||||
return tab;
|
||||
});
|
||||
|
||||
this.activeTab = selectedOptions.length - 1;
|
||||
if (optionsCursor) {
|
||||
this.tabs.push({
|
||||
options: optionsCursor,
|
||||
selectedOption: null,
|
||||
});
|
||||
}
|
||||
|
||||
this.activeTab = this.tabs.length - 1;
|
||||
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user