Skip to content

保存文件函数 ​

saveFile ​

说明 ​

saveFile

参数 ​

参数说明类型
blobBlob对象Blob
filename文件名string

代码演示 ​

基础用法 ​

typescript
import { saveFile } from 'atom-tools'

const blob = new Blob(['Hello, world!'], { type: 'text/plain' })
saveFile(blob, 'hello.txt')