n20-common-lib 1.3.39 → 1.3.40-0.1
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n20-common-lib",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.40-0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -94,20 +94,6 @@
|
|
|
94
94
|
"xlsx": "0.14.1",
|
|
95
95
|
"xlsx-style": "^0.8.13"
|
|
96
96
|
},
|
|
97
|
-
"eslintConfig": {
|
|
98
|
-
"root": true,
|
|
99
|
-
"env": {
|
|
100
|
-
"node": true
|
|
101
|
-
},
|
|
102
|
-
"extends": [
|
|
103
|
-
"plugin:vue/essential",
|
|
104
|
-
"eslint:recommended"
|
|
105
|
-
],
|
|
106
|
-
"parserOptions": {
|
|
107
|
-
"parser": "babel-eslint"
|
|
108
|
-
},
|
|
109
|
-
"rules": {}
|
|
110
|
-
},
|
|
111
97
|
"browserslist": [
|
|
112
98
|
"> 1%",
|
|
113
99
|
"last 2 versions",
|
|
@@ -397,6 +397,10 @@ export default {
|
|
|
397
397
|
uploadHttpRequest: {
|
|
398
398
|
type: Function,
|
|
399
399
|
default: undefined
|
|
400
|
+
},
|
|
401
|
+
getFileMethod: {
|
|
402
|
+
type: Function,
|
|
403
|
+
default: undefined
|
|
400
404
|
}
|
|
401
405
|
},
|
|
402
406
|
data() {
|
|
@@ -463,6 +467,10 @@ export default {
|
|
|
463
467
|
},
|
|
464
468
|
|
|
465
469
|
async getFileInfo(row) {
|
|
470
|
+
if (this.getFileMethod) {
|
|
471
|
+
return this.getFileMethod(row)
|
|
472
|
+
}
|
|
473
|
+
|
|
466
474
|
let _url = row[this.keys.url]
|
|
467
475
|
this.seePrefix && (_url = this.seePrefix + _url)
|
|
468
476
|
if (_url) {
|
package/src/utils/axios.js
CHANGED
|
@@ -95,7 +95,7 @@ function errorFn(status, msg, noMsg) {
|
|
|
95
95
|
noMsg || showMsg('500,服务器链接失败!')
|
|
96
96
|
} else if (status === 'ECONNABORTED' && msg.includes('timeout')) {
|
|
97
97
|
showMsg('请求超时')
|
|
98
|
-
} else if (status >= 900) {
|
|
98
|
+
} else if (status >= 900 || status === -1) {
|
|
99
99
|
noMsg || showMsg(msg)
|
|
100
100
|
} else {
|
|
101
101
|
// noMsg || showMsg(msg)
|