From dee69fd8e39e1939c03bfacdf9fcf0eab1ab3bfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=8A=E5=AF=BC=E4=BD=93=E6=9E=9C=E5=86=BB?= <2746671038@qq.com> Date: Wed, 31 Jul 2024 12:45:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/yd_download.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/yd_download.js b/lib/yd_download.js index e508926..d8c77e6 100644 --- a/lib/yd_download.js +++ b/lib/yd_download.js @@ -4,7 +4,7 @@ * @param {String} [filename] 文件名 默认使用页面标题 * @param {Boolean} [isURL] 传入的字符串是否为下载链接。(否则将作为文本内容下载) 默认为`false` */ -const yd_download = (content, filename = document.title, isURL = "false") => { +export const yd_download = (content, filename = document.title, isURL = "false") => { if (content === void 0 || content === null) throw new TypeError("无下载内容!"); const anchor = document.createElement("a"); // 将数值类型与布尔类型转为字符串