This commit is contained in:
Daniel 2025-06-12 22:25:10 +08:00
parent d05010a71f
commit 041c4102cd
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 6 additions and 6 deletions

View file

@ -1266,7 +1266,7 @@ func GetCurrentAttributeViewImages(avID, viewID, query string) (ret []string, er
view = attrView.GetView(attrView.ViewID) view = attrView.GetView(attrView.ViewID)
} }
table := sql.RenderAttributeViewTable(attrView, view, query) table := getAttrViewTable(attrView, view, query)
table.Filter(attrView) table.Filter(attrView)
table.Sort(attrView) table.Sort(attrView)

View file

@ -80,7 +80,7 @@ func ExportAv2CSV(avID, blockID string) (zipPath string, err error) {
} }
name := util.FilterFileName(getAttrViewName(attrView)) name := util.FilterFileName(getAttrViewName(attrView))
table := getAttrViewTable(attrView, view) table := getAttrViewTable(attrView, view, "")
// 遵循视图过滤和排序规则 Use filtering and sorting of current view settings when exporting database blocks https://github.com/siyuan-note/siyuan/issues/10474 // 遵循视图过滤和排序规则 Use filtering and sorting of current view settings when exporting database blocks https://github.com/siyuan-note/siyuan/issues/10474
table.Filter(attrView) table.Filter(attrView)
@ -2492,7 +2492,7 @@ func exportTree(tree *parse.Tree, wysiwyg, keepFold, avHiddenCol bool,
return ast.WalkContinue return ast.WalkContinue
} }
table := getAttrViewTable(attrView, view) table := getAttrViewTable(attrView, view, "")
// 遵循视图过滤和排序规则 Use filtering and sorting of current view settings when exporting database blocks https://github.com/siyuan-note/siyuan/issues/10474 // 遵循视图过滤和排序规则 Use filtering and sorting of current view settings when exporting database blocks https://github.com/siyuan-note/siyuan/issues/10474
table.Filter(attrView) table.Filter(attrView)
@ -3394,7 +3394,7 @@ func loadTreeWithCache(id string, treeCache *map[string]*parse.Tree) (tree *pars
return return
} }
func getAttrViewTable(attrView *av.AttributeView, view *av.View) (ret *av.Table) { func getAttrViewTable(attrView *av.AttributeView, view *av.View, query string) (ret *av.Table) {
switch view.LayoutType { switch view.LayoutType {
case av.LayoutTypeGallery: case av.LayoutTypeGallery:
view.Table = av.NewLayoutTable() view.Table = av.NewLayoutTable()
@ -3405,6 +3405,6 @@ func getAttrViewTable(attrView *av.AttributeView, view *av.View) (ret *av.Table)
view.Table.RowIDs = append(view.Table.RowIDs, cardID) view.Table.RowIDs = append(view.Table.RowIDs, cardID)
} }
} }
ret = sql.RenderAttributeViewTable(attrView, view, "") ret = sql.RenderAttributeViewTable(attrView, view, query)
return return
} }

View file

@ -409,7 +409,7 @@ func RenderTemplate(p, id string, preview bool) (tree *parse.Tree, dom string, e
return ast.WalkContinue return ast.WalkContinue
} }
table := sql.RenderAttributeViewTable(attrView, view, "") table := getAttrViewTable(attrView, view, "")
var aligns []int var aligns []int
for range table.Columns { for range table.Columns {