@cniot/android-pda-components 0.2.20 → 0.2.21

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.
Files changed (113) hide show
  1. package/README.md +4 -21
  2. package/build/assets/index.51a8714a.css +1 -0
  3. package/build/assets/{index.66cd7994.js → index.b428d9a3.js} +16 -16
  4. package/build/assets/vendor.999402d8.js +40 -0
  5. package/build/index.html +3 -3
  6. package/package.json +1 -1
  7. package/packages/AppList/doc.jsx +138 -0
  8. package/packages/AppList/index.jsx +33 -0
  9. package/packages/AppList/index.less +52 -0
  10. package/packages/BaseLayout/BarcodeScan.jsx +88 -0
  11. package/packages/BaseLayout/BaseLayoutContainer.jsx +208 -0
  12. package/packages/BaseLayout/RfidOnce.jsx +106 -0
  13. package/packages/BaseLayout/RfidScan.jsx +118 -0
  14. package/packages/BaseLayout/doc.jsx +177 -0
  15. package/packages/BaseLayout/index.jsx +52 -0
  16. package/packages/BaseLayout/index.less +47 -0
  17. package/packages/Button/doc.jsx +62 -0
  18. package/packages/Button/index.jsx +27 -0
  19. package/packages/Button/index.less +62 -0
  20. package/packages/Confirm/doc.jsx +147 -0
  21. package/packages/Confirm/index.jsx +71 -0
  22. package/packages/Confirm/index.less +55 -0
  23. package/packages/Header/doc.jsx +171 -0
  24. package/packages/Header/index.jsx +191 -0
  25. package/packages/Header/index.less +71 -0
  26. package/packages/InfoCard/doc.jsx +244 -0
  27. package/packages/InfoCard/index.jsx +67 -0
  28. package/packages/InfoCard/index.less +111 -0
  29. package/packages/List/doc.jsx +89 -0
  30. package/packages/List/index.jsx +54 -0
  31. package/packages/List/index.less +43 -0
  32. package/packages/Overlay/doc.jsx +103 -0
  33. package/packages/Overlay/index.jsx +42 -0
  34. package/packages/Overlay/index.less +28 -0
  35. package/packages/PdaActionSheet/doc.jsx +193 -0
  36. package/packages/PdaActionSheet/index.jsx +44 -0
  37. package/packages/PdaActionSheet/index.less +65 -0
  38. package/packages/PdaDistanceCard/doc.jsx +62 -0
  39. package/packages/PdaDistanceCard/index.jsx +35 -0
  40. package/packages/PdaDistanceCard/index.less +42 -0
  41. package/packages/PdaFinishCard/doc.jsx +111 -0
  42. package/packages/PdaFinishCard/index.jsx +62 -0
  43. package/packages/PdaFinishCard/index.less +62 -0
  44. package/packages/PdaInfiniteScroll/doc.jsx +121 -0
  45. package/packages/PdaInfiniteScroll/index.jsx +114 -0
  46. package/packages/PdaInfiniteScroll/index.less +12 -0
  47. package/packages/PdaInfiniteScroll/utils.jsx +25 -0
  48. package/packages/PdaSteps/PdaStep/index.jsx +38 -0
  49. package/packages/PdaSteps/PdaStep/index.less +70 -0
  50. package/packages/PdaSteps/PdaSteps/index.jsx +33 -0
  51. package/packages/PdaSteps/PdaSteps/index.less +0 -0
  52. package/packages/PdaSteps/doc.jsx +131 -0
  53. package/packages/PdaSteps/index.jsx +5 -0
  54. package/packages/PdaTitle/doc.jsx +102 -0
  55. package/packages/PdaTitle/index.jsx +51 -0
  56. package/packages/Presentation/doc.jsx +72 -0
  57. package/packages/Presentation/index.jsx +25 -0
  58. package/packages/Presentation/index.less +31 -0
  59. package/packages/SelectCard/doc.jsx +57 -0
  60. package/packages/SelectCard/index.jsx +13 -0
  61. package/packages/SelectCard/index.less +30 -0
  62. package/packages/SimpleCard/doc.jsx +59 -0
  63. package/packages/SimpleCard/index.jsx +13 -0
  64. package/packages/SimpleCard/index.less +38 -0
  65. package/packages/SimpleCardBlock/doc.jsx +77 -0
  66. package/packages/SimpleCardBlock/index.jsx +43 -0
  67. package/packages/SimpleCardBlock/index.less +26 -0
  68. package/packages/SubCard/doc.jsx +63 -0
  69. package/packages/SubCard/index.jsx +28 -0
  70. package/packages/SubCard/index.less +64 -0
  71. package/packages/Tag/doc.jsx +47 -0
  72. package/packages/Tag/index.jsx +12 -0
  73. package/packages/Tag/index.less +22 -0
  74. package/packages/TaskCard/doc.jsx +151 -0
  75. package/packages/TaskCard/index.jsx +65 -0
  76. package/packages/TaskCard/index.less +101 -0
  77. package/packages/Toast/doc.jsx +112 -0
  78. package/packages/Toast/index.jsx +7 -0
  79. package/packages/Toast/index.less +23 -0
  80. package/packages/Toast/methods.jsx +77 -0
  81. package/packages/Toast/toast.jsx +96 -0
  82. package/packages/WakeKeyborard/doc.jsx +170 -0
  83. package/packages/WakeKeyborard/index.jsx +61 -0
  84. package/packages/WakeKeyborard/index.less +55 -0
  85. package/packages/WakeKeyborard/keyborard.jsx +61 -0
  86. package/packages/doc.jsx +19 -0
  87. package/packages/global.less +7 -0
  88. package/packages/index.jsx +60 -0
  89. package/packages/index.less +3 -0
  90. package/packages/pageflow-system-pages/alert/doc.jsx +70 -0
  91. package/packages/pageflow-system-pages/alert/index.jsx +22 -0
  92. package/packages/pageflow-system-pages/confirm/doc.jsx +118 -0
  93. package/packages/pageflow-system-pages/confirm/index.jsx +31 -0
  94. package/packages/pageflow-system-pages/debug/index.jsx +27 -0
  95. package/packages/pageflow-system-pages/debug/index.less +5 -0
  96. package/packages/pageflow-system-pages/index.jsx +38 -0
  97. package/packages/pageflow-system-pages/loading/index.jsx +37 -0
  98. package/packages/pageflow-system-pages/not-found/index.jsx +12 -0
  99. package/packages/pageflow-system-pages/not-found/index.less +26 -0
  100. package/packages/pageflow-system-pages/prompt/doc.jsx +95 -0
  101. package/packages/pageflow-system-pages/prompt/index.jsx +43 -0
  102. package/packages/pageflow-system-pages/prompt/index.less +44 -0
  103. package/packages/pageflow-system-pages/start/index.jsx +28 -0
  104. package/packages/pageflow-system-pages/start/index.less +12 -0
  105. package/packages/pageflow-system-pages/toast/doc.jsx +76 -0
  106. package/packages/pageflow-system-pages/toast/index.jsx +42 -0
  107. package/packages/utils/index.js +56 -0
  108. package/packages/variable.less +4 -0
  109. package/build/assets/index.b8d6d64c.css +0 -1
  110. package/build/assets/vendor.5080796b.js +0 -40
  111. package/es/index.cjs.js +0 -7
  112. package/es/index.es.js +0 -2194
  113. package/es/style.css +0 -1
@@ -0,0 +1,191 @@
1
+ import React from "react";
2
+ import keycode from "keycode";
3
+ import Button from "../Button";
4
+ import Overlay from "../Overlay";
5
+ import "./index.less";
6
+
7
+
8
+ // 在 android pda 里,fn 被触发为 0, 这里做特殊处理
9
+ const SPECIAL_KEY_MAP = ['fn'];
10
+
11
+ const empty = () => {};
12
+ /*
13
+ title,
14
+ onBack,
15
+ icon: ["scan"],
16
+ menus: [
17
+ {
18
+ label:"",
19
+ value:""
20
+ }
21
+ ],
22
+ onClickMenuItem: Empty
23
+ */
24
+ export default function (props) {
25
+ const {
26
+ onBack,
27
+ icon,
28
+ title,
29
+ menus = [],
30
+ onClickMenuItem = empty,
31
+ onScanBarcode,
32
+ cancelMenuText,
33
+ configIconClick = null,
34
+ menuShortcutKey,
35
+ backShortcutKey,
36
+ } = props;
37
+ const [showMenus, setShowMenus] = React.useState(false);
38
+
39
+ // menu弹出快捷键绑定
40
+ React.useEffect(
41
+ function () {
42
+ if (menuShortcutKey) {
43
+ return bindShortcutKey(
44
+ getShortcutKeyCodes(menuShortcutKey),
45
+ function () {
46
+ setShowMenus(true);
47
+ }
48
+ );
49
+ }
50
+ },
51
+ [menuShortcutKey]
52
+ );
53
+
54
+ // back 快捷键绑定
55
+ React.useEffect(
56
+ function () {
57
+ if (backShortcutKey && onBack) {
58
+ return bindShortcutKey(
59
+ getShortcutKeyCodes(backShortcutKey),
60
+ function () {
61
+ onBack("back");
62
+ }
63
+ );
64
+ }
65
+ },
66
+ [backShortcutKey, onBack]
67
+ );
68
+
69
+ //监听实体back键
70
+ React.useEffect(() => {
71
+ return onKeyBoradBack(function(){
72
+ onBack && onBack("back");
73
+ })
74
+ }, []);
75
+
76
+ // onScanBarcode
77
+ React.useEffect(() => {
78
+ return addEventListener(document, "BarcodeScan", function(e){
79
+ onScanBarcode && onScanBarcode(e.param.scanData)
80
+ })
81
+ }, [onScanBarcode])
82
+
83
+
84
+ return (
85
+ <div className="pda-header">
86
+ <div className="header-click-area">
87
+ {onBack ? (
88
+ <div className="pda-goback" onClick={() => onBack("back")}></div>
89
+ ) : null}
90
+ {icon && (
91
+ <div className={`pda-header-icon pda-header-icon-${icon}`}></div>
92
+ )}
93
+ </div>
94
+ <div className="pda-title-text">{title}</div>
95
+ {menus && menus.length ? (
96
+ <div className="pda-header-icon pda-header-more" onClick={() => setShowMenus(true)} />
97
+ ) : null}
98
+ {
99
+ configIconClick ? (
100
+ <div className="pda-header-icon pda-header-config" onClick={configIconClick} />
101
+ ) : null
102
+ }
103
+
104
+ <Overlay
105
+ visible={showMenus}
106
+ verticalPosition="bottom"
107
+ closable={false}
108
+ onClosed={() => setShowMenus(false)}
109
+ >
110
+ <div className="pda-menus">
111
+ {menus.map((item, index) => {
112
+ return (
113
+ <Button
114
+ onClick={() => {
115
+ setShowMenus(false);
116
+ onClickMenuItem(item);
117
+ }}
118
+ key={item.key || index}
119
+ >
120
+ {item.label}
121
+ </Button>
122
+ );
123
+ })}
124
+ {cancelMenuText ? (
125
+ <div style={{ marginTop: 20 }}>
126
+ <Button onClick={() => setShowMenus(false)}>
127
+ {cancelMenuText}
128
+ </Button>
129
+ </div>
130
+ ) : null}
131
+ </div>
132
+ </Overlay>
133
+ </div>
134
+ );
135
+ }
136
+
137
+ // 获取快捷键列表值,支持 , 号分割
138
+ // "F5,a" ===> [116, 56]
139
+ function getShortcutKeyCodes(shortcutKey) {
140
+ const shortcutKeys = shortcutKey.indexOf(",") > -1 ? shortcutKey.split(",") : [shortcutKey];
141
+ return shortcutKeys
142
+ .map((k) => {
143
+ if(SPECIAL_KEY_MAP.indexOf(k.toLowerCase()) > -1){
144
+ return k.toLowerCase();
145
+ }
146
+ const kc = keycode(k);
147
+ if (kc === undefined) {
148
+ console.warn("OPButton.shortcutKey error key value by:", k);
149
+ }
150
+ return kc;
151
+ })
152
+ .filter((k) => k !== undefined);
153
+ }
154
+
155
+ // 创建快捷键绑定
156
+ function bindShortcutKey(keys, callback) {
157
+ function keyUpCallback(event) {
158
+ // 处理特殊键
159
+ const key = event.key.toLowerCase();
160
+ const keyCode = SPECIAL_KEY_MAP.indexOf(key) > -1 ? key : event.keyCode;
161
+ if (keys.indexOf(keyCode) > -1) {
162
+ callback && callback(event);
163
+ }
164
+ }
165
+ document.addEventListener("keyup", keyUpCallback);
166
+ return function () {
167
+ document.removeEventListener("keyup", keyUpCallback);
168
+ };
169
+ }
170
+
171
+
172
+ function onKeyBoradBack(fn){
173
+ function keyPressed(data){
174
+ if ('back' == data.param.originValue) {
175
+ fn && fn()
176
+ }
177
+ }
178
+ document.addEventListener('keyPressed', keyPressed, false);
179
+ return function(){
180
+ document.removeEventListener('keyPressed', keyPressed);
181
+ }
182
+ }
183
+
184
+
185
+ // -addEventListener
186
+ function addEventListener(node, eventName, fn){
187
+ node.addEventListener(eventName, fn, false);
188
+ return function(){
189
+ node.removeEventListener(eventName, fn);
190
+ }
191
+ }
@@ -0,0 +1,71 @@
1
+ .pda-header {
2
+ background-color:#000000;
3
+ display: flex;
4
+ flex-direction: row;
5
+ // justify-content: center;
6
+ align-items: center;
7
+ color: white;
8
+ height: 84px;
9
+ .header-click-area {
10
+ height: 100%;
11
+ display: flex;
12
+ align-items: center;
13
+ flex-direction: row;
14
+ }
15
+ .pda-goback {
16
+ background-image: url(https://img.alicdn.com/imgextra/i4/O1CN01O46CYm1Gc4yvZtk7A_!!6000000000642-2-tps-36-64.png);
17
+ width: 18px;
18
+ height: 32px;
19
+ background-size: 100%;
20
+ margin-left: 28px;
21
+ margin-right: 8px;
22
+ }
23
+ .pda-header-icon {
24
+ height: 36px;
25
+ width: 36px;
26
+ margin-left: 16px;
27
+ background-size: 100%;
28
+ background-repeat: no-repeat;
29
+ background-position: center;
30
+ }
31
+ .pda-header-icon-scan {
32
+ background-image: url(https://img.alicdn.com/imgextra/i4/O1CN017UD9RM1vCKxsjxsrE_!!6000000006136-2-tps-68-68.png);
33
+ }
34
+ .pda-header-icon-select {
35
+ background-image: url(https://img.alicdn.com/imgextra/i2/O1CN0170QXc91udWriUp19S_!!6000000006060-2-tps-74-72.png);
36
+ }
37
+ .pda-header-icon-read {
38
+ background-image: url(https://img.alicdn.com/imgextra/i2/O1CN01EMphgH1ylYGXImCZn_!!6000000006619-2-tps-70-70.png);
39
+ }
40
+ .pda-title-text {
41
+ margin-left: 16px;
42
+ font-size: 40px;
43
+ flex:1;
44
+ }
45
+
46
+ .pda-header-more {
47
+ // height: 36px;
48
+ // width: 36px;
49
+ // margin-left: 16px;
50
+ background-image: url(https://img.alicdn.com/imgextra/i4/O1CN01dTdXds1p9gz4wKAve_!!6000000005318-2-tps-70-26.png);
51
+ // background-size: 100%;
52
+ // background-repeat: no-repeat;
53
+ // background-position: center;
54
+ // margin-right:15px;
55
+ }
56
+ .pda-header-config {
57
+ background-image: url(https://img.alicdn.com/imgextra/i3/O1CN01SKQH1k1p7rQYTBXdn_!!6000000005314-2-tps-56-60.png);
58
+ }
59
+
60
+ .pda-menus {
61
+ background-color: white;
62
+ border-radius: 8px 8px 0 0;
63
+ width: 100%;
64
+ padding: 24px;
65
+ display: flex;
66
+ flex-direction: column;
67
+ &>* {
68
+ margin-bottom: 12px;
69
+ }
70
+ }
71
+ }
@@ -0,0 +1,244 @@
1
+ import React from "react";
2
+ import InfoCard from "./index";
3
+ export default function () {
4
+ return (
5
+ <div>
6
+ <h1>InfoCard</h1>
7
+ <p>InfoCard</p>
8
+ <h2>示例</h2>
9
+ {/* const { className, title, highlightInfo, highlightInfoCN, highlightSubInfo, highlightSubInfoCN, boldInfo, infoList = [], style={}, theme='light' } = this.props; */}
10
+ <div className="light-block" style={{width:480, display:"block"}} >
11
+ <InfoCard
12
+ title="待拣件数"
13
+ highlightInfo="800"
14
+ highlightInfoCN = "件"
15
+ highlightSubInfo="/800"
16
+ highlightSubInfoCN="件"
17
+ percentage={0.64}
18
+ boldInfo="加粗显示:512/五厂综包一楼,这是加粗显示的货品名称可能有多行"
19
+ infoList={
20
+ [
21
+ {label: '商品条码', content: '623126388798'},
22
+ {label: '截止日期', content: '2022-07-25'},
23
+ {label: '产品名称', content: '商品的名称'},
24
+ {label: '品号', content: '12398765423'},
25
+ ]
26
+ }
27
+ />
28
+ <InfoCard
29
+ title="待拣件数"
30
+ highlightInfo="800"
31
+ highlightInfoCN = "件"
32
+ highlightSubInfo="/800"
33
+ highlightSubInfoCN="件"
34
+ percentage={0.64}
35
+ boldInfo="加粗显示:512/五厂综包一楼,这是加粗显示的货品名称可能有多行"
36
+ theme='dark'
37
+ infoList={
38
+ [
39
+ {label: '商品条码', content: '623126388798'},
40
+ {label: '截止日期', content: '2022-07-25'},
41
+ {label: '产品名称', content: '商品的名称'},
42
+ {label: '品号', content: '12398765423'},
43
+ ]
44
+ }
45
+ />
46
+ </div>
47
+ <code className="code">{`
48
+ <InfoCard
49
+ title="待拣件数"
50
+ highlightInfo="800"
51
+ highlightInfoCN = "件"
52
+ highlightSubInfo="/800"
53
+ highlightSubInfoCN="件"
54
+ percentage={0.64}
55
+ boldInfo="加粗显示:512/五厂综包一楼,这是加粗显示的货品名称可能有多行"
56
+ infoList={
57
+ [
58
+ {label: '商品条码', content: '623126388798'},
59
+ {label: '截止日期', content: '2022-07-25'},
60
+ {label: '产品名称', content: '商品的名称'},
61
+ {label: '品号', content: '12398765423'},
62
+ ]
63
+ }
64
+ />`}
65
+ </code>
66
+
67
+ <div className="light-block" style={{width:480, display:"block"}}>
68
+ <InfoCard
69
+ title="待拣件数"
70
+ highlightInfo="800"
71
+ highlightInfoCN = "件"
72
+ highlightSubInfo="/800"
73
+ highlightSubInfoCN="件"
74
+ tagText="少货2"
75
+ boldInfo="加粗显示:512/五厂综包一楼,这是加粗显示的货品名称可能有多行"
76
+ theme='dark'
77
+ infoList={
78
+ [
79
+ {label: '商品条码', content: '623126388798'},
80
+ {label: '截止日期', content: '2022-07-25'},
81
+ {label: '产品名称', content: '商品的名称'},
82
+ {label: '品号', content: '12398765423'},
83
+ ]
84
+ }
85
+ />
86
+ </div>
87
+ <code className="code">{`
88
+ <InfoCard
89
+ title="待拣件数"
90
+ highlightInfo="800"
91
+ highlightInfoCN = "件"
92
+ highlightSubInfo="/800"
93
+ highlightSubInfoCN="件"
94
+ tagText="少货2"
95
+ boldInfo="加粗显示:512/五厂综包一楼,这是加粗显示的货品名称可能有多行"
96
+ theme='dark'
97
+ infoList={
98
+ [
99
+ {label: '商品条码', content: '623126388798'},
100
+ {label: '截止日期', content: '2022-07-25'},
101
+ {label: '产品名称', content: '商品的名称'},
102
+ {label: '品号', content: '12398765423'},
103
+ ]
104
+ }
105
+ />`}
106
+ </code>
107
+ <div className="light-block" style={{width:480, display:"block"}}>
108
+ <InfoCard
109
+ title="漏扫箱数/识别总箱数"
110
+ highlightInfo="0"
111
+ highlightSubInfo="/40"
112
+ infoImage={InfoCard.IMAGE_1}
113
+ />
114
+ </div>
115
+ <code className="code">{`
116
+ <InfoCard
117
+ title="漏扫箱数/识别总箱数"
118
+ highlightInfo="0"
119
+ highlightSubInfo="/40"
120
+ infoImage={InfoCard.IMAGE_1}
121
+ />`}
122
+ </code>
123
+ <div className="light-block" style={{width:480, display:"block"}}>
124
+ <InfoCard
125
+ title="识别箱数(CS)"
126
+ highlightInfo="0"
127
+ highlightSubInfo="/50"
128
+ subTitle="识别个数(EA)"
129
+ subHighlightInfo="40"
130
+ subHighlightSubInfo="/50"
131
+ infoImage={InfoCard.IMAGE_1}
132
+ />
133
+ </div>
134
+ <code className="code">{`
135
+ <InfoCard
136
+ title="识别箱数(CS)"
137
+ highlightInfo="0"
138
+ highlightSubInfo="/50"
139
+ subTitle="识别个数(EA)"
140
+ subHighlightInfo="40"
141
+ subHighlightSubInfo="/50"
142
+ infoImage={InfoCard.IMAGE_1}
143
+ />`}
144
+ </code>
145
+ <h2>参数</h2>
146
+ <table className="pure-table pure-table-bordered">
147
+ <thead>
148
+ <tr>
149
+ <th>属性</th>
150
+ <th>说明</th>
151
+ <th>类型</th>
152
+ <th>默认值</th>
153
+ </tr>
154
+ </thead>
155
+ <tbody>
156
+ <tr>
157
+ <td>title</td>
158
+ <td>标题</td>
159
+ <td>string</td>
160
+ <td></td>
161
+ </tr>
162
+ <tr>
163
+ <td>highlightInfo</td>
164
+ <td>高亮文本</td>
165
+ <td>string</td>
166
+ <td></td>
167
+ </tr>
168
+ <tr>
169
+ <td>highlightInfoCN</td>
170
+ <td>高亮文本(中文)</td>
171
+ <td>string</td>
172
+ <td></td>
173
+ </tr>
174
+ <tr>
175
+ <td>highlightSubInfo</td>
176
+ <td>高亮副文本</td>
177
+ <td>string</td>
178
+ <td></td>
179
+ </tr>
180
+ <tr>
181
+ <td>highlightSubInfoCN</td>
182
+ <td>高亮副文本(中文)</td>
183
+ <td>string</td>
184
+ <td></td>
185
+ </tr>
186
+ <tr>
187
+ <td>subTitle</td>
188
+ <td>副标题</td>
189
+ <td>string</td>
190
+ <td></td>
191
+ </tr>
192
+ <tr>
193
+ <td>subHighlightInfo</td>
194
+ <td>副高亮文本</td>
195
+ <td>string</td>
196
+ <td></td>
197
+ </tr>
198
+ <tr>
199
+ <td>subHighlightSubInfo</td>
200
+ <td>副高亮副文本</td>
201
+ <td>string</td>
202
+ <td></td>
203
+ </tr>
204
+ <tr>
205
+ <td>boldInfo</td>
206
+ <td>加粗文本</td>
207
+ <td>string</td>
208
+ <td></td>
209
+ </tr>
210
+ <tr>
211
+ <td>theme</td>
212
+ <td>主题</td>
213
+ <td>string: light | dark</td>
214
+ <td>light</td>
215
+ </tr>
216
+ <tr>
217
+ <td>infoList</td>
218
+ <td>更多信息</td>
219
+ <td>object[]</td>
220
+ <td></td>
221
+ </tr>
222
+ <tr>
223
+ <td>percentage</td>
224
+ <td>进度条百分比,传值时显示进度条</td>
225
+ <td>number</td>
226
+ <td></td>
227
+ </tr>
228
+ <tr>
229
+ <td>tagText</td>
230
+ <td> 右上角 tag 文本,传值时显示 tag</td>
231
+ <td>string</td>
232
+ <td></td>
233
+ </tr>
234
+ <tr>
235
+ <td>infoImage</td>
236
+ <td>左侧图片地址</td>
237
+ <td>string</td>
238
+ <td>可以使用 InfoCard.IMAGE_1 1张内置图片</td>
239
+ </tr>
240
+ </tbody>
241
+ </table>
242
+ </div>
243
+ );
244
+ }
@@ -0,0 +1,67 @@
1
+ import React from "react";
2
+ // import OPInput from "../OPInput";
3
+ import "./index.less";
4
+ import classNames from "classnames";
5
+
6
+ export default class PdaInfoCard extends React.Component {
7
+ constructor(props) {
8
+ super(props);
9
+ }
10
+
11
+ render() {
12
+ const { className = '', title, highlightInfo, subTitle, subHighlightInfo, subHighlightSubInfo, infoImage, tagText, highlightInfoCN, highlightSubInfo, percentage, highlightSubInfoCN, boldInfo, infoList = [], style={}, theme='light' } = this.props;
13
+ return (
14
+ <div className={classNames({[className]: true, 'pda-info-card': true, 'pda-info-card-dark': theme === 'dark'})} style={style}>
15
+ <div className="pda-info-card-title-section">
16
+ <div className="pda-info-card-title">{title}</div>
17
+ {
18
+ tagText ? <div className="pda-info-card-tag">
19
+ <div className="pda-info-card-tag-text">{tagText}</div>
20
+ </div> : null
21
+ }
22
+ </div>
23
+ <div className="pda-info-card-highlight-section">
24
+ <div>
25
+ <div className="pda-info-card-highlight">
26
+ <span className="pda-info-card-highlight1">{highlightInfo}</span>
27
+ <span className="pda-info-card-highlight1CN">{highlightInfoCN}</span>
28
+ <span className="pda-info-card-highlight2">{highlightSubInfo}</span>
29
+ <span className="pda-info-card-highlight2CN">{highlightSubInfoCN}</span>
30
+ </div>
31
+ {
32
+ subTitle ? <div className="pda-info-card-title">{subTitle}</div> : null
33
+ }
34
+ {
35
+ subHighlightInfo ? <div className="pda-info-card-highlight">
36
+ <span className="pda-info-card-highlight1">{subHighlightInfo}</span>
37
+ <span className="pda-info-card-highlight2">{subHighlightSubInfo}</span>
38
+ </div> : null
39
+ }
40
+ </div>
41
+ {
42
+ infoImage ? <img src={infoImage} width={150} height={150} /> : null
43
+ }
44
+ </div>
45
+ {
46
+ percentage !== undefined ? <div className="pda-info-card-progress">
47
+ <div className="pda-info-card-progress-inside" style={{width: `${percentage * 100}%`}}/>
48
+ </div> : null
49
+ }
50
+ <div className="pda-info-card-bold">{boldInfo}</div>
51
+ {
52
+ infoList.map((item, index) => {
53
+ return (
54
+ <div key={index} className="pda-info-card-list">
55
+ <span>{item.label || ''}</span>
56
+ &nbsp;&nbsp;
57
+ <span>{item.content || ''}</span>
58
+ </div>
59
+ )
60
+ })
61
+ }
62
+ </div>
63
+ )
64
+ }
65
+ }
66
+
67
+ PdaInfoCard.IMAGE_1 = "https://img.alicdn.com/imgextra/i2/O1CN01qYuxip1ME9zhdL9XG_!!6000000001402-2-tps-150-150.png";
@@ -0,0 +1,111 @@
1
+ .pda-info-card {
2
+ border-radius: 16px;
3
+ padding: 16px;
4
+ background-color: white;
5
+ word-break: break-word;
6
+ .divda-info-card-title{
7
+ font-size: 32px;
8
+ line-height: 32px;
9
+ }
10
+ .pda-info-card-title-section {
11
+ display: flex;
12
+ flex-direction: row;
13
+ justify-content: space-between;
14
+ align-items: center;
15
+ .pda-info-card-title {
16
+ font-size: 32px;
17
+ color: #666666;
18
+ // margin: 0;
19
+ // margin-bottom: 16px;
20
+ }
21
+ .pda-info-card-tag {
22
+ display: flex;
23
+ align-items: center;
24
+ justify-content: center;
25
+ height: 36px;
26
+ padding: 0 8px;
27
+ background-color: #FFCC00;
28
+ border-radius: 8px;
29
+ }
30
+ }
31
+
32
+ .pda-info-card-highlight-section{
33
+ display: flex;
34
+ flex-direction: row;
35
+ justify-content: space-between;
36
+ align-items: flex-start;
37
+ .pda-info-card-title {
38
+ font-size: 32px;
39
+ color: #666666;
40
+ margin-top: 20px;
41
+ }
42
+ .pda-info-card-highlight {
43
+ font-size: 80px;
44
+ line-height: 64px;
45
+ color: #0091EA;
46
+ font-weight: bold;
47
+ // margin: 0;
48
+ // vertical-align: text-bottom;
49
+
50
+ display: flex;
51
+ flex-direction: row;
52
+ align-items: flex-end;
53
+
54
+ .pda-info-card-highlight1CN {
55
+ font-size: 64px;
56
+ }
57
+ .pda-info-card-highlight2 {
58
+ font-size: 50px;
59
+ line-height: 40px;
60
+ }
61
+ .pda-info-card-highlight2CN {
62
+ font-size: 40px;
63
+ line-height: 40px;
64
+ }
65
+ }
66
+ }
67
+ .pda-info-card-bold {
68
+ font-weight: bold;
69
+ font-size: 40px;
70
+ line-height: 48px;
71
+ // margin: 0;
72
+ color: black;
73
+ margin-top: 16px;
74
+ }
75
+ .pda-info-card-list {
76
+ margin-top: 12px;
77
+ color: #4A4A4A;
78
+ font-size: 32px;
79
+ line-height: 32px;
80
+ word-break: break-all;
81
+ }
82
+ }
83
+ .pda-info-card-progress {
84
+ background-color: #F3F4F8;
85
+ height: 12px;
86
+ border-radius: 6px;
87
+ margin-top: 16px;
88
+ .pda-info-card-progress-inside {
89
+ background-color: #0091EA;
90
+ height: 12px;
91
+ border-radius: 6px;
92
+ }
93
+ }
94
+
95
+
96
+ .pda-info-card.pda-info-card-dark {
97
+ background-color: black;
98
+ .pda-info-card-title {
99
+ color: #999999;
100
+ }
101
+
102
+ .pda-info-card-highlight {
103
+ color: #FFFFFF;
104
+ }
105
+ .pda-info-card-bold {
106
+ color: #FFFFFF;
107
+ }
108
+ .pda-info-card-list {
109
+ color: #999999;
110
+ }
111
+ }