Skip to content

Commit 9849a04

Browse files
committed
feat: 添加download.json()方法
1 parent 753e44c commit 9849a04

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/utils/download.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ const download = {
3333
markdown: (data: Blob, fileName: string) => {
3434
download0(data, fileName, 'text/markdown')
3535
},
36+
// 下载 Json 方法
37+
json: (data: Blob, fileName: string) => {
38+
download0(data, fileName, 'application/json')
39+
},
3640
// 下载图片(允许跨域)
3741
image: ({
3842
url,

0 commit comments

Comments
 (0)