Base64 编码的字符串转换为 Blob 对象方法
const blob = function (data: string, mime: string) {
data = data.split(',')[1];
data = window.atob(data);
let ia = new Uint8Array(data.length);
for (var i = 0; i < data.length; i++) {
ia[i] = data.charCodeAt(i);
};
return new Blob([ia], {
type: mime
});
};