From 8e46584fe61791c205eff9bacc60b51dbc2b9368 Mon Sep 17 00:00:00 2001 From: lucioc <8572789+lucioc@user.noreply.gitee.com> Date: Tue, 19 Jul 2022 10:05:00 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E6=AD=A4=E5=A4=84?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E5=AF=B9=E5=8E=9F=E6=9C=89=E5=AF=B9=E8=B1=A1?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E4=BF=AE=E6=94=B9=EF=BC=8C=E5=8F=AA=E5=AF=B9?= =?UTF-8?q?=E5=8E=9F=E5=AF=B9=E8=B1=A1=EF=BC=88=20record=20=EF=BC=89?= =?UTF-8?q?=E4=B8=8D=E5=AD=98=E5=9C=A8=E7=9A=84=E5=88=97=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E5=A2=9E=E5=8A=A0=E5=A2=9E=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/table/src/table.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/table/src/table.ts b/packages/table/src/table.ts index 76573fda9..bba5ce83e 100644 --- a/packages/table/src/table.ts +++ b/packages/table/src/table.ts @@ -2619,7 +2619,7 @@ export default defineComponent({ createData (records) { const { treeConfig } = props const treeOpts = computeTreeOpts.value - const handleRrecord = (record: any) => reactive(tablePrivateMethods.defineField(Object.assign({}, record))) + const handleRrecord = (record: any) => reactive(tablePrivateMethods.defineField(record || {})) const rows = treeConfig ? XEUtils.mapTree(records, handleRrecord, treeOpts) : records.map(handleRrecord) return nextTick().then(() => rows) }, @@ -4580,7 +4580,7 @@ export default defineComponent({ const rowkey = getRowkey($xetable) internalData.tableFullColumn.forEach(column => { const { field, editRender } = column - if (field && !XEUtils.has(record, field)) { + if (field && !XEUtils.has(record, field) && !record[field]) { let cellValue = null if (editRender) { const { defaultValue } = editRender -- Gitee