web
6 天以前 e8acf56b807be105702321a0be2119963fa69e03
src/utils/index.js
@@ -472,4 +472,16 @@
export function isNumberStr(str) {
  return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str)
}
/**
 * blob文件流导出
 */
export function exportBlobFile(blob, name) {
  const link = document.createElement('a')
  const url = URL || window.webkitURL
  const href = url.createObjectURL(blob)
  link.href = href;
  link.download = name + '.xlsx'
  link.click()
}