Skip to content

Function: save()

ts
function save(file: string | Blob, saveFileName: string): void

H5文件下载方法

Example

ts
save(new Blob(['你好世界'], { type: 'text/plain' }), 'test.txt');
save('https://www.baidu.com/img/flexible/logo/pc/result@2.png', 'baidu.png');

Parameters

ParameterTypeDefault valueDescription

file

string | Blob

undefined

资源链接或者blob对象

saveFileName

string

''

保存文件名

Returns

void