mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 08:30:42 +02:00
🎨 Improve av https://github.com/siyuan-note/siyuan/issues/15520
This commit is contained in:
parent
7b3ac79d78
commit
8ddac77915
1 changed files with 1 additions and 4 deletions
|
@ -310,10 +310,6 @@ func fillAttributeViewBaseValue(baseValue *av.BaseValue, fieldID, itemID string,
|
||||||
baseValue.Value = &av.Value{ID: baseValue.ID, KeyID: fieldID, BlockID: itemID, Type: av.KeyTypeCreated}
|
baseValue.Value = &av.Value{ID: baseValue.ID, KeyID: fieldID, BlockID: itemID, Type: av.KeyTypeCreated}
|
||||||
case av.KeyTypeUpdated: // 填充更新时间字段值,后面再渲染
|
case av.KeyTypeUpdated: // 填充更新时间字段值,后面再渲染
|
||||||
baseValue.Value = &av.Value{ID: baseValue.ID, KeyID: fieldID, BlockID: itemID, Type: av.KeyTypeUpdated}
|
baseValue.Value = &av.Value{ID: baseValue.ID, KeyID: fieldID, BlockID: itemID, Type: av.KeyTypeUpdated}
|
||||||
case av.KeyTypeRelation: // 清空关联字段值,后面再渲染 https://ld246.com/article/1703831044435
|
|
||||||
if nil != baseValue.Value && nil != baseValue.Value.Relation {
|
|
||||||
baseValue.Value.Relation.Contents = nil
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if nil == baseValue.Value {
|
if nil == baseValue.Value {
|
||||||
|
@ -408,6 +404,7 @@ func fillAttributeViewAutoGeneratedValues(attrView *av.AttributeView, collection
|
||||||
keyValues = append(keyValues, &av.KeyValues{Key: rollupKey, Values: []*av.Value{{ID: value.ID, KeyID: rollupKey.ID, BlockID: itemID, Type: av.KeyTypeRollup, Rollup: value.Rollup}}})
|
keyValues = append(keyValues, &av.KeyValues{Key: rollupKey, Values: []*av.Value{{ID: value.ID, KeyID: rollupKey.ID, BlockID: itemID, Type: av.KeyTypeRollup, Rollup: value.Rollup}}})
|
||||||
items[itemID] = keyValues
|
items[itemID] = keyValues
|
||||||
case av.KeyTypeRelation: // 渲染关联字段
|
case av.KeyTypeRelation: // 渲染关联字段
|
||||||
|
value.Relation.Contents = nil
|
||||||
relKey, _ := attrView.GetKey(value.KeyID)
|
relKey, _ := attrView.GetKey(value.KeyID)
|
||||||
if nil != relKey && nil != relKey.Relation {
|
if nil != relKey && nil != relKey.Relation {
|
||||||
destAv := avCache[relKey.Relation.AvID]
|
destAv := avCache[relKey.Relation.AvID]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue