fix(table): fix #1572 (#1592)

fix #1572

Co-authored-by: winerlu <winerlu@tencent.com>
This commit is contained in:
justwiner 2021-03-09 20:23:58 +08:00 committed by GitHub
parent 11b7b6c1c6
commit 08266d6d1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -217,7 +217,7 @@ export default defineComponent({
const renderDefault = this.$slots.default?.()
if (renderDefault instanceof Array) {
for (const childNode of renderDefault) {
if (childNode.type?.name === 'ElTableColumn') {
if (childNode.type?.name === 'ElTableColumn' || childNode.shapeFlag !== 36) {
children.push(childNode)
} else if (childNode.type === Fragment && childNode.children instanceof Array) {
renderDefault.push(...childNode.children)