byt-ui 1.2.2 → 1.2.3
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/lib/byt-ui.common.js +4920 -16195
- package/lib/byt-ui.umd.js +4920 -16195
- package/lib/byt-ui.umd.min.js +151 -151
- package/lib/locale/format.js +1 -1
- package/package.json +8 -3
- package/packages/common/modules/request.js +7 -6
package/lib/locale/format.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const hasOwnProperty=Object.prototype.hasOwnProperty,hasOwn=function(t,n){return hasOwnProperty.call(t,n)},RE_NARGS=/(%|)\{([0-9a-zA-Z_]+)\}/g;export default function(t){function n(t,...n){return 1===n.length&&"object"===typeof n[0]&&(n=n[0]),n&&n.hasOwnProperty||(n={}),t.replace(RE_NARGS,(
|
|
1
|
+
const hasOwnProperty=Object.prototype.hasOwnProperty,hasOwn=function(t,n){return hasOwnProperty.call(t,n)},RE_NARGS=/(%|)\{([0-9a-zA-Z_]+)\}/g;export default function(t){function n(t,...n){return 1===n.length&&"object"===typeof n[0]&&(n=n[0]),n&&n.hasOwnProperty||(n={}),t.replace(RE_NARGS,(e,r,o,l)=>{let a;return"{"===t[l-1]&&"}"===t[l+e.length]?o:(a=hasOwn(n,o)?n[o]:null,null===a||void 0===a?"":a)})}return n}
|
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "byt-ui",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"private": false,
|
|
3
|
+
"version": "1.2.3",
|
|
5
4
|
"description": "byt组件库",
|
|
6
5
|
"author": {
|
|
7
6
|
"name": "wgh"
|
|
@@ -78,6 +77,12 @@
|
|
|
78
77
|
"license": "MIT",
|
|
79
78
|
"publishConfig": {
|
|
80
79
|
"access": "public",
|
|
81
|
-
"registry": "https://registry.npmjs.
|
|
80
|
+
"registry": "https://registry.npmjs.org"
|
|
81
|
+
},
|
|
82
|
+
"resolutions": {
|
|
83
|
+
"minimatch": "9.0.5"
|
|
84
|
+
},
|
|
85
|
+
"engines": {
|
|
86
|
+
"node": ">=18"
|
|
82
87
|
}
|
|
83
88
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import axios from 'axios'
|
|
2
|
-
import { Message } from 'element-ui'
|
|
3
|
-
import { getCookie } from './cookie'
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
import { Message } from 'element-ui';
|
|
3
|
+
import { getCookie } from './cookie';
|
|
4
|
+
import { getStore } from './store';
|
|
4
5
|
class Request {
|
|
5
6
|
constructor(config = {}, Vue = null) {
|
|
6
7
|
const { options = {}, handler = {}} = config;
|
|
@@ -42,9 +43,9 @@ class Request {
|
|
|
42
43
|
interceptors() {
|
|
43
44
|
// HTTPrequest拦截
|
|
44
45
|
this._request.interceptors.request.use(config => {
|
|
45
|
-
const TENANT_ID = getCookie('tenantId')
|
|
46
|
-
const isToken = (config.headers || {}).isToken === false
|
|
47
|
-
const token = getCookie('access_token')
|
|
46
|
+
const TENANT_ID = getStore('tenantId') || getCookie('tenantId');
|
|
47
|
+
const isToken = (config.headers || {}).isToken === false;
|
|
48
|
+
const token = getStore('access_token') || getCookie('access_token');
|
|
48
49
|
if (token && !isToken) {
|
|
49
50
|
config.headers['Authorization'] = `Bearer ${token}`// token
|
|
50
51
|
}
|