v3.8.0 升级axios到最新版本0.24.0

This commit is contained in:
YunaiV 2022-02-17 15:09:05 +08:00
parent cfd8cd57cf
commit 5036971f55
2 changed files with 3 additions and 9 deletions

View File

@ -38,7 +38,7 @@
}, },
"dependencies": { "dependencies": {
"@riophae/vue-treeselect": "0.4.0", "@riophae/vue-treeselect": "0.4.0",
"axios": "0.21.0", "axios": "0.24.0",
"clipboard": "2.0.6", "clipboard": "2.0.6",
"core-js": "3.19.1", "core-js": "3.19.1",
"echarts": "4.9.0", "echarts": "4.9.0",
@ -85,7 +85,6 @@
"vue2-ace-editor": "^0.0.15", "vue2-ace-editor": "^0.0.15",
"@vue/compiler-sfc": "^3.0.1", "@vue/compiler-sfc": "^3.0.1",
"@vue/eslint-config-prettier": "^5.0.0", "@vue/eslint-config-prettier": "^5.0.0",
"axios": "^0.21.1",
"bpmn-js": "8.9.0", "bpmn-js": "8.9.0",
"bpmn-js-properties-panel": "0.46.0", "bpmn-js-properties-panel": "0.46.0",
"compression-webpack-plugin": "^6.1.1", "compression-webpack-plugin": "^6.1.1",

View File

@ -1,9 +1,3 @@
import { saveAs } from 'file-saver'
import axios from 'axios'
import { getToken } from '@/utils/auth'
const baseURL = process.env.VUE_APP_BASE_API
export default { export default {
// 下载 Excel 方法 // 下载 Excel 方法
excel(data, fileName) { excel(data, fileName) {
@ -33,6 +27,7 @@ export default {
download0(data, fileName, mineType) { download0(data, fileName, mineType) {
// 创建 blob // 创建 blob
let blob = new Blob([data], {type: mineType}); let blob = new Blob([data], {type: mineType});
debugger
// 创建 href 超链接,点击进行下载 // 创建 href 超链接,点击进行下载
window.URL = window.URL || window.webkitURL; window.URL = window.URL || window.webkitURL;
let href = URL.createObjectURL(blob); let href = URL.createObjectURL(blob);
@ -42,6 +37,6 @@ export default {
downA.click(); downA.click();
// 销毁超连接 // 销毁超连接
window.URL.revokeObjectURL(href); window.URL.revokeObjectURL(href);
} },
} }