🎨 Database block support specified view https://github.com/siyuan-note/siyuan/issues/10443

This commit is contained in:
Daniel 2024-03-04 16:41:41 +08:00
parent d519732c79
commit e3d282ac90
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
5 changed files with 102 additions and 46 deletions

View file

@ -56,7 +56,7 @@ import (
"github.com/siyuan-note/siyuan/kernel/util"
)
func ExportAv2CSV(avID, viewID string) (zipPath string, err error) {
func ExportAv2CSV(avID, blockID string) (zipPath string, err error) {
// Database block supports export as CSV https://github.com/siyuan-note/siyuan/issues/10072
attrView, err := av.ParseAttributeView(avID)
@ -64,6 +64,11 @@ func ExportAv2CSV(avID, viewID string) (zipPath string, err error) {
return
}
node, _, err := getNodeByBlockID(nil, blockID)
if nil == node {
return
}
viewID := node.IALAttr(av.NodeAttrView)
view, err := attrView.GetCurrentView(viewID)
if nil != err {
return