From 5036971f55c7a003ccaa5cc5b92e5453ffaece5f Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 17 Feb 2022 15:09:05 +0800 Subject: [PATCH] =?UTF-8?q?v3.8.0=20=E5=8D=87=E7=BA=A7axios=E5=88=B0?= =?UTF-8?q?=E6=9C=80=E6=96=B0=E7=89=88=E6=9C=AC0.24.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-ui-admin/package.json | 3 +-- yudao-ui-admin/src/plugins/download.js | 9 ++------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/yudao-ui-admin/package.json b/yudao-ui-admin/package.json index 7d8cb751..cb77738e 100644 --- a/yudao-ui-admin/package.json +++ b/yudao-ui-admin/package.json @@ -38,7 +38,7 @@ }, "dependencies": { "@riophae/vue-treeselect": "0.4.0", - "axios": "0.21.0", + "axios": "0.24.0", "clipboard": "2.0.6", "core-js": "3.19.1", "echarts": "4.9.0", @@ -85,7 +85,6 @@ "vue2-ace-editor": "^0.0.15", "@vue/compiler-sfc": "^3.0.1", "@vue/eslint-config-prettier": "^5.0.0", - "axios": "^0.21.1", "bpmn-js": "8.9.0", "bpmn-js-properties-panel": "0.46.0", "compression-webpack-plugin": "^6.1.1", diff --git a/yudao-ui-admin/src/plugins/download.js b/yudao-ui-admin/src/plugins/download.js index 353398e4..e3431cda 100644 --- a/yudao-ui-admin/src/plugins/download.js +++ b/yudao-ui-admin/src/plugins/download.js @@ -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 { // 下载 Excel 方法 excel(data, fileName) { @@ -33,6 +27,7 @@ export default { download0(data, fileName, mineType) { // 创建 blob let blob = new Blob([data], {type: mineType}); + debugger // 创建 href 超链接,点击进行下载 window.URL = window.URL || window.webkitURL; let href = URL.createObjectURL(blob); @@ -42,6 +37,6 @@ export default { downA.click(); // 销毁超连接 window.URL.revokeObjectURL(href); - } + }, } -- GitLab