🎨 Database table view template columns support reference date columns https://github.com/siyuan-note/siyuan/issues/9887
This commit is contained in:
parent
0e58605f2c
commit
5bf45bfde2
2 changed files with 4 additions and 0 deletions
|
@ -450,6 +450,8 @@ func renderTemplateCol(ial map[string]string, tplContent string, rowValues []*av
|
|||
v := rowValue.Values[0]
|
||||
if av.KeyTypeNumber == v.Type {
|
||||
dataModel[rowValue.Key.Name] = v.Number.Content
|
||||
} else if av.KeyTypeDate == v.Type {
|
||||
dataModel[rowValue.Key.Name] = time.UnixMilli(v.Date.Content)
|
||||
} else {
|
||||
dataModel[rowValue.Key.Name] = v.String()
|
||||
}
|
||||
|
|
|
@ -863,6 +863,8 @@ func renderTemplateCol(ial map[string]string, tplContent string, rowValues []*av
|
|||
v := rowValue.Values[0]
|
||||
if av.KeyTypeNumber == v.Type {
|
||||
dataModel[rowValue.Key.Name] = v.Number.Content
|
||||
} else if av.KeyTypeDate == v.Type {
|
||||
dataModel[rowValue.Key.Name] = time.UnixMilli(v.Date.Content)
|
||||
} else {
|
||||
dataModel[rowValue.Key.Name] = v.String()
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue