A test for the page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function download (url = '', headers = {}) { | |
try { | |
const res = await fetch(url, { | |
headers | |
}) | |
const blob = await res.blob() | |
// 获取后端headers里面的文件名 | |
const filename = decodeURI(res.headers.get('Content-Disposition').split('filename=')[1]) | |
// download | |
const a = document.createElement('a') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function debounce(fn, delay = 500) { | |
let timer = null | |
return function () { | |
clearTimeout(timer) | |
timeout = setTimeout(() => { | |
fn.apply(this, arguments) | |
}, delay) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Official framework image. Look for the different tagged releases at: | |
# https://hub.docker.com/r/library/node/tags/ | |
image: node:6 | |
before_script: | |
- npm install | |
# This folder is cached between builds | |
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache | |
cache: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2018-03-08T11:42:51.414Z","extensionVersion":"v2.9.0"} |