feat(文档导出): 新增文档导出进度显示
build.yaml / build (push) Successful in 34s

This commit is contained in:
xiaoqidun committed 2026-09-14 13:16:07 +08:00
1 parent a7e86a322f
commit 92585edd1e
6 files changed
+46 -8

No files matched your search

+5
View File
@@ -335,6 +335,11 @@ func exportDocument(args []js.Value) (any, error) {
if currentSession == nil {
return nil, fmt.Errorf("ofd document is not opened")
}
renderer := currentSession.Renderer
renderer.OnExportProgress = func(completed, total int) {
args[4].Invoke(completed, total)
}
defer func() { renderer.OnExportProgress = nil }()
var indices []int
if !args[2].IsNull() {
indices = make([]int, args[2].Length())