forked from opentiny/tiny-vue
fix(tabs): [tabs] Fix the bug where the name is empty caused by using v-if in tabstem (#1549)
This commit is contained in:
parent
5e3b90e45f
commit
c64c373b94
|
@ -28,10 +28,12 @@ export const calcPaneInstances =
|
|||
tabItemVNodes().forEach((vnode) => {
|
||||
if (Array.isArray(vnode.children)) {
|
||||
vnode.children.forEach((child) => {
|
||||
orderPanes.push(child.props?.name)
|
||||
const name = child.props?.name
|
||||
name && orderPanes.push(name)
|
||||
})
|
||||
} else {
|
||||
orderPanes.push(vnode.props?.name)
|
||||
const name = vnode.props?.name
|
||||
name && orderPanes.push(name)
|
||||
}
|
||||
})
|
||||
const currentPanes = [] as ITabsPaneVm[]
|
||||
|
|
Loading…
Reference in New Issue