@cniot/android-pda-components 1.1.10 → 2.0.0-beta.0
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 +3 -0
- package/build/assets/error.1a0ad26a.wav +0 -0
- package/build/assets/index.6824d354.css +1 -0
- package/build/assets/index.f8372496.js +956 -0
- package/build/assets/success.2df2c335.wav +0 -0
- package/build/assets/warning.90539d46.wav +0 -0
- package/build/index.html +2 -2
- package/doc/all-v2-components/index.jsx +556 -0
- package/doc/all-v2-components/index.less +10 -0
- package/doc/index.jsx +105 -62
- package/doc/index.less +51 -17
- package/es/index.cjs.js +15 -6
- package/es/index.es.js +10234 -791
- package/es/style.css +1 -1
- package/package.json +7 -4
- package/build/assets/index.0d6e9675.css +0 -1
- package/build/assets/index.761e3145.js +0 -947
package/doc/index.jsx
CHANGED
|
@@ -42,6 +42,7 @@ import systemloading from "../packages/pageflow-system-pages/loading/doc";
|
|
|
42
42
|
import BaseLayout from "../packages/BaseLayout/doc.jsx";
|
|
43
43
|
import useFiled from "../packages/useFiled/doc.jsx";
|
|
44
44
|
|
|
45
|
+
import AllV2Components from './all-v2-components/index.jsx'
|
|
45
46
|
// 系统界面
|
|
46
47
|
// import PageFlowSystemPages from "../packages/pageflow-system-pages";
|
|
47
48
|
|
|
@@ -49,7 +50,74 @@ import "./index.less";
|
|
|
49
50
|
|
|
50
51
|
const docs = [
|
|
51
52
|
{
|
|
52
|
-
title:
|
|
53
|
+
title: '快速开始',
|
|
54
|
+
group: 'start',
|
|
55
|
+
pages: [
|
|
56
|
+
{
|
|
57
|
+
key: "First",
|
|
58
|
+
title: "快速开始",
|
|
59
|
+
doc: First,
|
|
60
|
+
},
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
title: "V2 组件",
|
|
65
|
+
group: 'V2',
|
|
66
|
+
pages: [
|
|
67
|
+
{
|
|
68
|
+
key: "debug",
|
|
69
|
+
title: "debug",
|
|
70
|
+
doc: AllV2Components,
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
key: "Header",
|
|
74
|
+
title: "Header",
|
|
75
|
+
doc: Header,
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
title: "内置界面预览",
|
|
81
|
+
pages: [
|
|
82
|
+
{
|
|
83
|
+
key: "/system/alert",
|
|
84
|
+
title: "/system/alert",
|
|
85
|
+
doc: systemAlert,
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
key: "/system/confirm",
|
|
89
|
+
title: "/system/confirm",
|
|
90
|
+
doc: systemConfirm,
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
key: "/system/toast",
|
|
94
|
+
title: "/system/toast",
|
|
95
|
+
doc: systemToast,
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
key: "/system/prompt",
|
|
99
|
+
title: "/system/prompt",
|
|
100
|
+
doc: systemprompt,
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
key: "/system/loading",
|
|
104
|
+
title: "/system/loading",
|
|
105
|
+
doc: systemloading,
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
title: "布局容器",
|
|
111
|
+
pages: [
|
|
112
|
+
{
|
|
113
|
+
key: "BaseLayout",
|
|
114
|
+
title: "BaseLayout",
|
|
115
|
+
doc: BaseLayout,
|
|
116
|
+
},
|
|
117
|
+
],
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
title: "组件列表-V1",
|
|
53
121
|
pages: [
|
|
54
122
|
{
|
|
55
123
|
key: "First",
|
|
@@ -224,46 +292,6 @@ const docs = [
|
|
|
224
292
|
},
|
|
225
293
|
],
|
|
226
294
|
},
|
|
227
|
-
{
|
|
228
|
-
title: "内置界面预览",
|
|
229
|
-
pages: [
|
|
230
|
-
{
|
|
231
|
-
key: "/system/alert",
|
|
232
|
-
title: "/system/alert",
|
|
233
|
-
doc: systemAlert,
|
|
234
|
-
},
|
|
235
|
-
{
|
|
236
|
-
key: "/system/confirm",
|
|
237
|
-
title: "/system/confirm",
|
|
238
|
-
doc: systemConfirm,
|
|
239
|
-
},
|
|
240
|
-
{
|
|
241
|
-
key: "/system/toast",
|
|
242
|
-
title: "/system/toast",
|
|
243
|
-
doc: systemToast,
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
key: "/system/prompt",
|
|
247
|
-
title: "/system/prompt",
|
|
248
|
-
doc: systemprompt,
|
|
249
|
-
},
|
|
250
|
-
{
|
|
251
|
-
key: "/system/loading",
|
|
252
|
-
title: "/system/loading",
|
|
253
|
-
doc: systemloading,
|
|
254
|
-
},
|
|
255
|
-
],
|
|
256
|
-
},
|
|
257
|
-
{
|
|
258
|
-
title: "布局容器",
|
|
259
|
-
pages: [
|
|
260
|
-
{
|
|
261
|
-
key: "BaseLayout",
|
|
262
|
-
title: "BaseLayout",
|
|
263
|
-
doc: BaseLayout,
|
|
264
|
-
},
|
|
265
|
-
],
|
|
266
|
-
},
|
|
267
295
|
];
|
|
268
296
|
|
|
269
297
|
function getDoc(key) {
|
|
@@ -282,6 +310,7 @@ function getHashKey() {
|
|
|
282
310
|
|
|
283
311
|
function App() {
|
|
284
312
|
const [currentIndex, setCurrentIndex] = React.useState(getHashKey);
|
|
313
|
+
const [groupTitleHeight, setGroupTitleHeight] = React.useState(46);
|
|
285
314
|
const onClickComponentItem = React.useCallback(function (key) {
|
|
286
315
|
location.hash = key;
|
|
287
316
|
// setCurrentIndex(key);
|
|
@@ -290,6 +319,8 @@ function App() {
|
|
|
290
319
|
window.addEventListener("hashchange", function () {
|
|
291
320
|
setCurrentIndex(getHashKey());
|
|
292
321
|
});
|
|
322
|
+
|
|
323
|
+
setGroupTitleHeight(document.getElementsByClassName('doc-group-title')?.[0]?.offsetHeight)
|
|
293
324
|
}, []);
|
|
294
325
|
|
|
295
326
|
const currentDoc = getDoc(currentIndex);
|
|
@@ -307,27 +338,39 @@ function App() {
|
|
|
307
338
|
{docs.map(function (item, index) {
|
|
308
339
|
return (
|
|
309
340
|
<React.Fragment key={index}>
|
|
310
|
-
<
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
341
|
+
<div className='doc-group-title' style={{ top: -20 + index * groupTitleHeight }}
|
|
342
|
+
onClick={(e) => {
|
|
343
|
+
const div1 = document.querySelector(`div[data-group="${index}"]`)
|
|
344
|
+
div1?.setAttribute?.('style', `display:${div1.offsetHeight === 0 ? 'block' : 'none'}`);
|
|
345
|
+
|
|
346
|
+
const div2 = document.querySelector(`div[data-group-fold="${index}"]`);
|
|
347
|
+
div2.innerHTML && (div2.innerHTML = div2.innerHTML === '点击收起' ? '点击展开' : '点击收起');
|
|
348
|
+
}}>
|
|
349
|
+
<h2 >{item.title}</h2>
|
|
350
|
+
<div data-group-fold={index} className="doc-group-fold">{['V2', 'start'].includes(item.group) ? '点击收起' : '点击展开'}</div>
|
|
351
|
+
</div>
|
|
352
|
+
<div data-group={index} style={{ display: `${['V2', 'start'].includes(item.group) ? 'block' : 'none'}` }}>
|
|
353
|
+
{item.pages.map(function (item) {
|
|
354
|
+
return (
|
|
355
|
+
<div
|
|
356
|
+
className={
|
|
357
|
+
currentIndex === item.key
|
|
358
|
+
? "components-item active"
|
|
359
|
+
: "components-item"
|
|
360
|
+
}
|
|
361
|
+
onClick={onClickComponentItem.bind(null, item.key)}
|
|
362
|
+
data-index={item.key}
|
|
363
|
+
key={item.key}
|
|
364
|
+
>
|
|
365
|
+
{item.abandon ? (
|
|
366
|
+
<s>{item.title}</s>
|
|
367
|
+
) : (
|
|
368
|
+
<span>{item.title}</span>
|
|
369
|
+
)}
|
|
370
|
+
</div>
|
|
371
|
+
);
|
|
372
|
+
})}
|
|
373
|
+
</div>
|
|
331
374
|
</React.Fragment>
|
|
332
375
|
);
|
|
333
376
|
})}
|
package/doc/index.less
CHANGED
|
@@ -1,50 +1,78 @@
|
|
|
1
1
|
.components-container {
|
|
2
2
|
display: flex;
|
|
3
|
+
height: 100vh;
|
|
3
4
|
}
|
|
5
|
+
|
|
4
6
|
.components-example {
|
|
5
7
|
flex-direction: column;
|
|
6
8
|
border-right: 1px solid #d8d8d8;
|
|
7
9
|
min-height: 100vh;
|
|
8
10
|
padding-right: 10px;
|
|
11
|
+
overflow-y: scroll;
|
|
12
|
+
width: 260px;
|
|
13
|
+
padding: 16px;
|
|
14
|
+
background-color: #ffffff;
|
|
15
|
+
|
|
16
|
+
.doc-group-title {
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: flex-end;
|
|
19
|
+
border-bottom: 1px solid #d8d8d8;
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
position: sticky;
|
|
22
|
+
top: -20px;
|
|
23
|
+
background-color: #fff;
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
.doc-group-fold {
|
|
27
|
+
padding-bottom: 5px;
|
|
28
|
+
color: #6d67f1;
|
|
29
|
+
}
|
|
30
|
+
|
|
9
31
|
h1 {
|
|
10
32
|
margin-top: 20px;
|
|
11
33
|
}
|
|
34
|
+
|
|
12
35
|
h2 {
|
|
36
|
+
flex: 1;
|
|
13
37
|
color: #00000073;
|
|
14
38
|
font-size: 14px;
|
|
15
39
|
margin-top: 20px;
|
|
16
|
-
border-bottom: 1px solid #d8d8d8;
|
|
40
|
+
// border-bottom: 1px solid #d8d8d8;
|
|
17
41
|
padding-bottom: 5px;
|
|
18
42
|
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.components-item {
|
|
46
|
+
color: #000000d9;
|
|
47
|
+
font-size: 16px;
|
|
48
|
+
padding: 10px 0;
|
|
49
|
+
margin-left: 20px;
|
|
50
|
+
align-items: center;
|
|
51
|
+
cursor: pointer;
|
|
52
|
+
|
|
53
|
+
&:hover,
|
|
54
|
+
&.active {
|
|
55
|
+
color: #4f10fd73;
|
|
56
|
+
}
|
|
19
57
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
font-size: 16px;
|
|
23
|
-
padding: 10px 0;
|
|
24
|
-
margin-left: 20px;
|
|
25
|
-
align-items: center;
|
|
26
|
-
cursor: pointer;
|
|
27
|
-
&:hover,
|
|
28
|
-
&.active {
|
|
29
|
-
color: #4f10fd73;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
> small {
|
|
33
|
-
margin-left: 1em;
|
|
34
|
-
}
|
|
58
|
+
>small {
|
|
59
|
+
margin-left: 1em;
|
|
35
60
|
}
|
|
36
61
|
}
|
|
62
|
+
}
|
|
37
63
|
|
|
38
64
|
.show-case {
|
|
39
65
|
display: flex;
|
|
40
66
|
flex-direction: column;
|
|
41
67
|
padding: 50px;
|
|
42
68
|
flex: 1;
|
|
69
|
+
overflow: auto;
|
|
43
70
|
|
|
44
71
|
h2 {
|
|
45
72
|
// font-size: 80%;
|
|
46
73
|
margin: 20px 0;
|
|
47
74
|
}
|
|
75
|
+
|
|
48
76
|
.code {
|
|
49
77
|
white-space: pre;
|
|
50
78
|
border: 1px solid #e8e8e8;
|
|
@@ -53,6 +81,7 @@
|
|
|
53
81
|
padding: 5px 10px;
|
|
54
82
|
display: block;
|
|
55
83
|
margin: 20px 0;
|
|
84
|
+
text-wrap: wrap
|
|
56
85
|
}
|
|
57
86
|
}
|
|
58
87
|
|
|
@@ -106,7 +135,7 @@ th {
|
|
|
106
135
|
border-bottom: 1px solid #cbcbcb;
|
|
107
136
|
}
|
|
108
137
|
|
|
109
|
-
.pure-table-bordered tbody
|
|
138
|
+
.pure-table-bordered tbody>tr:last-child>td {
|
|
110
139
|
border-bottom-width: 0;
|
|
111
140
|
}
|
|
112
141
|
|
|
@@ -117,6 +146,7 @@ th {
|
|
|
117
146
|
border: 1px solid #e9e9e9;
|
|
118
147
|
border-radius: 6px;
|
|
119
148
|
flex-direction: column;
|
|
149
|
+
|
|
120
150
|
&:not(:last-child) {
|
|
121
151
|
margin-bottom: 20px;
|
|
122
152
|
}
|
|
@@ -131,9 +161,11 @@ th {
|
|
|
131
161
|
background-color: black;
|
|
132
162
|
padding: 24px;
|
|
133
163
|
}
|
|
164
|
+
|
|
134
165
|
.light-block {
|
|
135
166
|
background-color: #ddd;
|
|
136
167
|
padding: 24px;
|
|
168
|
+
|
|
137
169
|
&.pda {
|
|
138
170
|
width: 50%;
|
|
139
171
|
}
|
|
@@ -142,9 +174,11 @@ th {
|
|
|
142
174
|
.light-block-overlay {
|
|
143
175
|
position: relative;
|
|
144
176
|
height: 300px;
|
|
177
|
+
|
|
145
178
|
.op-overlay {
|
|
146
179
|
position: absolute !important;
|
|
147
180
|
}
|
|
181
|
+
|
|
148
182
|
.op-overlay::before {
|
|
149
183
|
position: absolute !important;
|
|
150
184
|
width: 100% !important;
|