From 12f08c16ee7c7176368b5961fe104ed698227a8d Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期四, 11 九月 2025 17:41:50 +0800
Subject: [PATCH] Merge branch 'master' into dev-v1.1
---
packages/utils/file.ts | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/packages/utils/file.ts b/packages/utils/file.ts
index bb74f4c..a88fe99 100644
--- a/packages/utils/file.ts
+++ b/packages/utils/file.ts
@@ -86,3 +86,15 @@
return fileName;
});
}
+
+export function openDocument(url: string) {
+ Taro.downloadFile({
+ url: url,
+ success: function (res) {
+ var filePath = res.tempFilePath;
+ Taro.openDocument({
+ filePath: filePath,
+ });
+ },
+ });
+}
--
Gitblit v1.9.1