mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 10:30:13 +01:00
🎨 Improve database table view
This commit is contained in:
parent
fcd134ad2d
commit
2843350737
3 changed files with 8 additions and 10 deletions
|
|
@ -708,7 +708,7 @@ func renderAttributeViewTable(attrView *av.AttributeView, view *av.View) (ret *a
|
|||
keyValues := rows[row.ID]
|
||||
ial := map[string]string{}
|
||||
block := row.GetBlockValue()
|
||||
if !block.IsDetached {
|
||||
if nil != block && !block.IsDetached {
|
||||
ial = cache.GetBlockIAL(row.ID)
|
||||
if nil == ial {
|
||||
ial = map[string]string{}
|
||||
|
|
@ -728,15 +728,14 @@ func renderAttributeViewTable(attrView *av.AttributeView, view *av.View) (ret *a
|
|||
case av.KeyTypeUpdated: // 渲染更新时间
|
||||
ial := map[string]string{}
|
||||
block := row.GetBlockValue()
|
||||
if !block.IsDetached {
|
||||
if nil != block && !block.IsDetached {
|
||||
ial = cache.GetBlockIAL(row.ID)
|
||||
if nil == ial {
|
||||
ial = map[string]string{}
|
||||
}
|
||||
}
|
||||
updatedStr := ial["updated"]
|
||||
if "" == updatedStr {
|
||||
block := row.GetBlockValue()
|
||||
if "" == updatedStr && nil != block {
|
||||
cell.Value.Updated = av.NewFormattedValueUpdated(block.Block.Updated, 0, av.UpdatedFormatNone)
|
||||
cell.Value.Updated.IsNotEmpty = true
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue