@lambo-design/shared 1.0.0-beta.72 → 1.0.0-beta.74

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/config/config.js CHANGED
@@ -31,7 +31,6 @@ const setConfig = function (key, value) {
31
31
  };
32
32
  const registerConfig = function (configMap){
33
33
  config = Object.assign(config,configMap)
34
- console.log("config===",config)
35
34
  }
36
35
  export default config;
37
36
  export {config, setConfig, registerConfig};
@@ -110,8 +110,8 @@
110
110
  --btn-font-size: 14px;
111
111
  --btn-font-size-large: 16px;
112
112
  --btn-font-size-small: 14px;
113
- --btn-border-radius: 2px;
114
- --btn-border-radius-small: 1px;
113
+ --btn-border-radius: 20px;
114
+ --btn-border-radius-small: 10px;
115
115
  --btn-group-border: #008af2;
116
116
  --btn-disable-color: #999999;
117
117
  --btn-disable-bg: #f7f7f7;
@@ -1 +1 @@
1
- {"version":3,"sources":["eap.less","var.less"],"names":[],"mappings":"AAEA;EAEE,wBAAA;EACA,gCAAA;EACA,gCAAA;EACA,gCAAA;EACA,+BAAA;EACA,yDAAA;EACA,+CAAA;EACA,gCAAA;EAGA,qBAAA;EACA,6BAAA;EACA,6BAAA;EACA,6BAAA;EACA,4BAAA;EACA,sDAAA;EACA,6CAAA;EACA,6BAAA;EAGA,wBAAA;EACA,gCAAA;EACA,gCAAA;EACA,gCAAA;EACA,+BAAA;EACA,yDAAA;EACA,gDAAA;EACA,gCAAA;EAGA,2BAAA;EAGA,wBAAA;EACA,gCAAA;EACA,gCAAA;EACA,+BAAA;EACA,gCAAA;EACA,yDAAA;EACA,+CAAA;EACA,gCAAA;EAIA,sBAAA;EACA,8BAAA;EACA,8BAAA;EACA,6BAAA;EACA,8BAAA;EACA,uDAAA;EACA,6CAAA;EACA,8BAAA;EAKA,uBAAA;EACA,qBAAA;EACA,2BAAA;EACA,4BAAA;EACA,wCAAA;EACA,kDAAA;EACA,qBAAA;EACA,2BAAA;EACA,0BAAA;EACA,kCAAA;EAC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iCAAA;EACA,6BAAA;EAGA,mCAAA;EAEA,sBAAA;EAEA,mCAAA;EAEA,0BAAA","file":"eap.css"}
1
+ {"version":3,"sources":["eap.less","var.less"],"names":[],"mappings":"AAEA;EAEE,wBAAA;EACA,gCAAA;EACA,gCAAA;EACA,gCAAA;EACA,+BAAA;EACA,yDAAA;EACA,+CAAA;EACA,gCAAA;EAGA,qBAAA;EACA,6BAAA;EACA,6BAAA;EACA,6BAAA;EACA,4BAAA;EACA,sDAAA;EACA,6CAAA;EACA,6BAAA;EAGA,wBAAA;EACA,gCAAA;EACA,gCAAA;EACA,gCAAA;EACA,+BAAA;EACA,yDAAA;EACA,gDAAA;EACA,gCAAA;EAGA,2BAAA;EAGA,wBAAA;EACA,gCAAA;EACA,gCAAA;EACA,+BAAA;EACA,gCAAA;EACA,yDAAA;EACA,+CAAA;EACA,gCAAA;EAIA,sBAAA;EACA,8BAAA;EACA,8BAAA;EACA,6BAAA;EACA,8BAAA;EACA,uDAAA;EACA,6CAAA;EACA,8BAAA;EAKA,uBAAA;EACA,qBAAA;EACA,2BAAA;EACA,4BAAA;EACA,wCAAA;EACA,kDAAA;EACA,qBAAA;EACA,2BAAA;EACA,0BAAA;EACA,kCAAA;EACA,aAAA;EACA,aAAA;EAGA,uBAAA;EACA,4BAAA;EACA,eCJwB,6BAA2B,eAAc,oBAAmB,mBAAkB,yBDItG;EACA,kDAAA;EACA,sBAAA;EACA,qBAAA;EACA,2CAAA;EACA,oCAAA;EACA,6BAAA;EACA,sBAAA;EACA,uBAAA;EACA,uBAAA;EACA,uBAAA;EACA,4BAAA;EACA,yBAAA;EACA,0BAAA;EACA,8BAAA;EAGA,kBAAA;EACA,kBAAA;EACA,kBAAA;EACA,iBAAA;EAGA,4BAAA;EACA,6BAAA;EACA,wBAAA;EACA,0BAAA;EAGA,gCAAA;EACA,wCAAA;EACA,mCAAA;EACA,kBAAA;EACA,yBAAA;EACA,6BAAA;EACA,4BAAA;EACA,gCAAA;EACA,0BAAA;EAC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AAA;EAGA,kBAAA;EACA,sBAAA;EACA,sBAAA;EAGA,kBAAA;EACA,sBAAA;EACA,sBAAA;EAGA,kBAAA;EACA,sBAAA;EACA,sBAAA;EAGA,mBAAA;EACA,uBAAA;EACA,uBAAA;EAGA,oBAAA;EACA,wBAAA;EACA,wBAAA;EAGA,gBAAA;EACA,kBAAA;EACA,qBAAA;EACA,oBAAA;EACA,oBAAA;EACA,qBAAA;EACA,sBAAA;EACA,2BAAA;EACA,sBAAA;EACA,uBAAA;EACA,0BAAA;EACA,8BAAA;EAGA,sBAAA;EACA,6BAAA;EACA,uBAAA;EACA,0BAAA;EAGA,uBAAA;EACA,oBAAA;EACA,uBAAA;EACA,+BAAA;EACA,iCAAA;EACA,6BAAA;EAGA,wBAAA;EACA,sBAAA;EACA,sBAAA;EACA,6BAAA;EACA,2BAAA;EACA,2BAAA;EACA,iBAAA;EACA,oBAAA;EACA,2BAAA;EAGA,0BAAA;EAIA,qCAAA;EACA,qCAAA;EACA,+BAAA;EACA,2BAAA;EACA,oCAAA;EACA,0CAAA;EACA,0CAAA;EAGA,iCAAA;EACA,6BAAA;EACA,kCAAA;EACA,yBAAA;EACA,gCAAA;EACA,8BAAA;EACA,+BAAA;EACA,iCAAA;EACA,6BAAA;EAGA,mCAAA;EAEA,sBAAA;EAEA,mCAAA;EAEA,0BAAA","file":"eap.css"}
@@ -138,8 +138,8 @@
138
138
  @btn-font-size : @font-size-base;
139
139
  @btn-font-size-large : @font-size-large;
140
140
  @btn-font-size-small : @font-size-base;
141
- @btn-border-radius : 2px;
142
- @btn-border-radius-small: 1px;
141
+ @btn-border-radius : 20px;
142
+ @btn-border-radius-small: 10px;
143
143
  @btn-group-border : shade(@primary-color, 5%);
144
144
 
145
145
  @btn-disable-color : #999999;
@@ -218,8 +218,8 @@
218
218
  @input-color : @text-color;
219
219
  @input-border-color : @border-color-base;
220
220
  @input-border-color-tint-20 : tint(@input-border-color, 20%);
221
- @input-border-radius : @btn-border-radius;
222
- @input-border-radius-small : @btn-border-radius-small;
221
+ @input-border-radius : 2px;
222
+ @input-border-radius-small : 1px;
223
223
  @input-bg : #fff;
224
224
  @input-group-bg : #f8f8f9;
225
225
 
File without changes
File without changes
@@ -178,8 +178,8 @@ export default {
178
178
  --input-color: #666666;
179
179
  --input-border-color: #e0e0e0;
180
180
  --input-border-color-tint-20: #e6e6e6;
181
- --input-border-radius: 4px;
182
- --input-border-radius-small: 3px;
181
+ --input-border-radius: 2px;
182
+ --input-border-radius-small: 1px;
183
183
  --input-bg: #fff;
184
184
  --input-group-bg: #f8f8f9;
185
185
  --input-hover-border-color: #0091FF;
@@ -250,8 +250,8 @@ export default {
250
250
  --table-header-font-weight: normal;
251
251
  --table-cell-height: 30px;
252
252
  --table-cell-white-space: normal;
253
- --table-cell-padding-left: 18px;
254
- --table-cell-padding-right: 18px;
253
+ --table-cell-padding-left: 9px;
254
+ --table-cell-padding-right: 9px;
255
255
  --table-header-text-align: center;
256
256
  --table-data-text-align: left;
257
257
  --select-dropdown-max-height: 200px;
package/package.json CHANGED
@@ -1,22 +1,22 @@
1
- {
2
- "name": "@lambo-design/shared",
3
- "version": "1.0.0-beta.72",
4
- "description": "",
5
- "main": "index.js",
6
- "author": "lambo",
7
- "license": "ISC",
8
- "publishConfig": {
9
- "access": "public",
10
- "registry": "https://registry.npmjs.org/"
11
- },
12
- "dependencies": {
13
- "axios": "^0.24.0",
14
- "axios-cache-plugin": "^0.1.0",
15
- "qs": "^6.11.0",
16
- "xlsx": "http://cicd.lambo.top/package/cdn/xlsx-0.19.1.tgz",
17
- "classnames": "^2.3.1",
18
- "xlsx-style": "^0.8.13",
19
- "moment": "2.29.4"
20
- },
21
- "scripts": {}
22
- }
1
+ {
2
+ "name": "@lambo-design/shared",
3
+ "version": "1.0.0-beta.74",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {},
7
+ "author": "lambo",
8
+ "license": "ISC",
9
+ "publishConfig": {
10
+ "access": "public",
11
+ "registry": "https://registry.npmjs.org/"
12
+ },
13
+ "dependencies": {
14
+ "axios": "^0.24.0",
15
+ "axios-cache-plugin": "^0.1.0",
16
+ "qs": "^6.11.0",
17
+ "xlsx": "http://cicd.lambo.top/package/cdn/xlsx-0.19.1.tgz",
18
+ "classnames": "^2.3.1",
19
+ "xlsx-style": "^0.8.13",
20
+ "moment": "2.29.4"
21
+ }
22
+ }
package/utils/base64.js CHANGED
@@ -1,126 +1,126 @@
1
- let Base64 = {
2
- Base64Chars:
3
- "abcdefghijklmnopqrstuv" +
4
- "wxyzABCDEFGHIJKLMNOP" +
5
- "QRSTUVWXYZ0123456789@*-",
6
- /**
7
- * Encode a string to a Base64 string follow Bse64 regular.
8
- * @param s, a normal string
9
- * @return a Base64 string
10
- */
11
- encode: function (s) {
12
- if (!s || s.length == 0) return s;
13
-
14
- var d = "";
15
- var b = this.ucs2_utf8(s);
16
- var b0, b1, b2, b3;
17
- var len = b.length;
18
- var i = 0;
19
- while (i < len) {
20
- var tmp = b[i++];
21
- b0 = (tmp & 0xfc) >> 2;
22
- b1 = (tmp & 0x03) << 4;
23
- if (i < len) {
24
- tmp = b[i++];
25
- b1 |= (tmp & 0xf0) >> 4;
26
- b2 = (tmp & 0x0f) << 2;
27
- if (i < len) {
28
- tmp = b[i++];
29
- b2 |= (tmp & 0xc0) >> 6;
30
- b3 = tmp & 0x3f;
31
- } else {
32
- b3 = 64; // 1 byte "-" is supplement
33
-
34
- }
35
- } else {
36
- b2 = b3 = 64; // 2 bytes "-" are supplement
37
-
38
- }
39
-
40
- d += this.Base64Chars.charAt(b0);
41
- d += this.Base64Chars.charAt(b1);
42
- d += this.Base64Chars.charAt(b2);
43
- d += this.Base64Chars.charAt(b3);
44
- }
45
-
46
- return d;
47
-
48
- },
49
-
50
- /**
51
- * Encodes a ucs2 string to a utf8 integer array.
52
- * @param s, a string
53
- * @return an integer array
54
- */
55
- ucs2_utf8: function (s) {
56
- if (!s) return null;
57
- var d = new Array();
58
- if (s == "") return d;
59
-
60
- var c = 0, i = 0, j = 0;
61
- var len = s.length;
62
- while (i < len) {
63
- c = s.charCodeAt(i++);
64
- if (c <= 0x7f) {
65
- // 1 byte
66
-
67
- d[j++] = c;
68
- } else if ((c >= 0x80) && (c <= 0x7ff)) {
69
- // 2 bytes
70
-
71
- d[j++] = ((c >> 6) & 0x1f) | 0xc0;
72
- d[j++] = (c & 0x3f) | 0x80;
73
- } else {
74
- // 3 bytes
75
-
76
- d[j++] = (c >> 12) | 0xe0;
77
- d[j++] = ((c >> 6) & 0x3f) | 0x80;
78
- d[j++] = (c & 0x3f) | 0x80;
79
- }
80
- }
81
-
82
- return d;
83
- },
84
- /**
85
- * Encodes a utf8 integer array to a ucs2 string.
86
- * @param s, an integer array
87
- * @return a string
88
- */
89
- utf8_ucs2: function (s) {
90
- if (!s) return null;
91
- var len = s.length;
92
- if (len == 0) return "";
93
-
94
- var d = "";
95
- var c = 0, i = 0, tmp = 0;
96
- while (i < len) {
97
- c = s[i++];
98
- if ((c & 0xe0) == 0xe0) {
99
- // 3 bytes
100
-
101
- tmp = (c & 0x0f) << 12;
102
- c = s[i++];
103
- tmp |= ((c & 0x3f) << 6);
104
- c = s[i++];
105
- tmp |= (c & 0x3f);
106
- } else if ((c & 0xc0) == 0xc0) {
107
- // 2 bytes
108
-
109
- tmp = (c & 0x1f) << 6;
110
- c = s[i++];
111
- tmp |= (c & 0x3f);
112
- } else {
113
- // 1 byte
114
-
115
- tmp = c;
116
- }
117
-
118
- d += String.fromCharCode(tmp);
119
- }
120
-
121
- return d;
122
- }
123
- };
124
- export {
125
- Base64
126
- }
1
+ let Base64 = {
2
+ Base64Chars:
3
+ "abcdefghijklmnopqrstuv" +
4
+ "wxyzABCDEFGHIJKLMNOP" +
5
+ "QRSTUVWXYZ0123456789@*-",
6
+ /**
7
+ * Encode a string to a Base64 string follow Bse64 regular.
8
+ * @param s, a normal string
9
+ * @return a Base64 string
10
+ */
11
+ encode: function (s) {
12
+ if (!s || s.length == 0) return s;
13
+
14
+ var d = "";
15
+ var b = this.ucs2_utf8(s);
16
+ var b0, b1, b2, b3;
17
+ var len = b.length;
18
+ var i = 0;
19
+ while (i < len) {
20
+ var tmp = b[i++];
21
+ b0 = (tmp & 0xfc) >> 2;
22
+ b1 = (tmp & 0x03) << 4;
23
+ if (i < len) {
24
+ tmp = b[i++];
25
+ b1 |= (tmp & 0xf0) >> 4;
26
+ b2 = (tmp & 0x0f) << 2;
27
+ if (i < len) {
28
+ tmp = b[i++];
29
+ b2 |= (tmp & 0xc0) >> 6;
30
+ b3 = tmp & 0x3f;
31
+ } else {
32
+ b3 = 64; // 1 byte "-" is supplement
33
+
34
+ }
35
+ } else {
36
+ b2 = b3 = 64; // 2 bytes "-" are supplement
37
+
38
+ }
39
+
40
+ d += this.Base64Chars.charAt(b0);
41
+ d += this.Base64Chars.charAt(b1);
42
+ d += this.Base64Chars.charAt(b2);
43
+ d += this.Base64Chars.charAt(b3);
44
+ }
45
+
46
+ return d;
47
+
48
+ },
49
+
50
+ /**
51
+ * Encodes a ucs2 string to a utf8 integer array.
52
+ * @param s, a string
53
+ * @return an integer array
54
+ */
55
+ ucs2_utf8: function (s) {
56
+ if (!s) return null;
57
+ var d = new Array();
58
+ if (s == "") return d;
59
+
60
+ var c = 0, i = 0, j = 0;
61
+ var len = s.length;
62
+ while (i < len) {
63
+ c = s.charCodeAt(i++);
64
+ if (c <= 0x7f) {
65
+ // 1 byte
66
+
67
+ d[j++] = c;
68
+ } else if ((c >= 0x80) && (c <= 0x7ff)) {
69
+ // 2 bytes
70
+
71
+ d[j++] = ((c >> 6) & 0x1f) | 0xc0;
72
+ d[j++] = (c & 0x3f) | 0x80;
73
+ } else {
74
+ // 3 bytes
75
+
76
+ d[j++] = (c >> 12) | 0xe0;
77
+ d[j++] = ((c >> 6) & 0x3f) | 0x80;
78
+ d[j++] = (c & 0x3f) | 0x80;
79
+ }
80
+ }
81
+
82
+ return d;
83
+ },
84
+ /**
85
+ * Encodes a utf8 integer array to a ucs2 string.
86
+ * @param s, an integer array
87
+ * @return a string
88
+ */
89
+ utf8_ucs2: function (s) {
90
+ if (!s) return null;
91
+ var len = s.length;
92
+ if (len == 0) return "";
93
+
94
+ var d = "";
95
+ var c = 0, i = 0, tmp = 0;
96
+ while (i < len) {
97
+ c = s[i++];
98
+ if ((c & 0xe0) == 0xe0) {
99
+ // 3 bytes
100
+
101
+ tmp = (c & 0x0f) << 12;
102
+ c = s[i++];
103
+ tmp |= ((c & 0x3f) << 6);
104
+ c = s[i++];
105
+ tmp |= (c & 0x3f);
106
+ } else if ((c & 0xc0) == 0xc0) {
107
+ // 2 bytes
108
+
109
+ tmp = (c & 0x1f) << 6;
110
+ c = s[i++];
111
+ tmp |= (c & 0x3f);
112
+ } else {
113
+ // 1 byte
114
+
115
+ tmp = c;
116
+ }
117
+
118
+ d += String.fromCharCode(tmp);
119
+ }
120
+
121
+ return d;
122
+ }
123
+ };
124
+ export {
125
+ Base64
126
+ }