el-plus-crud 0.0.85 → 0.0.86

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -159,7 +159,12 @@ async function handelDownload({ callBack }: IBtnBack) {
159
159
  }, 1000)
160
160
  }
161
161
  }
162
- xhr.onerror = function () {
162
+ xhr.onerror = function (e: any) {
163
+ // 如果错误,则尝试直接打开链接
164
+ const aLink = document.createElement('a')
165
+ aLink.href = url
166
+ aLink.download = (props.toolbar?.export?.name || new Date().getTime()) + (props.toolbar?.export?.suffix || '.xlsx')
167
+ aLink.click()
163
168
  setTimeout(() => {
164
169
  callBack && callBack()
165
170
  }, 1000)
package/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "el-plus-crud",
3
- "version": "0.0.85",
3
+ "version": "0.0.86",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "el-plus-crud",
9
- "version": "0.0.85",
9
+ "version": "0.0.86",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@element-plus/icons-vue": "^2.1.0",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "el-plus-crud",
3
3
  "description": "采用Vue3 + TS,封装的element-plus数据驱动表单、列表组件",
4
4
  "author": "K.D.Jack",
5
- "version": "0.0.85",
5
+ "version": "0.0.86",
6
6
  "license": "MIT",
7
7
  "private": false,
8
8
  "main": "dist/el-plus-crud.mjs",