@lingxiteam/assets 0.11.30-alpha.8 → 1.0.10-alpha.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/README.md +2 -2
- package/es/error/errorDisplay/animation.less +112 -112
- package/es/security/httpEncryption.js +4 -4
- package/es/svg/check.svg +9 -9
- package/es/svg/normal-check.svg +9 -9
- package/package.json +41 -42
- package/es/IconSvg/index.d.ts +0 -6
- package/es/IconSvg/index.js +0 -23
- package/es/error/errorDisplay/Mobile/Drawer/Drawer.js +0 -104
- package/es/error/errorDisplay/Mobile/Drawer/Drawer.less +0 -201
- package/es/error/errorDisplay/Mobile/Drawer/index.js +0 -132
- package/es/error/errorDisplay/Mobile/ErrorMsg/index.js +0 -199
- package/es/error/errorDisplay/Mobile/Modal/Modal.js +0 -43
- package/es/error/errorDisplay/Mobile/Modal/Modal.less +0 -146
- package/es/error/errorDisplay/Mobile/Modal/index.js +0 -119
- package/es/error/errorDisplay/Mobile/defaultGlobalConfig.js +0 -13
- package/es/error/errorDisplay/Web/Drawer/Drawer.js +0 -264
- package/es/error/errorDisplay/Web/Drawer/Drawer.less +0 -381
- package/es/error/errorDisplay/Web/Drawer/DrawerConnect.js +0 -203
- package/es/error/errorDisplay/Web/Drawer/index.js +0 -124
- package/es/error/errorDisplay/Web/ErrorMsg/index.js +0 -269
- package/es/error/errorDisplay/Web/Notification/Notice.js +0 -151
- package/es/error/errorDisplay/Web/Notification/Notification.js +0 -139
- package/es/error/errorDisplay/Web/Notification/Notification.less +0 -137
- package/es/error/errorDisplay/Web/Notification/index.js +0 -85
- package/es/error/errorDisplay/Web/defaultGlobalConfig.js +0 -21
- package/es/index.d.ts +0 -5
- package/es/index.js +0 -6
- package/es/security/const.d.ts +0 -14
- package/es/security/const.js +0 -16
- package/es/security/encipher/aes.d.ts +0 -2
- package/es/security/encipher/aes.js +0 -26
- package/es/security/encipher/des.d.ts +0 -2
- package/es/security/encipher/des.js +0 -25
- package/es/security/encipher/rsa.d.ts +0 -2
- package/es/security/encipher/rsa.js +0 -17
- package/es/security/encipher/sign.d.ts +0 -6
- package/es/security/encipher/sign.js +0 -122
- package/es/security/fetch.d.ts +0 -9
- package/es/security/fetch.js +0 -205
- package/es/security/index.d.ts +0 -26
- package/es/security/index.js +0 -10
- package/es/utils/img.d.ts +0 -1
- package/es/utils/img.js +0 -3
- package/es/utils/url.d.ts +0 -2
- package/es/utils/url.js +0 -30
package/README.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
## 主题
|
|
2
|
-
|
|
1
|
+
## 主题
|
|
2
|
+
|
|
3
3
|
通过 `document.documentElement.setAttribute('data-prefers-color', 'dark');` 开启暗黑风格
|
|
@@ -1,112 +1,112 @@
|
|
|
1
|
-
@keyframes lxFadeIn {
|
|
2
|
-
from {
|
|
3
|
-
opacity: 0;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
to {
|
|
7
|
-
opacity: 1;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
@keyframes lxFadeOut {
|
|
12
|
-
from {
|
|
13
|
-
opacity: 1;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
to {
|
|
17
|
-
opacity: 0;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
@keyframes lxMoveOpen {
|
|
22
|
-
from {
|
|
23
|
-
transform: translateX(100%);
|
|
24
|
-
opacity: 0;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
to {
|
|
28
|
-
transform: translateX(0);
|
|
29
|
-
opacity: 1;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@keyframes lxMoveClose {
|
|
34
|
-
from {
|
|
35
|
-
transform: translateX(0);
|
|
36
|
-
opacity: 1;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
to {
|
|
40
|
-
transform: translateX(100%);
|
|
41
|
-
opacity: 0;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
@keyframes lxmModalOpen {
|
|
47
|
-
from {
|
|
48
|
-
transform: scale(0.6);
|
|
49
|
-
opacity: 0;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
to {
|
|
53
|
-
transform: scale(1);
|
|
54
|
-
opacity: 1;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
@keyframes lxmModalClose {
|
|
59
|
-
from {
|
|
60
|
-
transform: scale(1);
|
|
61
|
-
opacity: 1;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
to {
|
|
65
|
-
transform: scale(0.6);
|
|
66
|
-
opacity: 0;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
@keyframes lxmModalMaskClose {
|
|
71
|
-
from {
|
|
72
|
-
opacity: 1;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
to {
|
|
76
|
-
opacity: 0;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
@keyframes lxmDrawerOpen {
|
|
81
|
-
from {
|
|
82
|
-
transform: translateX(100%);
|
|
83
|
-
opacity: 0;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
to {
|
|
87
|
-
transform: translateX(0);
|
|
88
|
-
opacity: 1;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
@keyframes lxmDrawerClose {
|
|
93
|
-
from {
|
|
94
|
-
transform: translateX(0);
|
|
95
|
-
opacity: 1;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
to {
|
|
99
|
-
transform: translateX(100%);
|
|
100
|
-
opacity: 0;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
@keyframes lxCloseRotate {
|
|
105
|
-
form {
|
|
106
|
-
transform: rotate(0);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
to {
|
|
110
|
-
transform: rotate(180deg);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
1
|
+
@keyframes lxFadeIn {
|
|
2
|
+
from {
|
|
3
|
+
opacity: 0;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
to {
|
|
7
|
+
opacity: 1;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@keyframes lxFadeOut {
|
|
12
|
+
from {
|
|
13
|
+
opacity: 1;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
to {
|
|
17
|
+
opacity: 0;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@keyframes lxMoveOpen {
|
|
22
|
+
from {
|
|
23
|
+
transform: translateX(100%);
|
|
24
|
+
opacity: 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
to {
|
|
28
|
+
transform: translateX(0);
|
|
29
|
+
opacity: 1;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@keyframes lxMoveClose {
|
|
34
|
+
from {
|
|
35
|
+
transform: translateX(0);
|
|
36
|
+
opacity: 1;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
to {
|
|
40
|
+
transform: translateX(100%);
|
|
41
|
+
opacity: 0;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
@keyframes lxmModalOpen {
|
|
47
|
+
from {
|
|
48
|
+
transform: scale(0.6);
|
|
49
|
+
opacity: 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
to {
|
|
53
|
+
transform: scale(1);
|
|
54
|
+
opacity: 1;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@keyframes lxmModalClose {
|
|
59
|
+
from {
|
|
60
|
+
transform: scale(1);
|
|
61
|
+
opacity: 1;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
to {
|
|
65
|
+
transform: scale(0.6);
|
|
66
|
+
opacity: 0;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@keyframes lxmModalMaskClose {
|
|
71
|
+
from {
|
|
72
|
+
opacity: 1;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
to {
|
|
76
|
+
opacity: 0;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@keyframes lxmDrawerOpen {
|
|
81
|
+
from {
|
|
82
|
+
transform: translateX(100%);
|
|
83
|
+
opacity: 0;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
to {
|
|
87
|
+
transform: translateX(0);
|
|
88
|
+
opacity: 1;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@keyframes lxmDrawerClose {
|
|
93
|
+
from {
|
|
94
|
+
transform: translateX(0);
|
|
95
|
+
opacity: 1;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
to {
|
|
99
|
+
transform: translateX(100%);
|
|
100
|
+
opacity: 0;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@keyframes lxCloseRotate {
|
|
105
|
+
form {
|
|
106
|
+
transform: rotate(0);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
to {
|
|
110
|
+
transform: rotate(180deg);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* eslint-disable no-console */
|
|
2
|
-
/*
|
|
3
|
-
* @Author: 张国永 zhang.guoyong2@iwhalecloud.com
|
|
4
|
-
* @Date: 2022-08-08 15:08:58
|
|
5
|
-
* @Description: 一个简单的http请求安全加密处理
|
|
2
|
+
/*
|
|
3
|
+
* @Author: 张国永 zhang.guoyong2@iwhalecloud.com
|
|
4
|
+
* @Date: 2022-08-08 15:08:58
|
|
5
|
+
* @Description: 一个简单的http请求安全加密处理
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
// TODO 支持XMLHttpRequest拦截、参数混淆、响应拦截
|
package/es/svg/check.svg
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<svg width="22px" height="22px" viewBox="0 0 22 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
-
<title>全局样式:20/原子级控件/复选/状态:#选中</title>
|
|
4
|
-
<g id="控件" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
-
<g id="system-complete">
|
|
6
|
-
<path d="M11,0 C17.075904,0 22,4.92409598 22,11 C22,17.075904 17.0734732,22 11,22 C4.92652679,22 0,17.0734732 0,11 C0,4.92652679 4.92409598,0 11,0 Z" id="Shape" fill="#1890FF"></path>
|
|
7
|
-
<path d="M9.42871875,12.9681652 L7.2069029,10.7463493 C6.90006126,10.4395077 6.40257267,10.4395077 6.09573103,10.7463493 C5.78889035,11.05319 5.78889035,11.550677 6.09573103,11.8575177 C6.09573161,11.8575183 6.0957322,11.8575189 6.09573278,11.8575195 L8.72212536,14.4838955 C9.11265701,14.8744045 9.74581424,14.874407 10.136349,14.483901 L10.5404063,14.0798527 L10.5404063,14.0798527 L16.2813591,8.33795955 C16.588183,8.03108543 16.5881626,7.53359119 16.2813136,7.22674219 C15.974472,6.91990055 15.4769834,6.91990055 15.1701417,7.22674219 L9.42871875,12.9681652 L9.42871875,12.9681652 Z" id="Path" fill="#FFFFFF"></path>
|
|
8
|
-
</g>
|
|
9
|
-
</g>
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="22px" height="22px" viewBox="0 0 22 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>全局样式:20/原子级控件/复选/状态:#选中</title>
|
|
4
|
+
<g id="控件" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
+
<g id="system-complete">
|
|
6
|
+
<path d="M11,0 C17.075904,0 22,4.92409598 22,11 C22,17.075904 17.0734732,22 11,22 C4.92652679,22 0,17.0734732 0,11 C0,4.92652679 4.92409598,0 11,0 Z" id="Shape" fill="#1890FF"></path>
|
|
7
|
+
<path d="M9.42871875,12.9681652 L7.2069029,10.7463493 C6.90006126,10.4395077 6.40257267,10.4395077 6.09573103,10.7463493 C5.78889035,11.05319 5.78889035,11.550677 6.09573103,11.8575177 C6.09573161,11.8575183 6.0957322,11.8575189 6.09573278,11.8575195 L8.72212536,14.4838955 C9.11265701,14.8744045 9.74581424,14.874407 10.136349,14.483901 L10.5404063,14.0798527 L10.5404063,14.0798527 L16.2813591,8.33795955 C16.588183,8.03108543 16.5881626,7.53359119 16.2813136,7.22674219 C15.974472,6.91990055 15.4769834,6.91990055 15.1701417,7.22674219 L9.42871875,12.9681652 L9.42871875,12.9681652 Z" id="Path" fill="#FFFFFF"></path>
|
|
8
|
+
</g>
|
|
9
|
+
</g>
|
|
10
10
|
</svg>
|
package/es/svg/normal-check.svg
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<svg width="22px" height="22px" viewBox="0 0 22 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
-
<title>全局样式:20/原子级控件/复选/状态:未选中</title>
|
|
4
|
-
<g id="控件" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
-
<g id="元素/选择/未选中">
|
|
6
|
-
<path d="M11,22 C4.93492502,22 0,17.0653546 0,10.999496 C0,4.9337633 4.93492502,0 11,0 C17.065075,0 22,4.93464539 22,10.999496 C22,17.0644725 17.0660846,22 11,22" id="Fill" fill="#FFFFFF"></path>
|
|
7
|
-
<path d="M11,0.5 C13.8998633,0.5 16.5248731,1.67505184 18.4249106,3.57508938 C20.3249482,5.47512693 21.5,8.10013672 21.5,11 C21.5,13.8995696 20.3245821,16.5243277 18.4245965,18.4243132 C16.5242275,20.3246822 13.8989967,21.5 11,21.5 C8.10129687,21.5 5.47631792,20.324316 3.57600094,18.4239991 C1.67568396,16.5236821 0.5,13.8987031 0.5,11 C0.5,8.10100334 1.67531776,5.47577251 3.57568679,3.57540349 C5.47567234,1.67541793 8.10043037,0.5 11,0.5 Z" id="Shape" stroke="#CCCCCC"></path>
|
|
8
|
-
</g>
|
|
9
|
-
</g>
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="22px" height="22px" viewBox="0 0 22 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>全局样式:20/原子级控件/复选/状态:未选中</title>
|
|
4
|
+
<g id="控件" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
+
<g id="元素/选择/未选中">
|
|
6
|
+
<path d="M11,22 C4.93492502,22 0,17.0653546 0,10.999496 C0,4.9337633 4.93492502,0 11,0 C17.065075,0 22,4.93464539 22,10.999496 C22,17.0644725 17.0660846,22 11,22" id="Fill" fill="#FFFFFF"></path>
|
|
7
|
+
<path d="M11,0.5 C13.8998633,0.5 16.5248731,1.67505184 18.4249106,3.57508938 C20.3249482,5.47512693 21.5,8.10013672 21.5,11 C21.5,13.8995696 20.3245821,16.5243277 18.4245965,18.4243132 C16.5242275,20.3246822 13.8989967,21.5 11,21.5 C8.10129687,21.5 5.47631792,20.324316 3.57600094,18.4239991 C1.67568396,16.5236821 0.5,13.8987031 0.5,11 C0.5,8.10100334 1.67531776,5.47577251 3.57568679,3.57540349 C5.47567234,1.67541793 8.10043037,0.5 11,0.5 Z" id="Shape" stroke="#CCCCCC"></path>
|
|
8
|
+
</g>
|
|
9
|
+
</g>
|
|
10
10
|
</svg>
|
package/package.json
CHANGED
|
@@ -1,42 +1,41 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@lingxiteam/assets",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "灵犀低代码平台移动端 - 工具类",
|
|
5
|
-
"main": "lib/index.js",
|
|
6
|
-
"module": "es/index.js",
|
|
7
|
-
"types": "lib/index.d.ts",
|
|
8
|
-
"typings": "es/index.d.ts",
|
|
9
|
-
"authors": [],
|
|
10
|
-
"files": [
|
|
11
|
-
"es",
|
|
12
|
-
"dist",
|
|
13
|
-
"*.md"
|
|
14
|
-
],
|
|
15
|
-
"publishConfig": {
|
|
16
|
-
"access": "public"
|
|
17
|
-
},
|
|
18
|
-
"scripts": {
|
|
19
|
-
"exports": "node ./scripts/exports.js",
|
|
20
|
-
"prebuild-component": "npm run exports",
|
|
21
|
-
"build-component": "father-build",
|
|
22
|
-
"watch": "father-build -w",
|
|
23
|
-
"test": "cross-env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha"
|
|
24
|
-
},
|
|
25
|
-
"keywords": [],
|
|
26
|
-
"peerDependencies": {
|
|
27
|
-
"react": ">=16.8.6"
|
|
28
|
-
},
|
|
29
|
-
"devDependencies": {
|
|
30
|
-
"babel-preset-env": "^1.7.0",
|
|
31
|
-
"babel-register": "^6.26.0",
|
|
32
|
-
"father-build": "1.20.4",
|
|
33
|
-
"mocha": "^10.0.0",
|
|
34
|
-
"ts-node": "^10.9.1"
|
|
35
|
-
},
|
|
36
|
-
"gitHead": "bcd338198e2c14459538542d10600ab03abc92f2",
|
|
37
|
-
"dependencies": {
|
|
38
|
-
"crypto-js": "^4.1.1",
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@lingxiteam/assets",
|
|
3
|
+
"version": "1.0.10-alpha.1",
|
|
4
|
+
"description": "灵犀低代码平台移动端 - 工具类",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"module": "es/index.js",
|
|
7
|
+
"types": "lib/index.d.ts",
|
|
8
|
+
"typings": "es/index.d.ts",
|
|
9
|
+
"authors": [],
|
|
10
|
+
"files": [
|
|
11
|
+
"es",
|
|
12
|
+
"dist",
|
|
13
|
+
"*.md"
|
|
14
|
+
],
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"exports": "node ./scripts/exports.js",
|
|
20
|
+
"prebuild-component": "npm run exports",
|
|
21
|
+
"build-component": "father-build",
|
|
22
|
+
"watch": "father-build -w",
|
|
23
|
+
"test": "cross-env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [],
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"react": ">=16.8.6"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"babel-preset-env": "^1.7.0",
|
|
31
|
+
"babel-register": "^6.26.0",
|
|
32
|
+
"father-build": "1.20.4",
|
|
33
|
+
"mocha": "^10.0.0",
|
|
34
|
+
"ts-node": "^10.9.1"
|
|
35
|
+
},
|
|
36
|
+
"gitHead": "bcd338198e2c14459538542d10600ab03abc92f2",
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"crypto-js": "^4.1.1",
|
|
39
|
+
"jsencrypt": "^3.1.0"
|
|
40
|
+
}
|
|
41
|
+
}
|
package/es/IconSvg/index.d.ts
DELETED
package/es/IconSvg/index.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
var _excluded = ["style", "src"];
|
|
3
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
9
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
10
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
import { getSvgImageBase64 } from '../utils/img';
|
|
12
|
-
var IconSvg = function IconSvg(props) {
|
|
13
|
-
var _props$style = props.style,
|
|
14
|
-
style = _props$style === void 0 ? {} : _props$style,
|
|
15
|
-
src = props.src,
|
|
16
|
-
restProps = _objectWithoutProperties(props, _excluded);
|
|
17
|
-
return _jsx("i", _objectSpread(_objectSpread({}, restProps), {}, {
|
|
18
|
-
style: _objectSpread(_objectSpread({}, restProps), {}, {
|
|
19
|
-
backgroundImage: getSvgImageBase64(src)
|
|
20
|
-
})
|
|
21
|
-
}));
|
|
22
|
-
};
|
|
23
|
-
export default IconSvg;
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import React, { forwardRef, isValidElement } from 'react';
|
|
2
|
-
import classnames from 'classnames';
|
|
3
|
-
import { BackIcon } from '../../SVGstring';
|
|
4
|
-
import { getSvgImageBase64 } from '../../../../utils/img';
|
|
5
|
-
import './Drawer.less';
|
|
6
|
-
var isDomEle = function isDomEle(target) {
|
|
7
|
-
return typeof target === 'string' || /*#__PURE__*/isValidElement(target);
|
|
8
|
-
};
|
|
9
|
-
var emptyTxt = '暂无匹配信息,请联系平台管理员';
|
|
10
|
-
var Drawer = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
11
|
-
var visible = props.visible,
|
|
12
|
-
title = props.title,
|
|
13
|
-
tabs = props.tabs,
|
|
14
|
-
activeTabsKey = props.activeTabsKey,
|
|
15
|
-
onTabsChange = props.onTabsChange,
|
|
16
|
-
dataSource = props.dataSource,
|
|
17
|
-
onCancel = props.onCancel,
|
|
18
|
-
onClickRecord = props.onClickRecord,
|
|
19
|
-
_props$mode = props.mode,
|
|
20
|
-
mode = _props$mode === void 0 ? 'content' : _props$mode;
|
|
21
|
-
var renderItems = function renderItems() {
|
|
22
|
-
if (Array.isArray(dataSource) && dataSource.length > 0) {
|
|
23
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
24
|
-
className: "lxm-drawer-list"
|
|
25
|
-
}, dataSource.map(function (item) {
|
|
26
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
27
|
-
key: item === null || item === void 0 ? void 0 : item.key,
|
|
28
|
-
className: classnames('lxm-drawer-list-item', item === null || item === void 0 ? void 0 : item.status),
|
|
29
|
-
onClick: function onClick() {
|
|
30
|
-
onClickRecord(item);
|
|
31
|
-
}
|
|
32
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
33
|
-
className: "lxm-drawer-list-item-dt"
|
|
34
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
35
|
-
className: "lxm-drawer-list-item-dt-title"
|
|
36
|
-
}, (item === null || item === void 0 ? void 0 : item.title) || ''), (item === null || item === void 0 ? void 0 : item.extra) ? /*#__PURE__*/React.createElement("div", {
|
|
37
|
-
className: "lxm-drawer-list-item-dt-extra"
|
|
38
|
-
}, item === null || item === void 0 ? void 0 : item.extra) : ''), /*#__PURE__*/React.createElement("div", {
|
|
39
|
-
className: "lxm-drawer-list-item-dd"
|
|
40
|
-
}, (item === null || item === void 0 ? void 0 : item.content) || ''));
|
|
41
|
-
}));
|
|
42
|
-
}
|
|
43
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
44
|
-
className: "lxm-drawer-empty"
|
|
45
|
-
}, "\u6682\u65E0\u6570\u636E");
|
|
46
|
-
};
|
|
47
|
-
var renderContent = function renderContent() {
|
|
48
|
-
if (dataSource && ((dataSource === null || dataSource === void 0 ? void 0 : dataSource.title) || (dataSource === null || dataSource === void 0 ? void 0 : dataSource.author) || (dataSource === null || dataSource === void 0 ? void 0 : dataSource.content))) {
|
|
49
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
50
|
-
className: "lxm-drawer-content"
|
|
51
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
52
|
-
className: "lxm-drawer-content-head"
|
|
53
|
-
}, isDomEle(dataSource === null || dataSource === void 0 ? void 0 : dataSource.title) ? /*#__PURE__*/React.createElement("div", {
|
|
54
|
-
className: "lxm-drawer-content-head-title"
|
|
55
|
-
}, dataSource === null || dataSource === void 0 ? void 0 : dataSource.title) : '', isDomEle(dataSource === null || dataSource === void 0 ? void 0 : dataSource.author) ? /*#__PURE__*/React.createElement("div", {
|
|
56
|
-
className: "lxm-drawer-content-head-author"
|
|
57
|
-
}, dataSource === null || dataSource === void 0 ? void 0 : dataSource.author) : ''), /*#__PURE__*/React.createElement("div", {
|
|
58
|
-
className: "lxm-drawer-content-body"
|
|
59
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
60
|
-
// eslint-disable-next-line react/no-danger
|
|
61
|
-
dangerouslySetInnerHTML: {
|
|
62
|
-
__html: dataSource === null || dataSource === void 0 ? void 0 : dataSource.content
|
|
63
|
-
}
|
|
64
|
-
})));
|
|
65
|
-
}
|
|
66
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
67
|
-
className: "lxm-drawer-empty"
|
|
68
|
-
}, emptyTxt);
|
|
69
|
-
};
|
|
70
|
-
return visible ? /*#__PURE__*/React.createElement("div", {
|
|
71
|
-
ref: ref,
|
|
72
|
-
className: "lxm-drawer-wraper"
|
|
73
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
74
|
-
className: "lxm-drawer-container"
|
|
75
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
76
|
-
className: "lxm-drawer-header"
|
|
77
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
78
|
-
className: "lxm-drawer-header-extend",
|
|
79
|
-
onClick: onCancel
|
|
80
|
-
}, /*#__PURE__*/React.createElement("img", {
|
|
81
|
-
src: getSvgImageBase64(BackIcon),
|
|
82
|
-
alt: "",
|
|
83
|
-
className: "lxm-drawer-header-close"
|
|
84
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
85
|
-
className: "lxm-drawer-header-title"
|
|
86
|
-
}, isDomEle(title) ? title : ''), /*#__PURE__*/React.createElement("div", {
|
|
87
|
-
className: "lxm-drawer-header-extend"
|
|
88
|
-
})), Array.isArray(tabs) && tabs.length > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
89
|
-
className: "lxm-drawer-tabs"
|
|
90
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
91
|
-
className: "lxm-drawer-tabs-row"
|
|
92
|
-
}, tabs.map(function (item) {
|
|
93
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
94
|
-
className: classnames('lxm-drawer-tabs-btn', activeTabsKey === (item === null || item === void 0 ? void 0 : item.key) ? 'active' : ''),
|
|
95
|
-
key: item === null || item === void 0 ? void 0 : item.key,
|
|
96
|
-
onClick: function onClick() {
|
|
97
|
-
onTabsChange(item);
|
|
98
|
-
}
|
|
99
|
-
}, item.tab);
|
|
100
|
-
}))) : '', /*#__PURE__*/React.createElement("div", {
|
|
101
|
-
className: "lxm-drawer-main"
|
|
102
|
-
}, mode === 'list' ? renderItems() : renderContent()))) : '';
|
|
103
|
-
});
|
|
104
|
-
export default Drawer;
|