/** * 下载文件 * @param path 文件地址 */ export const downloadFile = (path) => { const downloadDom = document.createElement('a'); downloadDom.href = path; downloadDom.target = '_blank'; downloadDom.download = ''; document.body.appendChild(downloadDom); downloadDom.click(); document.body.removeChild(downloadDom); };
 
badge