mirror of
https://github.com/youzan/vant.git
synced 2025-10-18 17:51:54 +00:00
[bug fix]: tabs dynamic generate bug (#284)
This commit is contained in:
@@ -47,6 +47,19 @@ export default {
|
||||
index
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
destroyed() {
|
||||
const key = this.key;
|
||||
const tabs = this.parentGroup.tabs;
|
||||
|
||||
for (let i = 0; i < tabs.length; i++) {
|
||||
/* istanbul ignore else */
|
||||
if (tabs[i].index === key) {
|
||||
this.parentGroup.tabs.splice(i, 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user