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, }); }, }); }