From 92264a516c8c695c38d4cc9358c50bcfbed36f06 Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期三, 03 九月 2025 14:00:15 +0800 Subject: [PATCH] fix: bug --- 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