fix: fix conditional tabs not rerendering
This commit is contained in:
@@ -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() {
|
mounted() {
|
||||||
this.tabs = this.$children.filter(
|
this.tabs = this.$children.filter(
|
||||||
(child) => child.$options.name === "SmartTab"
|
(child) => child.$options.name === "SmartTab"
|
||||||
|
|||||||
Reference in New Issue
Block a user