From 2db7c5167db4d15a37f42c7cfba7fbc3e575ce11 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Sat, 30 Dec 2023 12:08:20 +0800 Subject: [PATCH] :art: Update av https://ld246.com/article/1703831044435 --- kernel/model/attribute_view.go | 4 ++++ kernel/treenode/node.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go index 2e850be81..269064286 100644 --- a/kernel/model/attribute_view.go +++ b/kernel/model/attribute_view.go @@ -742,6 +742,10 @@ func renderAttributeViewTable(attrView *av.AttributeView, view *av.View) (ret *a tableCell.Value = &av.Value{ID: tableCell.ID, KeyID: col.ID, BlockID: rowID, Type: av.KeyTypeCreated} case av.KeyTypeUpdated: // 填充更新时间列值,后面再渲染 tableCell.Value = &av.Value{ID: tableCell.ID, KeyID: col.ID, BlockID: rowID, Type: av.KeyTypeUpdated} + case av.KeyTypeRelation: // 清空关联列值,后面再渲染 https://ld246.com/article/1703831044435 + if nil != tableCell.Value && nil != tableCell.Value.Relation { + tableCell.Value.Relation.Contents = nil + } } treenode.FillAttributeViewTableCellNilValue(tableCell, rowID, col.ID) diff --git a/kernel/treenode/node.go b/kernel/treenode/node.go index de03ce862..cd9640336 100644 --- a/kernel/treenode/node.go +++ b/kernel/treenode/node.go @@ -698,6 +698,10 @@ func renderAttributeViewTable(attrView *av.AttributeView, view *av.View) (ret *a tableCell.Value = &av.Value{ID: tableCell.ID, KeyID: col.ID, BlockID: rowID, Type: av.KeyTypeCreated} case av.KeyTypeUpdated: // 填充更新时间列值,后面再渲染 tableCell.Value = &av.Value{ID: tableCell.ID, KeyID: col.ID, BlockID: rowID, Type: av.KeyTypeUpdated} + case av.KeyTypeRelation: // 清空关联列值,后面再渲染 https://ld246.com/article/1703831044435 + if nil != tableCell.Value && nil != tableCell.Value.Relation { + tableCell.Value.Relation.Contents = nil + } } FillAttributeViewTableCellNilValue(tableCell, rowID, col.ID)