fix(table): fix bug in render column structure (#1664)

Co-authored-by: winerlu <winerlu@tencent.com>
This commit is contained in:
justwiner
2021-03-22 09:14:21 +08:00
committed by GitHub
parent 4b0e022e07
commit 8ea4c16e34

View File

@@ -214,7 +214,7 @@ export default defineComponent({
render () {
let children = []
try {
const renderDefault = this.$slots.default?.()
const renderDefault = this.$slots.default?.({ row: {}, column: {}, $index: -1 })
if (renderDefault instanceof Array) {
for (const childNode of renderDefault) {
if (childNode.type?.name === 'ElTableColumn' || childNode.shapeFlag !== 36) {