feat: 添加download.json()方法

pull/667/head
zws 2025-01-16 09:20:57 +08:00
parent 753e44ccd0
commit 9849a040c0
1 changed files with 4 additions and 0 deletions

View File

@ -33,6 +33,10 @@ const download = {
markdown: (data: Blob, fileName: string) => { markdown: (data: Blob, fileName: string) => {
download0(data, fileName, 'text/markdown') download0(data, fileName, 'text/markdown')
}, },
// 下载 Json 方法
json: (data: Blob, fileName: string) => {
download0(data, fileName, 'application/json')
},
// 下载图片(允许跨域) // 下载图片(允许跨域)
image: ({ image: ({
url, url,