coderluck: function downloadByData(data: BlobPart, filename: string, mime?: string, bom?: BlobPart) { const blobData = typeof bom !== 'undefined' ? [bom, data] : [data] const blob = new Blob(blobData, { type: mime || 'application/octet-stream' }) const blobURL = (blob) const tempLink = ('a') = 'none' = blobURL ('download', filename) if (typeof === 'undefined') { ('target', '_blank') } (tempLink) () (tempLink) (blobURL) }
里面更改配置后用npm下载
vue blob格式流文件下载