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

This commit is contained in:
Daniel 2024-03-04 15:57:35 +08:00
parent 3ce6e4824b
commit cb726e0118
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
7 changed files with 62 additions and 43 deletions

View file

@ -56,7 +56,7 @@ import (
"github.com/siyuan-note/siyuan/kernel/util"
)
func ExportAv2CSV(avID string) (zipPath string, err error) {
func ExportAv2CSV(avID, viewID 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,7 +64,7 @@ func ExportAv2CSV(avID string) (zipPath string, err error) {
return
}
view, err := attrView.GetCurrentView()
view, err := attrView.GetCurrentView(viewID)
if nil != err {
return
}
@ -2243,7 +2243,8 @@ func exportTree(tree *parse.Tree, wysiwyg, expandKaTexMacros, keepFold bool,
return ast.WalkContinue
}
view, err := attrView.GetCurrentView()
viewID := n.IALAttr(av.NodeAttrView)
view, err := attrView.GetCurrentView(viewID)
if nil != err {
logging.LogErrorf("get attribute view [%s] failed: %s", avID, err)
return ast.WalkContinue