🎨 Database table view supports paged loading https://github.com/siyuan-note/siyuan/issues/9424

This commit is contained in:
Daniel 2023-12-06 17:00:37 +08:00
parent 533f4eb9dc
commit 3aa32f7f8d
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
4 changed files with 34 additions and 13 deletions

View file

@ -47,10 +47,10 @@ func RenderGoTemplate(templateContent string) (ret string, err error) {
tmpl := template.New("")
tmpl = tmpl.Funcs(sprig.TxtFuncMap())
tmpl = tmpl.Funcs(template.FuncMap{
"Weekday": util.Weekday,
"WeekdayCN": util.WeekdayCN,
"Weekday": util.Weekday,
"WeekdayCN": util.WeekdayCN,
"WeekdayCN2": util.WeekdayCN2,
"ISOWeek": util.ISOWeek,
"ISOWeek": util.ISOWeek,
})
tpl, err := tmpl.Parse(templateContent)
if nil != err {
@ -333,7 +333,7 @@ func renderTemplate(p, id string, preview bool) (string, error) {
return ast.WalkContinue
}
table, renderErr := renderAttributeViewTable(attrView, view)
table, renderErr := renderAttributeViewTable(attrView, view, 1, -1)
if nil != renderErr {
logging.LogErrorf("render attribute view [%s] table failed: %s", n.AttributeViewID, renderErr)
return ast.WalkContinue