fix: fix conditional tabs not rerendering
This commit is contained in:
parent
5772117dc8
commit
47b341d50e
1 changed files with 10 additions and 0 deletions
|
|
@ -74,6 +74,16 @@ export default defineComponent({
|
|||
}
|
||||
},
|
||||
|
||||
updated() {
|
||||
const candidates = this.$children.filter(
|
||||
(child) => child.$options.name === "SmartTab"
|
||||
)
|
||||
|
||||
if (candidates.length !== this.tabs.length) {
|
||||
this.tabs = candidates
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.tabs = this.$children.filter(
|
||||
(child) => child.$options.name === "SmartTab"
|
||||
|
|
|
|||
Loading…
Reference in a new issue