@10yun/cv-pc-ui 0.2.38 → 0.2.40
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/npmpack/README.md +1 -0
- package/{lib → npmpack}/cv-pc-ui.common.js +75740 -76791
- package/npmpack/cv-pc-ui.common.js.map +1 -0
- package/npmpack/cv-pc-ui.css +1 -0
- package/{lib → npmpack}/cv-pc-ui.umd.js +75740 -76791
- package/npmpack/cv-pc-ui.umd.js.map +1 -0
- package/npmpack/cv-pc-ui.umd.min.js +2 -0
- package/npmpack/cv-pc-ui.umd.min.js.map +1 -0
- package/{lib → npmpack}/demo.html +0 -0
- package/package.json +12 -11
- package/plugins/request.js +15 -5
- package/lib/cv-pc-ui.common.js.map +0 -1
- package/lib/cv-pc-ui.css +0 -1
- package/lib/cv-pc-ui.umd.js.map +0 -1
- package/lib/cv-pc-ui.umd.min.js +0 -2
- package/lib/cv-pc-ui.umd.min.js.map +0 -1
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@10yun/cv-pc-ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.40",
|
|
4
4
|
"description": "cvjs-pc-ui组件",
|
|
5
5
|
"author": "10yun",
|
|
6
6
|
"private": false,
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
|
-
"
|
|
8
|
+
"main2": "lib/cv-pc-ui.umd.min.js",
|
|
9
|
+
"main": "npmpack/cv-pc-ui.umd.min.js",
|
|
9
10
|
"files": [
|
|
10
|
-
"
|
|
11
|
+
"npmpack",
|
|
11
12
|
"plugins",
|
|
12
13
|
"dict-area",
|
|
13
14
|
"src/mixins",
|
|
@@ -27,21 +28,21 @@
|
|
|
27
28
|
"serve": "vue-cli-service serve",
|
|
28
29
|
"build": "vue-cli-service build",
|
|
29
30
|
"lint": "vue-cli-service lint",
|
|
30
|
-
"build-bundle": "vue-cli-service build --target lib --name cv-pc-ui --dest ./
|
|
31
|
-
"build-lib": "vue-cli-service build --target lib --name cv-pc-ui --dest ./
|
|
31
|
+
"build-bundle": "vue-cli-service build --target lib --name cv-pc-ui --dest ./lib/ ./src/index.js",
|
|
32
|
+
"build-lib": "vue-cli-service build --target lib --name cv-pc-ui --dest ./npmpack/ ./src/index.js --no-clean "
|
|
32
33
|
},
|
|
33
34
|
"dependencies": {
|
|
34
|
-
"async-validator": "^4.
|
|
35
|
-
"core-js": "^3.
|
|
36
|
-
"element-ui": "^2.15.
|
|
37
|
-
"vue": "^2.7.
|
|
35
|
+
"async-validator": "^4.2.5",
|
|
36
|
+
"core-js": "^3.26.0",
|
|
37
|
+
"element-ui": "^2.15.10",
|
|
38
|
+
"vue": "^2.7.13",
|
|
38
39
|
"vue-router": "^3.5.3"
|
|
39
40
|
},
|
|
40
41
|
"devDependencies": {
|
|
41
42
|
"@vue/cli-plugin-babel": "~4.5.19",
|
|
42
43
|
"@vue/cli-service": "~4.5.19",
|
|
43
|
-
"axios": "^
|
|
44
|
+
"axios": "^1.1.3",
|
|
44
45
|
"babel-plugin-transform-remove-console": "^6.9.4",
|
|
45
|
-
"vue-template-compiler": "^2.7.
|
|
46
|
+
"vue-template-compiler": "^2.7.13"
|
|
46
47
|
}
|
|
47
48
|
}
|
package/plugins/request.js
CHANGED
|
@@ -257,6 +257,11 @@ class RequestClass {
|
|
|
257
257
|
* @param {Object} options
|
|
258
258
|
* @returns {Class} this
|
|
259
259
|
*/
|
|
260
|
+
setDefHeaders(options = {}) {
|
|
261
|
+
this.headers = Object.assign({}, this.headers, options || {});
|
|
262
|
+
this.reqObj.defaults.headers = this.headers;
|
|
263
|
+
return this;
|
|
264
|
+
}
|
|
260
265
|
setHeaders(options = {}) {
|
|
261
266
|
this.headers = Object.assign({}, this.headers, options || {});
|
|
262
267
|
return this;
|
|
@@ -266,6 +271,11 @@ class RequestClass {
|
|
|
266
271
|
* @param {Object} options
|
|
267
272
|
* @returns {Class} this
|
|
268
273
|
*/
|
|
274
|
+
setDefRequests(options = {}) {
|
|
275
|
+
this.requests = Object.assign({}, this.requests, options || {});
|
|
276
|
+
this.reqObj.defaults.requests = this.requests;
|
|
277
|
+
return this;
|
|
278
|
+
}
|
|
269
279
|
setRequests(options = {}) {
|
|
270
280
|
this.requests = Object.assign({}, this.requests, options || {});
|
|
271
281
|
return this;
|
|
@@ -307,25 +317,25 @@ class RequestClass {
|
|
|
307
317
|
// 没有凭证,请登录
|
|
308
318
|
case '100101':
|
|
309
319
|
case 100101:
|
|
310
|
-
this.storeHandle.dispatch('storeUser/
|
|
320
|
+
this.storeHandle.dispatch('storeUser/SA_ACCOUNT_LOGOUT');
|
|
311
321
|
Message({ type: 'error', message: apiResData.msg });
|
|
312
322
|
// window.location.href ='/';
|
|
313
323
|
break;
|
|
314
324
|
// 无效凭证,请重新登录
|
|
315
325
|
case '100102':
|
|
316
326
|
case 100102:
|
|
317
|
-
this.storeHandle.dispatch('storeUser/
|
|
327
|
+
this.storeHandle.dispatch('storeUser/SA_ACCOUNT_LOGOUT');
|
|
318
328
|
Message({ type: 'error', message: apiResData.msg });
|
|
319
329
|
break;
|
|
320
330
|
// 凭证过期,请重新登录
|
|
321
331
|
case '100103':
|
|
322
332
|
case 100103:
|
|
323
|
-
this.storeHandle.dispatch('storeUser/
|
|
333
|
+
this.storeHandle.dispatch('storeUser/SA_ACCOUNT_LOGOUT');
|
|
324
334
|
window.location.href = '/';
|
|
325
335
|
break;
|
|
326
336
|
case 10009: // 退出登录
|
|
327
337
|
case '10009':
|
|
328
|
-
this.storeHandle.dispatch('storeUser/
|
|
338
|
+
this.storeHandle.dispatch('storeUser/SA_ACCOUNT_LOGOUT');
|
|
329
339
|
window.location.href = '/';
|
|
330
340
|
break;
|
|
331
341
|
case 100404:
|
|
@@ -372,7 +382,7 @@ class RequestClass {
|
|
|
372
382
|
if (apiUrl.indexOf('http://') != -1 || apiUrl.indexOf('https://') != -1) {
|
|
373
383
|
// request_setttings.url = apiUrl
|
|
374
384
|
}
|
|
375
|
-
this.reqObj.headers = this.headers;
|
|
385
|
+
this.reqObj.defaults.headers = this.headers;
|
|
376
386
|
|
|
377
387
|
let canshuOpt = this.canshuOpt || {};
|
|
378
388
|
this.canshuOpt = {};
|