Browse Source

:art: Use filtering and sorting of current view settings when exporting database blocks Fix https://github.com/siyuan-note/siyuan/issues/10474

Daniel 1 năm trước cách đây
mục cha
commit
10e0061926
1 tập tin đã thay đổi với 8 bổ sung0 xóa
  1. 8 0
      kernel/model/export.go

+ 8 - 0
kernel/model/export.go

@@ -80,6 +80,10 @@ func ExportAv2CSV(avID string) (zipPath string, err error) {
 		return
 	}
 
+	// 遵循视图过滤和排序规则 Use filtering and sorting of current view settings when exporting database blocks https://github.com/siyuan-note/siyuan/issues/10474
+	table.FilterRows(attrView)
+	table.SortRows()
+
 	exportFolder := filepath.Join(util.TempDir, "export", "csv", name)
 	if err = os.MkdirAll(exportFolder, 0755); nil != err {
 		logging.LogErrorf("mkdir [%s] failed: %s", exportFolder, err)
@@ -2250,6 +2254,10 @@ func exportTree(tree *parse.Tree, wysiwyg, expandKaTexMacros, keepFold bool,
 			return ast.WalkContinue
 		}
 
+		// 遵循视图过滤和排序规则 Use filtering and sorting of current view settings when exporting database blocks https://github.com/siyuan-note/siyuan/issues/10474
+		table.FilterRows(attrView)
+		table.SortRows()
+
 		var aligns []int
 		for range table.Columns {
 			aligns = append(aligns, 0)