mirror of
https://github.com/element-plus/element-plus.git
synced 2024-12-27 03:01:14 +08:00
fix(table): fix: fix bug of table crash under complex data (#1805)
fix #1733 Co-authored-by: winerlu <winerlu@tencent.com>
This commit is contained in:
parent
77ab8ae0d8
commit
44fbd9f39f
@ -143,7 +143,7 @@ export function defaultRenderCell({
|
||||
if (column && column.formatter) {
|
||||
return column.formatter(row, column, value, $index)
|
||||
}
|
||||
return value
|
||||
return value?.toString?.() || ''
|
||||
}
|
||||
|
||||
export function treeCellPrefix({
|
||||
|
@ -9,7 +9,6 @@ import {
|
||||
import { cellForced, defaultRenderCell, treeCellPrefix } from '../config'
|
||||
import { parseWidth, parseMinWidth } from '../util'
|
||||
import { TableColumn, TableColumnCtx } from '../table.type'
|
||||
import cloneDeep from 'lodash/cloneDeep'
|
||||
|
||||
function useRender(props: TableColumnCtx, slots, owner: ComputedRef<any>) {
|
||||
const instance = (getCurrentInstance() as unknown) as TableColumn
|
||||
@ -128,7 +127,7 @@ function useRender(props: TableColumnCtx, slots, owner: ComputedRef<any>) {
|
||||
}
|
||||
}
|
||||
checkSubColumn(children)
|
||||
return h('div', props, [prefix, cloneDeep(children)])
|
||||
return h('div', props, [prefix, children])
|
||||
}
|
||||
}
|
||||
return column
|
||||
|
Loading…
Reference in New Issue
Block a user