easy3wmui 0.0.42-beta3 → 0.0.42-beta30
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/assets/index.css +132 -34
- package/assets/mFormPage.css +13 -0
- package/assets/mLogin.css +11 -0
- package/assets/mSpin.css +9 -11
- package/assets/mTable.css +71 -0
- package/assets/mUserLayout.css +9 -3
- package/lib/Easy3wMDownLoad/index.js +1 -1
- package/lib/Easy3wMFormPage/index.js +11 -6
- package/lib/Easy3wMGlobalFooter/index.js +3 -3
- package/lib/Easy3wMLogin/index.js +162 -19
- package/lib/Easy3wMSpin/index.js +6 -9
- package/lib/Easy3wMTable/index.js +443 -0
- package/lib/Easy3wMUserLayout/index.less +5 -1
- package/lib/index.js +9 -0
- package/package.json +2 -2
package/assets/index.css
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
:root:root {
|
|
2
2
|
--adm-color-text: #000;
|
|
3
|
-
--adm-font-size-main: var(--adm-font-size-
|
|
3
|
+
--adm-font-size-main: var(--adm-font-size-7);
|
|
4
4
|
}
|
|
5
5
|
:root:root .adm-tabs {
|
|
6
|
-
--title-font-size: var(--adm-font-size-
|
|
6
|
+
--title-font-size: var(--adm-font-size-8);
|
|
7
7
|
--content-padding: 0;
|
|
8
8
|
}
|
|
9
9
|
:root:root .adm-tabs-header {
|
|
@@ -14,27 +14,21 @@
|
|
|
14
14
|
text-align: center;
|
|
15
15
|
}
|
|
16
16
|
:root:root .adm-button {
|
|
17
|
-
font-size: var(--adm-font-size-
|
|
17
|
+
font-size: var(--adm-font-size-7);
|
|
18
18
|
}
|
|
19
19
|
:root:root .adm-card-header-title {
|
|
20
|
-
font-size: var(--adm-font-size-
|
|
20
|
+
font-size: var(--adm-font-size-8);
|
|
21
21
|
font-weight: normal;
|
|
22
22
|
}
|
|
23
23
|
:root:root .adm-input {
|
|
24
|
-
--font-size: var(--adm-font-size-
|
|
25
|
-
}
|
|
26
|
-
:root:root .adm-input-element {
|
|
27
|
-
border: 1px solid #d9d9d9;
|
|
24
|
+
--font-size: var(--adm-font-size-7);
|
|
28
25
|
}
|
|
29
26
|
:root:root .adm-input-element:focus,
|
|
30
27
|
:root:root .adm-input-element:hover {
|
|
31
28
|
border-color: var(--adm-color-primary);
|
|
32
29
|
}
|
|
33
30
|
:root:root .adm-text-area {
|
|
34
|
-
--font-size: var(--adm-font-size-
|
|
35
|
-
}
|
|
36
|
-
:root:root .adm-text-area-element {
|
|
37
|
-
border: 1px solid #d9d9d9;
|
|
31
|
+
--font-size: var(--adm-font-size-7);
|
|
38
32
|
}
|
|
39
33
|
:root:root .adm-text-area-element:focus,
|
|
40
34
|
:root:root .adm-text-area-element:hover {
|
|
@@ -44,15 +38,15 @@
|
|
|
44
38
|
font-size: var(--adm-font-size-4);
|
|
45
39
|
}
|
|
46
40
|
:root:root .adm-selector {
|
|
47
|
-
font-size: var(--adm-font-size-
|
|
41
|
+
font-size: var(--adm-font-size-7);
|
|
48
42
|
}
|
|
49
43
|
:root:root .adm-rate {
|
|
50
|
-
--star-size: var(--adm-font-size-
|
|
44
|
+
--star-size: var(--adm-font-size-7);
|
|
51
45
|
}
|
|
52
46
|
:root:root .adm-radio,
|
|
53
47
|
:root:root .adm-checkbox {
|
|
54
|
-
--icon-size: var(--adm-font-size-
|
|
55
|
-
--font-size: var(--adm-font-size-
|
|
48
|
+
--icon-size: var(--adm-font-size-7);
|
|
49
|
+
--font-size: var(--adm-font-size-7);
|
|
56
50
|
margin-right: 6px;
|
|
57
51
|
}
|
|
58
52
|
:root:root .adm-switch {
|
|
@@ -62,11 +56,11 @@
|
|
|
62
56
|
padding: 0;
|
|
63
57
|
}
|
|
64
58
|
:root:root .adm-list-header {
|
|
65
|
-
--header-font-size: var(--adm-font-size-
|
|
59
|
+
--header-font-size: var(--adm-font-size-8);
|
|
66
60
|
border-bottom: var(--border-bottom);
|
|
67
61
|
}
|
|
68
62
|
:root:root .adm-list-body {
|
|
69
|
-
--font-size: var(--adm-font-size-
|
|
63
|
+
--font-size: var(--adm-font-size-5);
|
|
70
64
|
}
|
|
71
65
|
:root:root .adm-list-default .adm-list-body {
|
|
72
66
|
border-top: 0;
|
|
@@ -79,12 +73,14 @@
|
|
|
79
73
|
-ms-flex-item-align: auto;
|
|
80
74
|
-ms-grid-row-align: auto;
|
|
81
75
|
align-self: auto;
|
|
76
|
+
line-height: 24px;
|
|
77
|
+
padding-left: 6px;
|
|
82
78
|
}
|
|
83
79
|
:root:root .adm-form .adm-form-footer {
|
|
84
80
|
padding: 12px;
|
|
85
81
|
}
|
|
86
82
|
:root:root .adm-form-item.adm-form-item-vertical .adm-form-item-label {
|
|
87
|
-
font-size: var(--adm-font-size-
|
|
83
|
+
font-size: var(--adm-font-size-5);
|
|
88
84
|
margin-bottom: 0;
|
|
89
85
|
padding-bottom: 12px;
|
|
90
86
|
}
|
|
@@ -105,10 +101,10 @@
|
|
|
105
101
|
padding-right: 0;
|
|
106
102
|
}
|
|
107
103
|
:root:root .adm-list-item-content-extra {
|
|
108
|
-
font-size: var(--adm-font-size-
|
|
104
|
+
font-size: var(--adm-font-size-7);
|
|
109
105
|
}
|
|
110
106
|
:root:root .adm-collapse-panel-header {
|
|
111
|
-
font-size: var(--adm-font-size-
|
|
107
|
+
font-size: var(--adm-font-size-7);
|
|
112
108
|
color: var(--adm-color-text);
|
|
113
109
|
}
|
|
114
110
|
:root:root .adm-list-item.adm-plain-anchor.adm-collapse-panel-header {
|
|
@@ -128,6 +124,9 @@
|
|
|
128
124
|
:root:root .adm-list-item-content-extra {
|
|
129
125
|
color: var(--adm-color-text);
|
|
130
126
|
}
|
|
127
|
+
:root:root .adm-checkbox .adm-checkbox-icon {
|
|
128
|
+
border-radius: 0px;
|
|
129
|
+
}
|
|
131
130
|
#Easy3wMButton {
|
|
132
131
|
background: #fff;
|
|
133
132
|
}
|
|
@@ -171,27 +170,31 @@
|
|
|
171
170
|
}
|
|
172
171
|
#Easy3wMSpin {
|
|
173
172
|
position: fixed;
|
|
174
|
-
background:
|
|
175
|
-
top:
|
|
176
|
-
|
|
177
|
-
left:
|
|
178
|
-
right: 0;
|
|
173
|
+
background: #fff;
|
|
174
|
+
top: 92px;
|
|
175
|
+
left: 49%;
|
|
176
|
+
margin-left: -69px;
|
|
179
177
|
z-index: 9999;
|
|
178
|
+
text-align: center;
|
|
179
|
+
padding: 12px 24px;
|
|
180
|
+
color: var(--adm-color-primary);
|
|
181
|
+
border-radius: 2px;
|
|
182
|
+
box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
|
|
180
183
|
}
|
|
181
|
-
#
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
184
|
+
#Easy3wMUserLayout {
|
|
185
|
+
display: -ms-flexbox;
|
|
186
|
+
display: flex;
|
|
187
|
+
-ms-flex-direction: column;
|
|
188
|
+
flex-direction: column;
|
|
189
|
+
height: 100%;
|
|
186
190
|
}
|
|
187
191
|
#Easy3wMUserLayout .Easy3wMUserLayoutContent {
|
|
188
|
-
background-color: #f0f2f5;
|
|
189
192
|
width: 100%;
|
|
190
|
-
min-height: 100%;
|
|
191
193
|
background-repeat: no-repeat;
|
|
192
194
|
background-position: center;
|
|
193
195
|
background-size: 100%;
|
|
194
|
-
|
|
196
|
+
-ms-flex-positive: 1;
|
|
197
|
+
flex-grow: 1;
|
|
195
198
|
}
|
|
196
199
|
#Easy3wMCard .adm-card {
|
|
197
200
|
padding: 0;
|
|
@@ -217,9 +220,13 @@
|
|
|
217
220
|
border-bottom: var(--border-bottom);
|
|
218
221
|
margin-bottom: 12px;
|
|
219
222
|
}
|
|
223
|
+
#Easy3wMFormPage .adm-form-item-label {
|
|
224
|
+
line-height: 24px;
|
|
225
|
+
}
|
|
220
226
|
#Easy3wMFormPage .adm-list-item-content-main {
|
|
221
227
|
color: var(--adm-color-text);
|
|
222
228
|
text-align: right;
|
|
229
|
+
line-height: 24px;
|
|
223
230
|
}
|
|
224
231
|
#Easy3wMFormPage .adm-list-item-content-prefix {
|
|
225
232
|
width: auto;
|
|
@@ -239,6 +246,15 @@
|
|
|
239
246
|
#Easy3wMFormPage .adm-stepper {
|
|
240
247
|
width: 100%;
|
|
241
248
|
}
|
|
249
|
+
#Easy3wMFormPage .adm-stepper .adm-input-element {
|
|
250
|
+
border: none;
|
|
251
|
+
}
|
|
252
|
+
#Easy3wMFormPage .adm-text-area-element {
|
|
253
|
+
line-height: inherit;
|
|
254
|
+
}
|
|
255
|
+
#Easy3wMFormPage .adm-input {
|
|
256
|
+
--text-align: right;
|
|
257
|
+
}
|
|
242
258
|
#Easy3wMGridPage .easy3wMGridPageStepper {
|
|
243
259
|
display: -ms-flexbox;
|
|
244
260
|
display: flex;
|
|
@@ -304,6 +320,7 @@
|
|
|
304
320
|
height: 40px;
|
|
305
321
|
border-radius: 4px;
|
|
306
322
|
padding: 0 12px;
|
|
323
|
+
border: 1px solid #d9d9d9;
|
|
307
324
|
}
|
|
308
325
|
#Easy3wMLogin .errorMsgReal {
|
|
309
326
|
background: #fff1f0;
|
|
@@ -335,3 +352,84 @@
|
|
|
335
352
|
border-left: 0;
|
|
336
353
|
background-color: transparent;
|
|
337
354
|
}
|
|
355
|
+
#Easy3wMLogin .funArea {
|
|
356
|
+
text-align: right;
|
|
357
|
+
margin-bottom: 24px;
|
|
358
|
+
}
|
|
359
|
+
#Easy3wMLogin .funArea > a {
|
|
360
|
+
padding-right: 12px;
|
|
361
|
+
}
|
|
362
|
+
#Easy3wMLogin .funArea > a:last-child {
|
|
363
|
+
padding-right: 0;
|
|
364
|
+
}
|
|
365
|
+
#Easy3wMTable {
|
|
366
|
+
--padding: 6px;
|
|
367
|
+
}
|
|
368
|
+
#Easy3wMTable .queryCriteria .more {
|
|
369
|
+
padding: 0 12px;
|
|
370
|
+
}
|
|
371
|
+
#Easy3wMTable .queryCriteria .adm-button {
|
|
372
|
+
font-size: var(--adm-font-size-6);
|
|
373
|
+
}
|
|
374
|
+
#Easy3wMTable .queryCriteria .adm-list-item-content-extra {
|
|
375
|
+
font-size: var(--adm-font-size-6);
|
|
376
|
+
padding: 0;
|
|
377
|
+
}
|
|
378
|
+
#Easy3wMTable .queryCriteriaBtn {
|
|
379
|
+
margin-top: 24px;
|
|
380
|
+
}
|
|
381
|
+
#Easy3wMTable .singleItem .itemAttr {
|
|
382
|
+
display: -ms-flexbox;
|
|
383
|
+
display: flex;
|
|
384
|
+
-ms-flex-align: stretch;
|
|
385
|
+
align-items: stretch;
|
|
386
|
+
-ms-flex-pack: start;
|
|
387
|
+
justify-content: flex-start;
|
|
388
|
+
padding-bottom: var(--padding);
|
|
389
|
+
}
|
|
390
|
+
#Easy3wMTable .singleItem .itemAttr .attrLabel {
|
|
391
|
+
width: auto;
|
|
392
|
+
max-width: 70%;
|
|
393
|
+
-ms-flex: none;
|
|
394
|
+
flex: none;
|
|
395
|
+
padding-right: var(--padding);
|
|
396
|
+
color: var(--adm-color-weak);
|
|
397
|
+
}
|
|
398
|
+
#Easy3wMTable .singleItem .itemAttr .attrKey {
|
|
399
|
+
text-align: right;
|
|
400
|
+
-ms-flex: auto;
|
|
401
|
+
flex: auto;
|
|
402
|
+
color: var(--adm-color-text);
|
|
403
|
+
}
|
|
404
|
+
#Easy3wMTable .singleItem .itemAttr .attrKey.clickable {
|
|
405
|
+
color: var(--adm-color-primary);
|
|
406
|
+
}
|
|
407
|
+
#Easy3wMTable .singleItem .itemAttr:last-child {
|
|
408
|
+
padding-bottom: 0;
|
|
409
|
+
}
|
|
410
|
+
#Easy3wMTable .singleItem .itemAttr.clickable {
|
|
411
|
+
cursor: pointer;
|
|
412
|
+
color: var(--adm-color-primary);
|
|
413
|
+
}
|
|
414
|
+
#Easy3wMTable .singleItem .itemAttr.clickable .attrLabel {
|
|
415
|
+
color: var(--adm-color-primary);
|
|
416
|
+
}
|
|
417
|
+
#Easy3wMTable .singleItem .itemAttr.clickable .attrKey {
|
|
418
|
+
color: var(--adm-color-primary);
|
|
419
|
+
}
|
|
420
|
+
#Easy3wMTable .easy3wMGridPageStepper {
|
|
421
|
+
display: -ms-flexbox;
|
|
422
|
+
display: flex;
|
|
423
|
+
-ms-flex-direction: row;
|
|
424
|
+
flex-direction: row;
|
|
425
|
+
-ms-flex-align: center;
|
|
426
|
+
align-items: center;
|
|
427
|
+
-ms-flex-pack: justify;
|
|
428
|
+
justify-content: space-between;
|
|
429
|
+
padding: 12px;
|
|
430
|
+
}
|
|
431
|
+
#Easy3wMTable .easy3wMGridPageStepper .adm-button {
|
|
432
|
+
font-size: var(--adm-font-size-6);
|
|
433
|
+
padding-left: 24px;
|
|
434
|
+
padding-right: 24px;
|
|
435
|
+
}
|
package/assets/mFormPage.css
CHANGED
|
@@ -12,9 +12,13 @@
|
|
|
12
12
|
border-bottom: var(--border-bottom);
|
|
13
13
|
margin-bottom: 12px;
|
|
14
14
|
}
|
|
15
|
+
#Easy3wMFormPage .adm-form-item-label {
|
|
16
|
+
line-height: 24px;
|
|
17
|
+
}
|
|
15
18
|
#Easy3wMFormPage .adm-list-item-content-main {
|
|
16
19
|
color: var(--adm-color-text);
|
|
17
20
|
text-align: right;
|
|
21
|
+
line-height: 24px;
|
|
18
22
|
}
|
|
19
23
|
#Easy3wMFormPage .adm-list-item-content-prefix {
|
|
20
24
|
width: auto;
|
|
@@ -34,3 +38,12 @@
|
|
|
34
38
|
#Easy3wMFormPage .adm-stepper {
|
|
35
39
|
width: 100%;
|
|
36
40
|
}
|
|
41
|
+
#Easy3wMFormPage .adm-stepper .adm-input-element {
|
|
42
|
+
border: none;
|
|
43
|
+
}
|
|
44
|
+
#Easy3wMFormPage .adm-text-area-element {
|
|
45
|
+
line-height: inherit;
|
|
46
|
+
}
|
|
47
|
+
#Easy3wMFormPage .adm-input {
|
|
48
|
+
--text-align: right;
|
|
49
|
+
}
|
package/assets/mLogin.css
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
height: 40px;
|
|
15
15
|
border-radius: 4px;
|
|
16
16
|
padding: 0 12px;
|
|
17
|
+
border: 1px solid #d9d9d9;
|
|
17
18
|
}
|
|
18
19
|
#Easy3wMLogin .errorMsgReal {
|
|
19
20
|
background: #fff1f0;
|
|
@@ -45,3 +46,13 @@
|
|
|
45
46
|
border-left: 0;
|
|
46
47
|
background-color: transparent;
|
|
47
48
|
}
|
|
49
|
+
#Easy3wMLogin .funArea {
|
|
50
|
+
text-align: right;
|
|
51
|
+
margin-bottom: 24px;
|
|
52
|
+
}
|
|
53
|
+
#Easy3wMLogin .funArea > a {
|
|
54
|
+
padding-right: 12px;
|
|
55
|
+
}
|
|
56
|
+
#Easy3wMLogin .funArea > a:last-child {
|
|
57
|
+
padding-right: 0;
|
|
58
|
+
}
|
package/assets/mSpin.css
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
#Easy3wMSpin {
|
|
2
2
|
position: fixed;
|
|
3
|
-
background:
|
|
4
|
-
top:
|
|
5
|
-
|
|
6
|
-
left:
|
|
7
|
-
right: 0;
|
|
3
|
+
background: #fff;
|
|
4
|
+
top: 92px;
|
|
5
|
+
left: 49%;
|
|
6
|
+
margin-left: -69px;
|
|
8
7
|
z-index: 9999;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
--size: 48px;
|
|
8
|
+
text-align: center;
|
|
9
|
+
padding: 12px 24px;
|
|
10
|
+
color: var(--adm-color-primary);
|
|
11
|
+
border-radius: 2px;
|
|
12
|
+
box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
|
|
15
13
|
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
#Easy3wMTable {
|
|
2
|
+
--padding: 6px;
|
|
3
|
+
}
|
|
4
|
+
#Easy3wMTable .queryCriteria .more {
|
|
5
|
+
padding: 0 12px;
|
|
6
|
+
}
|
|
7
|
+
#Easy3wMTable .queryCriteria .adm-button {
|
|
8
|
+
font-size: var(--adm-font-size-6);
|
|
9
|
+
}
|
|
10
|
+
#Easy3wMTable .queryCriteria .adm-list-item-content-extra {
|
|
11
|
+
font-size: var(--adm-font-size-6);
|
|
12
|
+
padding: 0;
|
|
13
|
+
}
|
|
14
|
+
#Easy3wMTable .queryCriteriaBtn {
|
|
15
|
+
margin-top: 24px;
|
|
16
|
+
}
|
|
17
|
+
#Easy3wMTable .singleItem .itemAttr {
|
|
18
|
+
display: -ms-flexbox;
|
|
19
|
+
display: flex;
|
|
20
|
+
-ms-flex-align: stretch;
|
|
21
|
+
align-items: stretch;
|
|
22
|
+
-ms-flex-pack: start;
|
|
23
|
+
justify-content: flex-start;
|
|
24
|
+
padding-bottom: var(--padding);
|
|
25
|
+
}
|
|
26
|
+
#Easy3wMTable .singleItem .itemAttr .attrLabel {
|
|
27
|
+
width: auto;
|
|
28
|
+
max-width: 70%;
|
|
29
|
+
-ms-flex: none;
|
|
30
|
+
flex: none;
|
|
31
|
+
padding-right: var(--padding);
|
|
32
|
+
color: var(--adm-color-weak);
|
|
33
|
+
}
|
|
34
|
+
#Easy3wMTable .singleItem .itemAttr .attrKey {
|
|
35
|
+
text-align: right;
|
|
36
|
+
-ms-flex: auto;
|
|
37
|
+
flex: auto;
|
|
38
|
+
color: var(--adm-color-text);
|
|
39
|
+
}
|
|
40
|
+
#Easy3wMTable .singleItem .itemAttr .attrKey.clickable {
|
|
41
|
+
color: var(--adm-color-primary);
|
|
42
|
+
}
|
|
43
|
+
#Easy3wMTable .singleItem .itemAttr:last-child {
|
|
44
|
+
padding-bottom: 0;
|
|
45
|
+
}
|
|
46
|
+
#Easy3wMTable .singleItem .itemAttr.clickable {
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
color: var(--adm-color-primary);
|
|
49
|
+
}
|
|
50
|
+
#Easy3wMTable .singleItem .itemAttr.clickable .attrLabel {
|
|
51
|
+
color: var(--adm-color-primary);
|
|
52
|
+
}
|
|
53
|
+
#Easy3wMTable .singleItem .itemAttr.clickable .attrKey {
|
|
54
|
+
color: var(--adm-color-primary);
|
|
55
|
+
}
|
|
56
|
+
#Easy3wMTable .easy3wMGridPageStepper {
|
|
57
|
+
display: -ms-flexbox;
|
|
58
|
+
display: flex;
|
|
59
|
+
-ms-flex-direction: row;
|
|
60
|
+
flex-direction: row;
|
|
61
|
+
-ms-flex-align: center;
|
|
62
|
+
align-items: center;
|
|
63
|
+
-ms-flex-pack: justify;
|
|
64
|
+
justify-content: space-between;
|
|
65
|
+
padding: 12px;
|
|
66
|
+
}
|
|
67
|
+
#Easy3wMTable .easy3wMGridPageStepper .adm-button {
|
|
68
|
+
font-size: var(--adm-font-size-6);
|
|
69
|
+
padding-left: 24px;
|
|
70
|
+
padding-right: 24px;
|
|
71
|
+
}
|
package/assets/mUserLayout.css
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
+
#Easy3wMUserLayout {
|
|
2
|
+
display: -ms-flexbox;
|
|
3
|
+
display: flex;
|
|
4
|
+
-ms-flex-direction: column;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
height: 100%;
|
|
7
|
+
}
|
|
1
8
|
#Easy3wMUserLayout .Easy3wMUserLayoutContent {
|
|
2
|
-
background-color: #f0f2f5;
|
|
3
9
|
width: 100%;
|
|
4
|
-
min-height: 100%;
|
|
5
10
|
background-repeat: no-repeat;
|
|
6
11
|
background-position: center;
|
|
7
12
|
background-size: 100%;
|
|
8
|
-
|
|
13
|
+
-ms-flex-positive: 1;
|
|
14
|
+
flex-grow: 1;
|
|
9
15
|
}
|
|
@@ -190,7 +190,7 @@ var Easy3wMDownLoad = function (_Component) {
|
|
|
190
190
|
'a',
|
|
191
191
|
{ onClick: function onClick() {
|
|
192
192
|
return _this2.onPreview(obj, url);
|
|
193
|
-
}, style: {
|
|
193
|
+
}, style: { paddingRight: '12px' } },
|
|
194
194
|
name
|
|
195
195
|
),
|
|
196
196
|
_react2['default'].createElement(_antdMobileIcons.ArrowDownCircleOutline, { onClick: function onClick() {
|
|
@@ -138,6 +138,7 @@ var Easy3wMFormPage = function (_Component) {
|
|
|
138
138
|
};
|
|
139
139
|
|
|
140
140
|
_this.touchFormatData = function (item) {
|
|
141
|
+
var allReadFlag = _this.props.allReadFlag;
|
|
141
142
|
var fieldType = item.fieldType,
|
|
142
143
|
readFlag = item.readFlag,
|
|
143
144
|
_item$childrenProps = item.childrenProps,
|
|
@@ -148,7 +149,7 @@ var Easy3wMFormPage = function (_Component) {
|
|
|
148
149
|
|
|
149
150
|
if (value || value === false || value === 0) {
|
|
150
151
|
// value值存在 Boolean()值为false的7个特殊值 undefined, null, false, NaN, '', 0, -0
|
|
151
|
-
if (readFlag) {
|
|
152
|
+
if (readFlag || allReadFlag) {
|
|
152
153
|
// 只读
|
|
153
154
|
if (precision === 'year') {
|
|
154
155
|
// 时间:年
|
|
@@ -237,11 +238,12 @@ var Easy3wMFormPage = function (_Component) {
|
|
|
237
238
|
childrenProps = _item$childrenProps2 === undefined ? {} : _item$childrenProps2,
|
|
238
239
|
label = item.label,
|
|
239
240
|
options = item.options,
|
|
240
|
-
element = item.element
|
|
241
|
+
element = item.element,
|
|
242
|
+
titleType = item.titleType;
|
|
241
243
|
|
|
242
244
|
if (fieldType === 'input') {
|
|
243
245
|
// 输入框
|
|
244
|
-
return _react2['default'].createElement(_input2['default'], (0, _extends3['default'])({ placeholder: '\u8BF7\u8F93\u5165' + label }, childrenProps));
|
|
246
|
+
return _react2['default'].createElement(_input2['default'], (0, _extends3['default'])({ placeholder: '\u8BF7\u8F93\u5165' + label, maxLength: titleType ? 400 : 100 }, childrenProps));
|
|
245
247
|
} else if (fieldType === 'cascaderView') {
|
|
246
248
|
// 都是单选,只有value
|
|
247
249
|
return _react2['default'].createElement(_cascaderView2['default'], childrenProps);
|
|
@@ -428,7 +430,7 @@ var Easy3wMFormPage = function (_Component) {
|
|
|
428
430
|
} else if (fieldType === 'switch') {
|
|
429
431
|
return _react2['default'].createElement(_switch2['default'], childrenProps);
|
|
430
432
|
} else if (fieldType === 'textArea') {
|
|
431
|
-
return _react2['default'].createElement(_textArea2['default'], (0, _extends3['default'])({ placeholder: '\u8BF7\u8F93\u5165' + label, showCount: true, maxLength:
|
|
433
|
+
return _react2['default'].createElement(_textArea2['default'], (0, _extends3['default'])({ placeholder: '\u8BF7\u8F93\u5165' + label, showCount: true, maxLength: 2000 }, childrenProps));
|
|
432
434
|
} else if (fieldType === 'else') {
|
|
433
435
|
return element;
|
|
434
436
|
}
|
|
@@ -473,7 +475,8 @@ var Easy3wMFormPage = function (_Component) {
|
|
|
473
475
|
_props$hiddenItems = _props.hiddenItems,
|
|
474
476
|
hiddenItems = _props$hiddenItems === undefined ? [] : _props$hiddenItems,
|
|
475
477
|
requiredMessage = _props.requiredMessage,
|
|
476
|
-
form = _props.form
|
|
478
|
+
form = _props.form,
|
|
479
|
+
allReadFlag = _props.allReadFlag;
|
|
477
480
|
// fromProps 表单参数
|
|
478
481
|
// itemProps 表单项参数
|
|
479
482
|
// childrenProps 输入框参数
|
|
@@ -504,9 +507,11 @@ var Easy3wMFormPage = function (_Component) {
|
|
|
504
507
|
if (fieldType === 'switch') {
|
|
505
508
|
// 为Switch子元素添加额外的属性
|
|
506
509
|
itemProps.getValueProps = _this2.getValuePropsSwitch;
|
|
510
|
+
} else if (fieldType === 'textArea') {
|
|
511
|
+
itemProps.layout = 'vertical';
|
|
507
512
|
}
|
|
508
513
|
value = _this2.touchFormatData(item);
|
|
509
|
-
if (readFlag) {
|
|
514
|
+
if (readFlag || allReadFlag) {
|
|
510
515
|
return _react2['default'].createElement(
|
|
511
516
|
Item,
|
|
512
517
|
(0, _extends3['default'])({ label: label, name: fieldId + 'Easy3wView', required: required, initialValue: 'easy3wView', preserve: false }, cmptPros, { rules: addrules }),
|
|
@@ -40,10 +40,9 @@ var Easy3wMGlobalFooter = function (_Component) {
|
|
|
40
40
|
links = _props.links,
|
|
41
41
|
copyright = _props.copyright;
|
|
42
42
|
|
|
43
|
-
var clsString = (0, _classnames2['default'])(className);
|
|
44
43
|
return _react2['default'].createElement(
|
|
45
44
|
'div',
|
|
46
|
-
{ id: 'Easy3wMGlobalFooter', className:
|
|
45
|
+
{ id: 'Easy3wMGlobalFooter', className: (0, _classnames2['default'])(className) },
|
|
47
46
|
links && _react2['default'].createElement(
|
|
48
47
|
'div',
|
|
49
48
|
null,
|
|
@@ -53,7 +52,8 @@ var Easy3wMGlobalFooter = function (_Component) {
|
|
|
53
52
|
{
|
|
54
53
|
key: link.title,
|
|
55
54
|
target: link.blankTarget ? '_blank' : '_self',
|
|
56
|
-
href: link.href
|
|
55
|
+
href: link.href,
|
|
56
|
+
rel: 'noreferrer'
|
|
57
57
|
},
|
|
58
58
|
link.title
|
|
59
59
|
);
|
|
@@ -56,6 +56,12 @@ var Easy3wMLogin = function (_Component) {
|
|
|
56
56
|
|
|
57
57
|
var _this = (0, _possibleConstructorReturn3['default'])(this, _Component.call(this, props));
|
|
58
58
|
|
|
59
|
+
_this.onChange = function (key) {
|
|
60
|
+
_this.setState({
|
|
61
|
+
activeKey: key // 标签页的key
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
|
|
59
65
|
_this.checkCaptcha = function (rule, value, callback) {
|
|
60
66
|
var captcharesult = _this.state.captcharesult;
|
|
61
67
|
|
|
@@ -75,6 +81,52 @@ var Easy3wMLogin = function (_Component) {
|
|
|
75
81
|
});
|
|
76
82
|
};
|
|
77
83
|
|
|
84
|
+
_this.touchSetPassword = function () {
|
|
85
|
+
var visible = _this.state.visible;
|
|
86
|
+
|
|
87
|
+
_this.setState({
|
|
88
|
+
visible: !visible // 密码显示隐藏
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
_this.toPage = function (operationType) {
|
|
93
|
+
var toPage = _this.props.toPage;
|
|
94
|
+
|
|
95
|
+
if (toPage && typeof toPage === 'function') {
|
|
96
|
+
toPage(operationType);
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
_this.showModal = function (operationType) {
|
|
101
|
+
var showModal = _this.props.showModal;
|
|
102
|
+
|
|
103
|
+
if (showModal && typeof showModal === 'function') {
|
|
104
|
+
showModal(operationType);
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
_this.touchSendCode = function () {
|
|
109
|
+
var touchSendCode = _this.props.touchSendCode;
|
|
110
|
+
|
|
111
|
+
if (touchSendCode && typeof touchSendCode === 'function') {
|
|
112
|
+
touchSendCode(function (countProps) {
|
|
113
|
+
var count = countProps || 59;
|
|
114
|
+
_this.setState({
|
|
115
|
+
count: count // 验证码时间
|
|
116
|
+
});
|
|
117
|
+
_this.interval = setInterval(function () {
|
|
118
|
+
count -= 1;
|
|
119
|
+
_this.setState({
|
|
120
|
+
count: count // 验证码时间
|
|
121
|
+
});
|
|
122
|
+
if (count === 0) {
|
|
123
|
+
clearInterval(_this.interval);
|
|
124
|
+
}
|
|
125
|
+
}, 1000);
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
|
|
78
130
|
_this.submitAccountLogin = function (values) {
|
|
79
131
|
var handleOk = _this.props.handleOk;
|
|
80
132
|
// this.props.form.validateFields().then((values) => {
|
|
@@ -85,17 +137,15 @@ var Easy3wMLogin = function (_Component) {
|
|
|
85
137
|
// });
|
|
86
138
|
};
|
|
87
139
|
|
|
88
|
-
|
|
89
|
-
var visible = _this.state.visible;
|
|
90
|
-
|
|
91
|
-
_this.setState({
|
|
92
|
-
visible: !visible // 密码显示隐藏
|
|
93
|
-
});
|
|
94
|
-
};
|
|
140
|
+
var activeKey = _this.props.activeKey;
|
|
95
141
|
|
|
96
142
|
_this.state = {
|
|
143
|
+
activeKey: activeKey || 'account', // 标签页的key
|
|
144
|
+
// 账号密码登录
|
|
97
145
|
captcharesult: '', // 验证码--state
|
|
98
|
-
visible: false // 密码显示隐藏
|
|
146
|
+
visible: false, // 密码显示隐藏
|
|
147
|
+
// 账号密码登录
|
|
148
|
+
count: 0 // 手机验证码登录
|
|
99
149
|
};
|
|
100
150
|
return _this;
|
|
101
151
|
}
|
|
@@ -103,22 +153,44 @@ var Easy3wMLogin = function (_Component) {
|
|
|
103
153
|
Easy3wMLogin.prototype.componentWillUnmount = function componentWillUnmount() {};
|
|
104
154
|
// 生成form实例
|
|
105
155
|
// formRef = React.createRef()
|
|
156
|
+
// 切换标签页
|
|
157
|
+
|
|
158
|
+
// --------------------------------------- 账号密码登录 start ---------------------------------------
|
|
106
159
|
// 校验验证码
|
|
107
160
|
|
|
108
161
|
// 生成校验码
|
|
109
162
|
|
|
110
|
-
// 提交
|
|
111
|
-
|
|
112
163
|
// 密码显示隐藏
|
|
113
164
|
|
|
165
|
+
// 跳转忘记密码
|
|
166
|
+
|
|
167
|
+
// 显示联系客服弹窗
|
|
168
|
+
|
|
169
|
+
// --------------------------------------- 账号密码登录 end -----------------------------------------
|
|
170
|
+
// --------------------------------------- 手机验证码登录 start ---------------------------------------
|
|
171
|
+
// 发送验证码
|
|
172
|
+
|
|
173
|
+
// --------------------------------------- 手机验证码登录 end -----------------------------------------
|
|
174
|
+
// 提交
|
|
175
|
+
|
|
114
176
|
|
|
115
177
|
Easy3wMLogin.prototype.render = function render() {
|
|
178
|
+
var _this2 = this;
|
|
179
|
+
|
|
180
|
+
var _state = this.state,
|
|
181
|
+
visible = _state.visible,
|
|
182
|
+
activeKey = _state.activeKey,
|
|
183
|
+
count = _state.count;
|
|
116
184
|
var _props = this.props,
|
|
117
185
|
form = _props.form,
|
|
118
186
|
status = _props.status,
|
|
119
187
|
submitting = _props.submitting,
|
|
120
|
-
errorMsg = _props.errorMsg
|
|
121
|
-
|
|
188
|
+
errorMsg = _props.errorMsg,
|
|
189
|
+
objLoginMethod = _props.objLoginMethod;
|
|
190
|
+
|
|
191
|
+
var _ref = objLoginMethod || {},
|
|
192
|
+
account = _ref.account,
|
|
193
|
+
phone = _ref.phone;
|
|
122
194
|
|
|
123
195
|
var errorMsgReal = errorMsg || '账户或密码错误';
|
|
124
196
|
return _react2['default'].createElement(
|
|
@@ -126,22 +198,39 @@ var Easy3wMLogin = function (_Component) {
|
|
|
126
198
|
{ id: 'Easy3wMLogin' },
|
|
127
199
|
_react2['default'].createElement(
|
|
128
200
|
_tabs2['default'],
|
|
129
|
-
{ activeKey:
|
|
130
|
-
_react2['default'].createElement(
|
|
201
|
+
{ activeKey: activeKey, onChange: this.onChange },
|
|
202
|
+
account ? _react2['default'].createElement(
|
|
131
203
|
Tab,
|
|
132
|
-
{ title: '\
|
|
204
|
+
{ title: '\u8D26\u53F7\u5BC6\u7801\u767B\u5F55', key: 'account', destroyOnClose: true },
|
|
133
205
|
_react2['default'].createElement(
|
|
134
206
|
_form2['default'],
|
|
135
207
|
{
|
|
136
|
-
// ref={this.formRef}
|
|
137
208
|
onFinish: this.submitAccountLogin,
|
|
138
209
|
form: form,
|
|
139
|
-
layout: 'horizontal' //
|
|
140
|
-
, name: '
|
|
210
|
+
layout: 'horizontal' // 字段与字段值排列方式
|
|
211
|
+
, name: 'account',
|
|
141
212
|
footer: // 表单尾部的内容,常常用来放置提交按钮
|
|
142
213
|
_react2['default'].createElement(
|
|
143
214
|
'div',
|
|
144
215
|
null,
|
|
216
|
+
_react2['default'].createElement(
|
|
217
|
+
'div',
|
|
218
|
+
{ className: 'funArea' },
|
|
219
|
+
_react2['default'].createElement(
|
|
220
|
+
'a',
|
|
221
|
+
{ onClick: function onClick() {
|
|
222
|
+
return _this2.toPage('forgotPassword');
|
|
223
|
+
} },
|
|
224
|
+
'\u5FD8\u8BB0\u5BC6\u7801'
|
|
225
|
+
),
|
|
226
|
+
_react2['default'].createElement(
|
|
227
|
+
'a',
|
|
228
|
+
{ onClick: function onClick() {
|
|
229
|
+
return _this2.showModal('customerService');
|
|
230
|
+
} },
|
|
231
|
+
'\u8054\u7CFB\u5BA2\u670D'
|
|
232
|
+
)
|
|
233
|
+
),
|
|
145
234
|
_react2['default'].createElement(
|
|
146
235
|
_button2['default'],
|
|
147
236
|
{ color: 'primary', fill: 'solid', block: true, type: 'primary', htmlType: 'submit' },
|
|
@@ -190,7 +279,61 @@ var Easy3wMLogin = function (_Component) {
|
|
|
190
279
|
_react2['default'].createElement(_input2['default'], { placeholder: '\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801 \u4E0D\u533A\u5206\u5927\u5C0F\u5199' })
|
|
191
280
|
)
|
|
192
281
|
)
|
|
193
|
-
)
|
|
282
|
+
) : '',
|
|
283
|
+
phone ? _react2['default'].createElement(
|
|
284
|
+
Tab,
|
|
285
|
+
{ title: '\u624B\u673A\u9A8C\u8BC1\u7801\u767B\u5F55', key: 'phone', destroyOnClose: true },
|
|
286
|
+
_react2['default'].createElement(
|
|
287
|
+
_form2['default'],
|
|
288
|
+
{
|
|
289
|
+
form: form,
|
|
290
|
+
layout: 'horizontal' // 字段与字段值排列方式
|
|
291
|
+
, name: 'phone',
|
|
292
|
+
onFinish: this.submitAccountLogin,
|
|
293
|
+
footer: // 表单尾部的内容,常常用来放置提交按钮
|
|
294
|
+
_react2['default'].createElement(
|
|
295
|
+
'div',
|
|
296
|
+
null,
|
|
297
|
+
_react2['default'].createElement(
|
|
298
|
+
_button2['default'],
|
|
299
|
+
{ type: 'submit', color: 'primary', fill: 'solid', block: true },
|
|
300
|
+
'\u767B\u5F55'
|
|
301
|
+
)
|
|
302
|
+
)
|
|
303
|
+
},
|
|
304
|
+
status === 'error' && submitting === false ? _react2['default'].createElement(
|
|
305
|
+
FormItem,
|
|
306
|
+
null,
|
|
307
|
+
_react2['default'].createElement(
|
|
308
|
+
'div',
|
|
309
|
+
{ className: 'errorMsgReal' },
|
|
310
|
+
errorMsgReal
|
|
311
|
+
)
|
|
312
|
+
) : '',
|
|
313
|
+
_react2['default'].createElement(
|
|
314
|
+
FormItem,
|
|
315
|
+
{ name: 'phone', rules: [{ pattern: /^1\d{10}$/, required: true, message: '手机格式错误' }] },
|
|
316
|
+
_react2['default'].createElement(_input2['default'], { placeholder: '\u8BF7\u8F93\u5165\u624B\u673A\u53F7' })
|
|
317
|
+
),
|
|
318
|
+
_react2['default'].createElement(
|
|
319
|
+
FormItem,
|
|
320
|
+
{
|
|
321
|
+
name: 'piccaptcha',
|
|
322
|
+
extra: count ? _react2['default'].createElement(
|
|
323
|
+
_button2['default'],
|
|
324
|
+
{ size: 'small', type: 'button' },
|
|
325
|
+
count,
|
|
326
|
+
's'
|
|
327
|
+
) : _react2['default'].createElement(
|
|
328
|
+
_button2['default'],
|
|
329
|
+
{ size: 'small', type: 'button', onClick: this.touchSendCode },
|
|
330
|
+
'\u53D1\u9001\u9A8C\u8BC1\u7801'
|
|
331
|
+
)
|
|
332
|
+
},
|
|
333
|
+
_react2['default'].createElement(_input2['default'], { placeholder: '\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801 \u4E0D\u533A\u5206\u5927\u5C0F\u5199' })
|
|
334
|
+
)
|
|
335
|
+
)
|
|
336
|
+
) : ''
|
|
194
337
|
)
|
|
195
338
|
);
|
|
196
339
|
};
|
package/lib/Easy3wMSpin/index.js
CHANGED
|
@@ -2,14 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
|
|
5
|
-
var _spinLoading = require('antd-mobile/es/components/spin-loading');
|
|
6
|
-
|
|
7
|
-
var _spinLoading2 = _interopRequireDefault(_spinLoading);
|
|
8
|
-
|
|
9
|
-
var _extends2 = require('babel-runtime/helpers/extends');
|
|
10
|
-
|
|
11
|
-
var _extends3 = _interopRequireDefault(_extends2);
|
|
12
|
-
|
|
13
5
|
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
|
14
6
|
|
|
15
7
|
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
|
@@ -51,7 +43,12 @@ var Easy3wMSpin = function (_Component) {
|
|
|
51
43
|
return _react2['default'].createElement(
|
|
52
44
|
'div',
|
|
53
45
|
{ id: 'Easy3wMSpin' },
|
|
54
|
-
_react2['default'].createElement(
|
|
46
|
+
_react2['default'].createElement('img', { src: 'common/easy3wloading.gif', alt: 'logo', style: { height: '14px', width: '14px' } }),
|
|
47
|
+
_react2['default'].createElement(
|
|
48
|
+
'div',
|
|
49
|
+
null,
|
|
50
|
+
'\u540E\u53F0\u5904\u7406\u4E2D......'
|
|
51
|
+
)
|
|
55
52
|
);
|
|
56
53
|
} else {
|
|
57
54
|
return '';
|
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
|
|
5
|
+
var _form = require('antd-mobile/es/components/form');
|
|
6
|
+
|
|
7
|
+
var _form2 = _interopRequireDefault(_form);
|
|
8
|
+
|
|
9
|
+
var _button = require('antd-mobile/es/components/button');
|
|
10
|
+
|
|
11
|
+
var _button2 = _interopRequireDefault(_button);
|
|
12
|
+
|
|
13
|
+
var _extends2 = require('babel-runtime/helpers/extends');
|
|
14
|
+
|
|
15
|
+
var _extends3 = _interopRequireDefault(_extends2);
|
|
16
|
+
|
|
17
|
+
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
|
18
|
+
|
|
19
|
+
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
|
20
|
+
|
|
21
|
+
var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
|
|
22
|
+
|
|
23
|
+
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
|
|
24
|
+
|
|
25
|
+
var _inherits2 = require('babel-runtime/helpers/inherits');
|
|
26
|
+
|
|
27
|
+
var _inherits3 = _interopRequireDefault(_inherits2);
|
|
28
|
+
|
|
29
|
+
var _react = require('react');
|
|
30
|
+
|
|
31
|
+
var _react2 = _interopRequireDefault(_react);
|
|
32
|
+
|
|
33
|
+
var _antdMobile = require('antd-mobile');
|
|
34
|
+
|
|
35
|
+
var _antdMobileIcons = require('antd-mobile-icons');
|
|
36
|
+
|
|
37
|
+
var _easy3wmui = require('easy3wmui');
|
|
38
|
+
|
|
39
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
|
40
|
+
|
|
41
|
+
/* eslint-disable no-param-reassign */
|
|
42
|
+
var Item = _easy3wmui.Easy3wMList.Item;
|
|
43
|
+
|
|
44
|
+
var Easy3wMTable = function (_PureComponent) {
|
|
45
|
+
(0, _inherits3['default'])(Easy3wMTable, _PureComponent);
|
|
46
|
+
|
|
47
|
+
function Easy3wMTable(props) {
|
|
48
|
+
(0, _classCallCheck3['default'])(this, Easy3wMTable);
|
|
49
|
+
|
|
50
|
+
var _this = (0, _possibleConstructorReturn3['default'])(this, _PureComponent.call(this, props));
|
|
51
|
+
|
|
52
|
+
_this.formRef = function (form) {
|
|
53
|
+
if (_this.state.form) {
|
|
54
|
+
//
|
|
55
|
+
} else {
|
|
56
|
+
_this.setState({
|
|
57
|
+
form: form
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
return _react2['default'].createRef();
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
_this.touchFetch = function (callback) {
|
|
64
|
+
var handleSearch = _this.props.handleSearch;
|
|
65
|
+
var offset = _this.state.offset;
|
|
66
|
+
|
|
67
|
+
handleSearch(offset, _this.searchInfo, callback);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
_this.touchChangePage = function (operationType) {
|
|
71
|
+
var offset = _this.state.offset;
|
|
72
|
+
|
|
73
|
+
if (operationType === 'minus') {
|
|
74
|
+
offset -= 1;
|
|
75
|
+
} else if (operationType === 'add') {
|
|
76
|
+
offset += 1;
|
|
77
|
+
}
|
|
78
|
+
_this.setState({
|
|
79
|
+
offset: offset // 当前页
|
|
80
|
+
}, _this.touchFetch);
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
_this.touchDropUpFlip = function () {
|
|
84
|
+
var flipContainer = document.querySelector('.flipContainer'); // 翻页主体
|
|
85
|
+
_this.flipContainerHeight = flipContainer.offsetHeight; // 元素高度
|
|
86
|
+
var flipText = document.querySelector('.flipText'); // 翻页提示文字
|
|
87
|
+
// 当手指放在触摸屏上时,发生此事件
|
|
88
|
+
flipContainer.addEventListener('touchstart', function (e) {
|
|
89
|
+
return _this.touchstart(e, flipContainer, flipText);
|
|
90
|
+
});
|
|
91
|
+
// 当手指在屏幕上拖动时,发生此事件
|
|
92
|
+
flipContainer.addEventListener('touchmove', function (e) {
|
|
93
|
+
return _this.touchmove(e, flipContainer, flipText);
|
|
94
|
+
});
|
|
95
|
+
// 当手指从触摸屏上移开时,发生此事件
|
|
96
|
+
flipContainer.addEventListener('touchend', function (e) {
|
|
97
|
+
return _this.touchend(e, flipContainer, flipText);
|
|
98
|
+
});
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
_this.touchstart = function (e, flipContainer, flipText) {
|
|
102
|
+
var offset = _this.state.offset;
|
|
103
|
+
var intData = _this.props.intData;
|
|
104
|
+
|
|
105
|
+
if (offset === Math.ceil(intData / 10)) {
|
|
106
|
+
flipText.innerText = '已经没有更多了!';
|
|
107
|
+
} else if (Math.round(flipContainer.getBoundingClientRect().bottom) === document.body.offsetHeight) {
|
|
108
|
+
_this.startPos = e.touches[0].pageY;
|
|
109
|
+
flipContainer.style.transition = 'transform 0s';
|
|
110
|
+
// this.setState({
|
|
111
|
+
// startPos, // 起始位置
|
|
112
|
+
// });
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
_this.touchmove = function (e, flipContainer, flipText) {
|
|
117
|
+
if (Math.round(flipContainer.getBoundingClientRect().bottom) === document.body.offsetHeight && _this.startPos) {
|
|
118
|
+
_this.transitionHeight = e.touches[0].pageY - _this.startPos;
|
|
119
|
+
if (_this.transitionHeight < 0 && _this.transitionHeight > -48) {
|
|
120
|
+
flipText.innerText = '上拉翻页';
|
|
121
|
+
flipContainer.style.transform = 'translateY(' + _this.transitionHeight + 'px)';
|
|
122
|
+
if (_this.transitionHeight < 0 && _this.transitionHeight > -36) {
|
|
123
|
+
flipText.innerText = '释放更新';
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
} else {
|
|
127
|
+
_this.startPos = e.touches[0].pageY;
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
_this.touchend = function (e, flipContainer, flipText) {
|
|
132
|
+
if (_this.transitionHeight < 0 && _this.transitionHeight > -36) {
|
|
133
|
+
flipText.innerText = '更新中...';
|
|
134
|
+
var offset = _this.state.offset;
|
|
135
|
+
|
|
136
|
+
_this.setState({
|
|
137
|
+
offset: offset + 1
|
|
138
|
+
}, function () {
|
|
139
|
+
_this.touchFetch(function () {
|
|
140
|
+
flipContainer.style.transition = 'transform 0.5s ease 1s';
|
|
141
|
+
flipContainer.style.transform = 'translateY(0px)';
|
|
142
|
+
flipText.innerText = '';
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
|
+
} else {
|
|
146
|
+
flipContainer.style.transition = 'transform 0.5s ease 1s';
|
|
147
|
+
flipContainer.style.transform = 'translateY(0px)';
|
|
148
|
+
setTimeout(function () {
|
|
149
|
+
flipText.innerText = '';
|
|
150
|
+
}, 1500);
|
|
151
|
+
}
|
|
152
|
+
_this.startPos = null; // 起始位置
|
|
153
|
+
_this.transitionHeight = null; // 移动距离
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
_this.touchClearSV = function () {
|
|
157
|
+
_this.searchInfo.keywordsQry = ''; // 关键字
|
|
158
|
+
_this.setState({
|
|
159
|
+
offset: 1
|
|
160
|
+
}, function () {
|
|
161
|
+
return _this.touchFetch();
|
|
162
|
+
});
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
_this.touchChangeSV = function (keywordsQry) {
|
|
166
|
+
_this.searchInfo.keywordsQry = keywordsQry;
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
_this.touchSearch = function () {
|
|
170
|
+
_this.setState({
|
|
171
|
+
offset: 1
|
|
172
|
+
}, function () {
|
|
173
|
+
return _this.touchFetch();
|
|
174
|
+
});
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
_this.showModal = function () {
|
|
178
|
+
_this.setState({
|
|
179
|
+
visible: true // 显示更多筛选条件Modal
|
|
180
|
+
});
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
_this.hideModal = function () {
|
|
184
|
+
_this.setState({
|
|
185
|
+
visible: false // 隐藏更多筛选条件Modal
|
|
186
|
+
});
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
_this.touchConfirm = function () {
|
|
190
|
+
var values = _this.state.form.getFieldsValue();
|
|
191
|
+
var searchInfo = (0, _extends3['default'])({}, _this.searchInfo, values);
|
|
192
|
+
_this.searchInfo = searchInfo;
|
|
193
|
+
_this.touchFetch();
|
|
194
|
+
_this.hideModal();
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
var bidPureComponent = _this.props.bidPureComponent;
|
|
198
|
+
|
|
199
|
+
if (bidPureComponent && typeof bidPureComponent === 'function') {
|
|
200
|
+
bidPureComponent(_this);
|
|
201
|
+
}
|
|
202
|
+
_this.searchInfo = {}; // 查询条件
|
|
203
|
+
// 上拉翻页属性
|
|
204
|
+
_this.startPos = null; // 起始位置
|
|
205
|
+
_this.transitionHeight = null; // 移动距离
|
|
206
|
+
_this.state = {
|
|
207
|
+
offset: 1, // 分页
|
|
208
|
+
visible: false, // 隐藏更多筛选条件Modal
|
|
209
|
+
form: null // 表单实例
|
|
210
|
+
};
|
|
211
|
+
return _this;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
Easy3wMTable.prototype.componentDidMount = function componentDidMount() {
|
|
215
|
+
var dropUpFlipFlag = this.props.dropUpFlipFlag;
|
|
216
|
+
|
|
217
|
+
if (dropUpFlipFlag) {
|
|
218
|
+
// 上拉翻页标识 true 开启 false 关闭
|
|
219
|
+
this.touchDropUpFlip();
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
Easy3wMTable.prototype.componentWillUnmount = function componentWillUnmount() {
|
|
224
|
+
var flipContainer = document.querySelector('.flipContainer'); // 翻页主体
|
|
225
|
+
if (flipContainer.removeEventListener) {
|
|
226
|
+
// 所有浏览器,除了 IE 8 及更早IE版本
|
|
227
|
+
// 当手指放在触摸屏上时,发生此事件
|
|
228
|
+
flipContainer.removeEventListener('touchstart', this.touchstart);
|
|
229
|
+
// 当手指在屏幕上拖动时,发生此事件
|
|
230
|
+
flipContainer.removeEventListener('touchmove', this.touchmove);
|
|
231
|
+
// 当手指从触摸屏上移开时,发生此事件
|
|
232
|
+
flipContainer.removeEventListener('touchend', this.touchend);
|
|
233
|
+
} else if (flipContainer.detachEvent) {
|
|
234
|
+
// IE 8 及更早IE版本
|
|
235
|
+
// 当手指放在触摸屏上时,发生此事件
|
|
236
|
+
flipContainer.detachEvent('touchstart', this.touchstart);
|
|
237
|
+
// 当手指在屏幕上拖动时,发生此事件
|
|
238
|
+
flipContainer.detachEvent('touchmove', this.touchmove);
|
|
239
|
+
// 当手指从触摸屏上移开时,发生此事件
|
|
240
|
+
flipContainer.detachEvent('touchend', this.touchend);
|
|
241
|
+
}
|
|
242
|
+
};
|
|
243
|
+
// 生成form实例
|
|
244
|
+
|
|
245
|
+
// 触发查询
|
|
246
|
+
|
|
247
|
+
// --------------------------------------------------- 上拉翻页 end ---------------------------------------------------
|
|
248
|
+
// 按钮翻页
|
|
249
|
+
|
|
250
|
+
// --------------------------------------------- 查询条件 start ---------------------------------------------
|
|
251
|
+
// --------------------------------------------------- 上拉翻页 start ---------------------------------------------------
|
|
252
|
+
// 上拉翻页
|
|
253
|
+
|
|
254
|
+
// 当手指放在触摸屏上时,发生此事件
|
|
255
|
+
|
|
256
|
+
// 当手指在屏幕上拖动时,发生此事件
|
|
257
|
+
|
|
258
|
+
// 当手指从触摸屏上移开时,发生此事件
|
|
259
|
+
|
|
260
|
+
// 清空查询条件
|
|
261
|
+
|
|
262
|
+
// 查询条件--流程名称修改
|
|
263
|
+
|
|
264
|
+
// 查询
|
|
265
|
+
|
|
266
|
+
// --------------------------------------------- 查询条件 end -----------------------------------------------
|
|
267
|
+
// --------------------------------------------- 更多筛选条件 start ---------------------------------------------
|
|
268
|
+
// 显示更多筛选条件Modal
|
|
269
|
+
|
|
270
|
+
// 隐藏更多筛选条件Modal
|
|
271
|
+
|
|
272
|
+
// 确定
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
// --------------------------------------------- 更多筛选条件 end -----------------------------------------------
|
|
276
|
+
Easy3wMTable.prototype.render = function render() {
|
|
277
|
+
var _this2 = this;
|
|
278
|
+
|
|
279
|
+
var _state = this.state,
|
|
280
|
+
offset = _state.offset,
|
|
281
|
+
visible = _state.visible;
|
|
282
|
+
var _props = this.props,
|
|
283
|
+
columns = _props.columns,
|
|
284
|
+
intData = _props.intData,
|
|
285
|
+
arrData = _props.arrData,
|
|
286
|
+
needPaginationFlag = _props.needPaginationFlag,
|
|
287
|
+
queryCriteria = _props.queryCriteria,
|
|
288
|
+
arrFilter = _props.arrFilter;
|
|
289
|
+
// columns 表头 arr intData 数量 num arrData 数据 arr needPaginationFlag 分页标识 bool handleSearch 查询方法 fun
|
|
290
|
+
// dropUpFlipFlag 上拉翻页标识 bool bidPureComponent 将this传递出去 fun queryCriteria 关键字 str
|
|
291
|
+
|
|
292
|
+
var arrBtn = [{
|
|
293
|
+
cName: '查询',
|
|
294
|
+
onClick: function onClick() {
|
|
295
|
+
return _this2.touchConfirm();
|
|
296
|
+
}
|
|
297
|
+
}, {
|
|
298
|
+
cName: '关闭',
|
|
299
|
+
onClick: function onClick() {
|
|
300
|
+
return _this2.hideModal();
|
|
301
|
+
}
|
|
302
|
+
}];
|
|
303
|
+
return _react2['default'].createElement(
|
|
304
|
+
'div',
|
|
305
|
+
{ id: 'Easy3wMTable' },
|
|
306
|
+
_react2['default'].createElement(
|
|
307
|
+
'div',
|
|
308
|
+
{ className: 'flipContainer' },
|
|
309
|
+
_react2['default'].createElement(
|
|
310
|
+
_easy3wmui.Easy3wMList,
|
|
311
|
+
null,
|
|
312
|
+
queryCriteria ? _react2['default'].createElement(Item, {
|
|
313
|
+
className: 'queryCriteria',
|
|
314
|
+
extra: arrFilter && arrFilter.length ? _react2['default'].createElement(
|
|
315
|
+
'div',
|
|
316
|
+
{ className: 'more', onClick: this.showModal },
|
|
317
|
+
'\u66F4\u591A\u7B5B\u9009'
|
|
318
|
+
) : '',
|
|
319
|
+
title: _react2['default'].createElement(_easy3wmui.Easy3wMSearchBar, {
|
|
320
|
+
onChange: function onChange(value) {
|
|
321
|
+
return _this2.touchChangeSV(value);
|
|
322
|
+
} // 输入框内容变化时触发
|
|
323
|
+
, onSearch: function onSearch() {
|
|
324
|
+
return _this2.touchSearch();
|
|
325
|
+
} // 输入框回车时触发
|
|
326
|
+
, onClear: function onClear() {
|
|
327
|
+
return _this2.touchClearSV('');
|
|
328
|
+
} // 点击清除按钮后触发
|
|
329
|
+
, placeholder: '\u8BF7\u8F93\u5165\u5173\u952E\u5B57\u67E5\u8BE2' // 提示文本
|
|
330
|
+
, clearOnCancel: false // 点击取消按钮后是否清空输入框
|
|
331
|
+
, showCancelButton: function showCancelButton() {
|
|
332
|
+
return true;
|
|
333
|
+
} // 是否在搜索框右侧显示取消按钮
|
|
334
|
+
, cancelText: '\u67E5\u8BE2' // 取消按钮的文案
|
|
335
|
+
, onCancel: function onCancel() {
|
|
336
|
+
return _this2.touchSearch();
|
|
337
|
+
} // 点击取消按钮时触发
|
|
338
|
+
})
|
|
339
|
+
}) : '',
|
|
340
|
+
arrData ? arrData.map(function (item, index) {
|
|
341
|
+
return _react2['default'].createElement(
|
|
342
|
+
Item,
|
|
343
|
+
null,
|
|
344
|
+
_react2['default'].createElement(
|
|
345
|
+
'div',
|
|
346
|
+
{ className: 'singleItem' },
|
|
347
|
+
columns.map(function (obj) {
|
|
348
|
+
var title = obj.title,
|
|
349
|
+
dataIndex = obj.dataIndex,
|
|
350
|
+
render = obj.render,
|
|
351
|
+
onRow = obj.onRow,
|
|
352
|
+
_onClick = obj.onClick;
|
|
353
|
+
|
|
354
|
+
var value = item[dataIndex];
|
|
355
|
+
if (render) {
|
|
356
|
+
value = render(value, item, index);
|
|
357
|
+
}
|
|
358
|
+
return _react2['default'].createElement(
|
|
359
|
+
'div',
|
|
360
|
+
{ className: 'itemAttr ' + (onRow ? 'clickable' : ''), onClick: function onClick() {
|
|
361
|
+
return onRow(item[dataIndex], item, index);
|
|
362
|
+
} },
|
|
363
|
+
_react2['default'].createElement(
|
|
364
|
+
'span',
|
|
365
|
+
{ className: 'attrLabel' },
|
|
366
|
+
title
|
|
367
|
+
),
|
|
368
|
+
_react2['default'].createElement(
|
|
369
|
+
'span',
|
|
370
|
+
{ className: 'attrKey ' + (_onClick ? 'clickable' : ''), onClick: function onClick() {
|
|
371
|
+
return _onClick(item[dataIndex], item, index);
|
|
372
|
+
} },
|
|
373
|
+
value
|
|
374
|
+
)
|
|
375
|
+
);
|
|
376
|
+
})
|
|
377
|
+
)
|
|
378
|
+
);
|
|
379
|
+
}) : ''
|
|
380
|
+
),
|
|
381
|
+
needPaginationFlag ? _react2['default'].createElement(
|
|
382
|
+
_easy3wmui.Easy3wMCard,
|
|
383
|
+
null,
|
|
384
|
+
_react2['default'].createElement(
|
|
385
|
+
'div',
|
|
386
|
+
{ className: 'easy3wMGridPageStepper' },
|
|
387
|
+
_react2['default'].createElement(
|
|
388
|
+
_button2['default'],
|
|
389
|
+
{ color: 'default', fill: 'none', onClick: function onClick() {
|
|
390
|
+
return _this2.touchChangePage('minus');
|
|
391
|
+
}, disabled: offset === 1 },
|
|
392
|
+
_react2['default'].createElement(_antdMobileIcons.LeftOutline, null)
|
|
393
|
+
),
|
|
394
|
+
_react2['default'].createElement(
|
|
395
|
+
'span',
|
|
396
|
+
null,
|
|
397
|
+
offset,
|
|
398
|
+
'/',
|
|
399
|
+
Math.ceil(intData / 10),
|
|
400
|
+
' \u5171',
|
|
401
|
+
intData,
|
|
402
|
+
'\u6761'
|
|
403
|
+
),
|
|
404
|
+
_react2['default'].createElement(
|
|
405
|
+
_button2['default'],
|
|
406
|
+
{ color: 'default', fill: 'none', onClick: function onClick() {
|
|
407
|
+
return _this2.touchChangePage('add');
|
|
408
|
+
}, disabled: offset === Math.ceil(intData / 10) },
|
|
409
|
+
_react2['default'].createElement(_antdMobileIcons.RightOutline, null)
|
|
410
|
+
)
|
|
411
|
+
)
|
|
412
|
+
) : '',
|
|
413
|
+
_react2['default'].createElement(
|
|
414
|
+
_easy3wmui.Easy3wMPopup,
|
|
415
|
+
{
|
|
416
|
+
visible: visible,
|
|
417
|
+
onClose: this.hideModal,
|
|
418
|
+
position: 'top'
|
|
419
|
+
// showCloseButton
|
|
420
|
+
, bodyStyle: { height: '100vh', overflow: 'auto' },
|
|
421
|
+
getContainer: document.querySelector('.flipContainer')
|
|
422
|
+
},
|
|
423
|
+
_react2['default'].createElement(_form2['default'], { ref: this.formRef }),
|
|
424
|
+
this.state.form ? _react2['default'].createElement(_easy3wmui.Easy3wMFormPage, {
|
|
425
|
+
rowItems: arrFilter,
|
|
426
|
+
form: this.state.form
|
|
427
|
+
}) : '',
|
|
428
|
+
_react2['default'].createElement(
|
|
429
|
+
'div',
|
|
430
|
+
{ className: 'queryCriteriaBtn' },
|
|
431
|
+
_react2['default'].createElement(_easy3wmui.Easy3wMButton, { arrBtn: arrBtn })
|
|
432
|
+
)
|
|
433
|
+
)
|
|
434
|
+
),
|
|
435
|
+
_react2['default'].createElement('div', { className: 'flipText', style: { textAlign: 'center' } })
|
|
436
|
+
);
|
|
437
|
+
};
|
|
438
|
+
|
|
439
|
+
return Easy3wMTable;
|
|
440
|
+
}(_react.PureComponent);
|
|
441
|
+
|
|
442
|
+
exports['default'] = Easy3wMTable;
|
|
443
|
+
module.exports = exports['default'];
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
#Easy3wMUserLayout {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
height: 100%;
|
|
2
5
|
.Easy3wMUserLayoutContent { // 内容
|
|
3
6
|
background-color: #f0f2f5;
|
|
4
7
|
width: 100%;
|
|
5
|
-
min-height: 100%;
|
|
8
|
+
// min-height: 100%;
|
|
6
9
|
background-repeat: no-repeat;
|
|
7
10
|
background-position: center;
|
|
8
11
|
background-size: 100%;
|
|
9
12
|
padding: 40px 0 0 0;
|
|
13
|
+
flex-grow: 1;
|
|
10
14
|
}
|
|
11
15
|
}
|
package/lib/index.js
CHANGED
|
@@ -713,6 +713,15 @@ Object.defineProperty(exports, 'Easy3wMGridPage', {
|
|
|
713
713
|
}
|
|
714
714
|
});
|
|
715
715
|
|
|
716
|
+
var _Easy3wMTable = require('./Easy3wMTable');
|
|
717
|
+
|
|
718
|
+
Object.defineProperty(exports, 'Easy3wMTable', {
|
|
719
|
+
enumerable: true,
|
|
720
|
+
get: function get() {
|
|
721
|
+
return _interopRequireDefault(_Easy3wMTable)['default'];
|
|
722
|
+
}
|
|
723
|
+
});
|
|
724
|
+
|
|
716
725
|
var _Easy3wMGlobalHeader = require('./Easy3wMGlobalHeader');
|
|
717
726
|
|
|
718
727
|
Object.defineProperty(exports, 'Easy3wMGlobalHeader', {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "easy3wmui",
|
|
3
|
-
"version": "0.0.42-
|
|
3
|
+
"version": "0.0.42-beta30",
|
|
4
4
|
"description": "easy3wmui components for react",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
],
|
|
104
104
|
"dependencies": {
|
|
105
105
|
"@hanyk/rc-viewer": "^0.0.3",
|
|
106
|
-
"antd-mobile": "5.
|
|
106
|
+
"antd-mobile": "5.34.0",
|
|
107
107
|
"braft-editor": "^2.3.8",
|
|
108
108
|
"lodash": "4.17.11",
|
|
109
109
|
"node-red": "^2.1.4",
|