mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
🎨 Database table view template columns support reference date columns https://github.com/siyuan-note/siyuan/issues/9887
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user