@cloudbase/weda-ui 1.0.21 → 1.0.24
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/package.json +5 -3
- package/src/configs/components/dataView.json +1 -1
- package/src/configs/components/listView.json +1 -1
- package/src/configs/components/lottery.json +151 -0
- package/src/configs/index.js +2 -0
- package/src/index.js +2 -0
- package/src/mp/components/button/index.wxml +1 -2
- package/src/mp/components/form/form/index.wxml +1 -2
- package/src/mp/components/form/select/index.js +8 -20
- package/src/mp/components/form/select/region/index.js +6 -3
- package/src/mp/components/listView/index.js +5 -16
- package/src/mp/components/lottery/index.js +270 -0
- package/src/mp/components/lottery/index.json +4 -0
- package/src/mp/components/lottery/index.wxml +43 -0
- package/src/mp/components/lottery/index.wxss +317 -0
- package/src/mp/components/wxOpenApi/phone/index.js +1 -1
- package/src/mp/index.json +4 -3
- package/src/mp/utils/constant.js +15 -0
- package/src/mp/utils/lodash.js +2 -0
- package/src/web/components/chart/common/config/line.js +1 -1
- package/src/web/components/form/checkbox/index.tsx +6 -0
- package/src/web/components/form/formcell/index.tsx +10 -5
- package/src/web/components/form/radio/index.tsx +6 -0
- package/src/web/components/form/select/h5.tsx +5 -24
- package/src/web/components/form/select/index.tsx +4 -17
- package/src/web/components/form/tips/index.css +4 -0
- package/src/web/components/form/tips/index.tsx +4 -3
- package/src/web/components/index.js +1 -0
- package/src/web/components/listView/index.tsx +4 -17
- package/src/web/components/lottery/index.css +327 -0
- package/src/web/components/lottery/index.tsx +567 -0
- package/src/web/components/lottery/lotteryUtil.ts +130 -0
- package/src/web/utils/{constant.js → constant.ts} +17 -2
- package/src/web/utils/lodash.ts +2 -0
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
.weda-lottery {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 652rpx;
|
|
4
|
+
position: relative;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.weda-lottery .weda-lottery__wrap {
|
|
8
|
+
position: relative;
|
|
9
|
+
width: 100%;
|
|
10
|
+
height: 652rpx;
|
|
11
|
+
background: #FF465C;
|
|
12
|
+
border: 2rpx solid rgba(255, 255, 255, 0.6);
|
|
13
|
+
box-shadow: inset 0px 0px 8rpx rgba(255, 255, 255, 0.5);
|
|
14
|
+
border-radius: 20rpx;
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.weda-lottery .weda-lottery__dot-top {
|
|
19
|
+
position: absolute;
|
|
20
|
+
top: 8rpx;
|
|
21
|
+
left: calc((100% - 434rpx) / 2);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.weda-lottery .weda-lottery__dot-bottom {
|
|
25
|
+
position: absolute;
|
|
26
|
+
bottom: 8rpx;
|
|
27
|
+
left: calc((100% - 434rpx) / 2);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.weda-lottery .weda-lottery__dot-left {
|
|
31
|
+
position: absolute;
|
|
32
|
+
left: 8rpx;
|
|
33
|
+
top: calc((100% - 434rpx) / 2);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.weda-lottery .weda-lottery__dot-right {
|
|
37
|
+
position: absolute;
|
|
38
|
+
right: 8rpx;
|
|
39
|
+
top: calc((100% - 434rpx) / 2);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.weda-lottery .weda-lottery__dot {
|
|
43
|
+
display: flex;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.weda-lottery .weda-lottery__dot-horizontal {
|
|
47
|
+
flex-direction: row;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.weda-lottery .weda-lottery__dot-vertical {
|
|
51
|
+
flex-direction: column;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.weda-lottery .weda-lottery__dot .weda-lottery__dot-item,
|
|
55
|
+
.weda-lottery .weda-lottery__dot-single {
|
|
56
|
+
width: 18rpx;
|
|
57
|
+
height: 18rpx;
|
|
58
|
+
box-shadow: 0px 0px 8rpx rgba(255, 255, 255, 0.3);
|
|
59
|
+
border-radius: 50%;
|
|
60
|
+
background: #FFFFFF;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.weda-lottery .weda-lottery__dot .weda-lottery__dot-item:nth-child(odd) {
|
|
64
|
+
background: #FFEE52;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.weda-lottery .weda-lottery__dot .weda-lottery__dot-item:nth-child(even) {
|
|
68
|
+
background: #FFFFFF
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.weda-lottery .weda-lottery__dot-horizontal .weda-lottery__dot-item {
|
|
72
|
+
margin-right: 86rpx;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.weda-lottery .weda-lottery__dot-horizontal .weda-lottery__dot-item:last-child {
|
|
76
|
+
margin-right: 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.weda-lottery .weda-lottery__dot-vertical .weda-lottery__dot-item {
|
|
80
|
+
margin-bottom: 86rpx;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.weda-lottery .weda-lottery__dot-vertical .weda-lottery__dot-item:last-child {
|
|
84
|
+
margin-bottom: 0;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.weda-lottery .weda-lottery__dot-left-top {
|
|
88
|
+
position: absolute;
|
|
89
|
+
top: 18rpx;
|
|
90
|
+
left: 12rpx;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.weda-lottery .weda-lottery__dot-right-top {
|
|
94
|
+
position: absolute;
|
|
95
|
+
top: 18rpx;
|
|
96
|
+
right: 12rpx;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.weda-lottery .weda-lottery__dot-left-bottom {
|
|
100
|
+
position: absolute;
|
|
101
|
+
left: 12rpx;
|
|
102
|
+
bottom: 18rpx;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.weda-lottery .weda-lottery__dot-right-bottom {
|
|
106
|
+
position: absolute;
|
|
107
|
+
right: 12rpx;
|
|
108
|
+
bottom: 18rpx;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.weda-lottery .weda-lottery__inner {
|
|
112
|
+
padding: 36rpx;
|
|
113
|
+
width: 100%;
|
|
114
|
+
height: 100%;
|
|
115
|
+
box-sizing: border-box;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__inner-wrap {
|
|
119
|
+
position: relative;
|
|
120
|
+
width: 100%;
|
|
121
|
+
box-sizing: border-box;
|
|
122
|
+
background: linear-gradient(180deg, #DD0D00 0%, #D80027 100%);
|
|
123
|
+
border: 2rpx solid rgba(255, 255, 255, 0.25);
|
|
124
|
+
box-shadow: inset 0px 0px 8rpx rgba(255, 255, 255, 0.5);
|
|
125
|
+
border-radius: 20rpx;
|
|
126
|
+
height: 100%;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__list {
|
|
130
|
+
position: absolute;
|
|
131
|
+
top: 0;
|
|
132
|
+
left: 0;
|
|
133
|
+
right: 0;
|
|
134
|
+
bottom: 0;
|
|
135
|
+
z-index: 1;
|
|
136
|
+
box-sizing: border-box;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item {
|
|
140
|
+
position: absolute;
|
|
141
|
+
width: calc((100% - 64rpx) / 3);
|
|
142
|
+
height: calc((100% - 64rpx) / 3);
|
|
143
|
+
font-size: 0;
|
|
144
|
+
text-align: center;
|
|
145
|
+
background: #FFF8EE;
|
|
146
|
+
box-shadow: inset 0px -4rpx 0px #FFDDBD;
|
|
147
|
+
border-radius: 16rpx;
|
|
148
|
+
box-sizing: border-box;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item.is-actived {
|
|
152
|
+
background: #FFF8EE;
|
|
153
|
+
box-shadow: 0px 0px 12rpx #FFFFFF;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item.is-selected {
|
|
157
|
+
background: #FF6666;
|
|
158
|
+
box-shadow: inset 0px -4rpx 0px #FFA4A4;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:first-child {
|
|
162
|
+
top: 16rpx;
|
|
163
|
+
left: 16rpx;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:nth-child(2) {
|
|
167
|
+
top: 16rpx;
|
|
168
|
+
left: calc((100% - 64rpx) / 3 + 32rpx);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:nth-child(3) {
|
|
172
|
+
top: 16rpx;
|
|
173
|
+
right: 16rpx;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:nth-child(4) {
|
|
177
|
+
top: calc((100% - 64rpx) / 3 + 32rpx);
|
|
178
|
+
right: 16rpx;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:nth-child(5) {
|
|
182
|
+
bottom: 16rpx;
|
|
183
|
+
right: 16rpx;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:nth-child(6) {
|
|
187
|
+
bottom: 16rpx;
|
|
188
|
+
left: calc((100% - 64rpx) / 3 + 32rpx);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:nth-child(7) {
|
|
192
|
+
bottom: 16rpx;
|
|
193
|
+
left: 16rpx;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:nth-child(8) {
|
|
197
|
+
bottom: calc((100% - 64rpx) / 3 + 32rpx);
|
|
198
|
+
left: 16rpx;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-cell {
|
|
202
|
+
width: 100%;
|
|
203
|
+
height: 100%;
|
|
204
|
+
max-width: 100%;
|
|
205
|
+
max-height: 100%;
|
|
206
|
+
box-sizing: border-box;
|
|
207
|
+
border-width: 8rpx;
|
|
208
|
+
border-style: solid;
|
|
209
|
+
border-color: transparent;
|
|
210
|
+
border-radius: 16rpx;
|
|
211
|
+
display: flex;
|
|
212
|
+
flex-direction: column;
|
|
213
|
+
align-items: center;
|
|
214
|
+
justify-content: center;
|
|
215
|
+
padding: 16rpx 5rpx 16rpx 5rpx;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item.is-actived .weda-lottery__turntable-cell {
|
|
219
|
+
border-color: #FFE05F;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-cell-image {
|
|
223
|
+
height: 80rpx;
|
|
224
|
+
display: flex;
|
|
225
|
+
align-items: center;
|
|
226
|
+
justify-content: center;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-cell-icon {
|
|
230
|
+
display: block;
|
|
231
|
+
width: 80rpx;
|
|
232
|
+
height: 80rpx;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-cell-desc {
|
|
236
|
+
margin-top: 12rpx;
|
|
237
|
+
font-weight: 400;
|
|
238
|
+
font-size: 24rpx;
|
|
239
|
+
line-height: 34rpx;
|
|
240
|
+
text-align: center;
|
|
241
|
+
color: #BA0000;
|
|
242
|
+
white-space: nowrap;
|
|
243
|
+
text-overflow: ellipsis;
|
|
244
|
+
overflow: hidden;
|
|
245
|
+
width: 100%;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item.is-selected .weda-lottery__turntable-cell-desc {
|
|
249
|
+
color: #FFFFFF;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.weda-lottery .weda-lottery__turntable-btn {
|
|
253
|
+
z-index: 2;
|
|
254
|
+
position: absolute;
|
|
255
|
+
width: calc((100% - 64rpx) / 3);
|
|
256
|
+
height: calc((100% - 64rpx) / 3);
|
|
257
|
+
top: calc((100% - 64rpx) / 3 + 32rpx);
|
|
258
|
+
left: calc((100% - 64rpx) / 3 + 32rpx);
|
|
259
|
+
background: linear-gradient(180deg, #FFEE81 0%, #FFD646 100%);
|
|
260
|
+
box-shadow: inset 0px -4rpx 0px #FF7A00;
|
|
261
|
+
border-radius: 50%;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.weda-lottery .weda-lottery__turntable-btn.is-actived {
|
|
265
|
+
background: linear-gradient(180deg, #FFEE81 0%, #FFD646 100%);
|
|
266
|
+
box-shadow: inset 0px 4rpx 0px #FFFFFF;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.weda-lottery .weda-lottery__btn-inner {
|
|
270
|
+
padding: 18rpx;
|
|
271
|
+
width: 100%;
|
|
272
|
+
height: 100%;
|
|
273
|
+
box-sizing: border-box;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.weda-lottery .weda-lottery__btn {
|
|
277
|
+
width: 100%;
|
|
278
|
+
height: 100%;
|
|
279
|
+
background: linear-gradient(180deg, #FF922D 0%, #FF3C76 100%);
|
|
280
|
+
box-shadow: inset 0px 0px 16rpx rgba(234, 27, 53, 0.5);
|
|
281
|
+
border-radius: 50%;
|
|
282
|
+
display: flex;
|
|
283
|
+
align-items: center;
|
|
284
|
+
justify-content: center;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.weda-lottery .weda-lottery__turntable-btn.is-actived .weda-lottery__btn {
|
|
288
|
+
background: linear-gradient(180deg, #FF922D 0%, #FF3C76 100%);
|
|
289
|
+
box-shadow: inset 0px 0px 16rpx rgba(234, 27, 53, 0.5);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.weda-lottery .weda-lottery__btn-image {
|
|
293
|
+
padding: 22rpx 30rpx;
|
|
294
|
+
width: 100%;
|
|
295
|
+
box-sizing: border-box;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.weda-lottery .weda-lottery__btn-image .weda-lottery__btn-text {
|
|
299
|
+
font-weight: 600;
|
|
300
|
+
font-size: 18px;
|
|
301
|
+
line-height: 22px;
|
|
302
|
+
text-align: center;
|
|
303
|
+
color: #FFFFFF;
|
|
304
|
+
text-shadow: 0px 0.5px 0px #E42B27;
|
|
305
|
+
max-height: 100%;
|
|
306
|
+
display: -webkit-box;
|
|
307
|
+
overflow: hidden;
|
|
308
|
+
text-overflow: ellipsis;
|
|
309
|
+
-webkit-box-orient: vertical;
|
|
310
|
+
-webkit-line-clamp: 2;
|
|
311
|
+
width: 100%;
|
|
312
|
+
height: 100%;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.weda-lottery .weda-lottery__turntable-btn.is-actived .weda-lottery__btn-image {
|
|
316
|
+
opacity: 0.6;
|
|
317
|
+
}
|
|
@@ -84,7 +84,7 @@ Component({
|
|
|
84
84
|
this.triggerEvent('phonefail', { errMsg: '获取手机号失败' });
|
|
85
85
|
return;
|
|
86
86
|
}
|
|
87
|
-
const parseData = destr(res?.Data)
|
|
87
|
+
const parseData = destr(res?.Data) || {};
|
|
88
88
|
const { phone_info } = parseData;
|
|
89
89
|
if (!phone_info) {
|
|
90
90
|
this.triggerEvent('phonefail', { errMsg: '获取手机号失败' });
|
package/src/mp/index.json
CHANGED
|
@@ -40,11 +40,12 @@
|
|
|
40
40
|
"GraphicCard": "components/graphicCard/index",
|
|
41
41
|
"UserInfo": "components/wxOpenApi/userInfo/index",
|
|
42
42
|
"Phone": "components/wxOpenApi/phone/index",
|
|
43
|
-
"
|
|
44
|
-
"
|
|
43
|
+
"Share": "components/wxOpenApi/share/index",
|
|
44
|
+
"Lottery": "components/lottery/index",
|
|
45
|
+
"PhoneCode": "components/wxOpenApi/phoneCode/index"
|
|
45
46
|
},
|
|
46
47
|
"actions": {
|
|
47
48
|
"showToast": "actions/showToast/index",
|
|
48
49
|
"showModal": "actions/showModal/index"
|
|
49
50
|
}
|
|
50
|
-
}
|
|
51
|
+
}
|
package/src/mp/utils/constant.js
CHANGED
|
@@ -3,3 +3,18 @@ export const TitleType = {
|
|
|
3
3
|
TOP: 'top',
|
|
4
4
|
NONE: 'none',
|
|
5
5
|
};
|
|
6
|
+
|
|
7
|
+
export const REL_DICT = {
|
|
8
|
+
equal: 'eq', // 等于
|
|
9
|
+
unequal: 'neq', // 不等于
|
|
10
|
+
include: 'search', // 包含
|
|
11
|
+
exclude: '_exclude', // 不包含
|
|
12
|
+
begin_with: '_begin_with', // 开头是
|
|
13
|
+
greater: 'gt', // 大于
|
|
14
|
+
greater_or_equal: 'gte', // 大于等于
|
|
15
|
+
bigger_or_equal: 'gte', //大于等于
|
|
16
|
+
less: 'lt', // 小于
|
|
17
|
+
less_or_equal: 'lte', // 小于等于
|
|
18
|
+
in: 'in', // 多选值
|
|
19
|
+
not_in: 'nin', // 不在多选值
|
|
20
|
+
};
|
|
@@ -67,6 +67,12 @@ export default function Checkbox({
|
|
|
67
67
|
}
|
|
68
68
|
}, []);
|
|
69
69
|
|
|
70
|
+
useEffect(() => {
|
|
71
|
+
if (format !== 'x-enum') {
|
|
72
|
+
setOption(range)
|
|
73
|
+
}
|
|
74
|
+
}, [range]);
|
|
75
|
+
|
|
70
76
|
const fetchData = async (param:
|
|
71
77
|
{ OptNameList?: object, PageIndex?: number, PageSize?: number }
|
|
72
78
|
) => {
|
|
@@ -14,13 +14,13 @@ export default function FormCell({
|
|
|
14
14
|
children,
|
|
15
15
|
multiCell,
|
|
16
16
|
requiredFlag,
|
|
17
|
-
size
|
|
17
|
+
size,
|
|
18
18
|
}: PropsType) {
|
|
19
19
|
const platform = usePlatform();
|
|
20
20
|
const isFlex = layout !== 'vertical';
|
|
21
21
|
|
|
22
|
-
if(platform === 'pc') {
|
|
23
|
-
return (
|
|
22
|
+
if (platform === 'pc') {
|
|
23
|
+
return (
|
|
24
24
|
<ConfigProvider classPrefix="wedatea2td">
|
|
25
25
|
<TeaForm.Item
|
|
26
26
|
style={style}
|
|
@@ -31,9 +31,14 @@ export default function FormCell({
|
|
|
31
31
|
'weda-formcells__pc': !!label,
|
|
32
32
|
'weda-formcells__full-width': size === 'full',
|
|
33
33
|
[layout]: layout,
|
|
34
|
-
[className]: [className]
|
|
34
|
+
[className]: [className],
|
|
35
35
|
})}
|
|
36
|
-
label={
|
|
36
|
+
label={
|
|
37
|
+
<>
|
|
38
|
+
{requiredFlag && <span className="weda-formcells__flag">*</span>}
|
|
39
|
+
{label}
|
|
40
|
+
</>
|
|
41
|
+
}
|
|
37
42
|
>
|
|
38
43
|
{children}
|
|
39
44
|
</TeaForm.Item>
|
|
@@ -63,6 +63,12 @@ export default function Radio({
|
|
|
63
63
|
}
|
|
64
64
|
}, []);
|
|
65
65
|
|
|
66
|
+
useEffect(() => {
|
|
67
|
+
if (format !== 'x-enum') {
|
|
68
|
+
setOption(range)
|
|
69
|
+
}
|
|
70
|
+
}, [range]);
|
|
71
|
+
|
|
66
72
|
const fetchData = async (param:
|
|
67
73
|
{ OptNameList?: object, PageIndex?: number, PageSize?: number }
|
|
68
74
|
) => {
|
|
@@ -3,31 +3,12 @@ import weui from '../../../utils/weui';
|
|
|
3
3
|
import classNames from '../../../utils/classnames';
|
|
4
4
|
import isObjectEqual from '../../../utils/isObjectEqual';
|
|
5
5
|
import { regionPicker,getRegionTree,getAreaCode } from './region/index';
|
|
6
|
-
import { PropsType } from './index';
|
|
7
|
-
import { defaultProps } from './index';
|
|
6
|
+
import { PropsType , defaultProps , moment } from './index';
|
|
8
7
|
import { timePicker, yearPicker, monthPicker } from './time';
|
|
9
|
-
import { moment } from './index';
|
|
10
8
|
import { callDataSource, callWedaApi } from '../../../utils/tcb';
|
|
11
9
|
import destr from 'destr';
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const REL_DICT = {
|
|
17
|
-
equal: 'eq', // 等于
|
|
18
|
-
unequal: 'neq', // 不等于
|
|
19
|
-
include: 'search', // 包含
|
|
20
|
-
exclude: '_exclude', // 不包含
|
|
21
|
-
begin_with: '_begin_with', // 开头是
|
|
22
|
-
greater: 'gt', // 大于
|
|
23
|
-
greater_or_equal: 'gte', // 大于等于
|
|
24
|
-
bigger_or_equal: 'gte', //大于等于
|
|
25
|
-
less: 'lt', // 小于
|
|
26
|
-
less_or_equal: 'lte', // 小于等于
|
|
27
|
-
in: 'in', // 多选值
|
|
28
|
-
not_in: 'nin', // 不在多选值
|
|
29
|
-
};
|
|
30
|
-
|
|
10
|
+
import { REL_DICT } from '../../../utils/constant';
|
|
11
|
+
import { isNil } from '../../../utils/lodash';
|
|
31
12
|
|
|
32
13
|
export default function Select({
|
|
33
14
|
// 系统属性
|
|
@@ -322,7 +303,7 @@ export default function Select({
|
|
|
322
303
|
},
|
|
323
304
|
});
|
|
324
305
|
};
|
|
325
|
-
|
|
306
|
+
|
|
326
307
|
const getWhereList = (where) => {
|
|
327
308
|
let result = [];
|
|
328
309
|
Array.isArray(where) &&
|
|
@@ -338,7 +319,7 @@ export default function Select({
|
|
|
338
319
|
rel = 'regex';
|
|
339
320
|
val = `^((?!${val}).)*$`;
|
|
340
321
|
}
|
|
341
|
-
if (item2?.logic !== 'or' && item2?.key && rel && !
|
|
322
|
+
if (item2?.logic !== 'or' && item2?.key && rel && !isNil(val)) {
|
|
342
323
|
result.push({ key: item2.key, rel, val });
|
|
343
324
|
}
|
|
344
325
|
});
|
|
@@ -13,26 +13,13 @@ import {
|
|
|
13
13
|
import isObjectEqual from '../../../utils/isObjectEqual';
|
|
14
14
|
import { getRegionTree,getAreaCode } from './region';
|
|
15
15
|
import { renderDecorator } from '../renderDecorator';
|
|
16
|
-
import { CommonFormPropsType } from '../types';
|
|
16
|
+
import type { CommonFormPropsType } from '../types';
|
|
17
17
|
import YearPicker from './year';
|
|
18
18
|
import { callDataSource, callWedaApi } from '../../../utils/tcb';
|
|
19
19
|
import destr from 'destr';
|
|
20
|
+
import { REL_DICT } from '../../../utils/constant';
|
|
21
|
+
import { isNil } from '../../../utils/lodash';
|
|
20
22
|
|
|
21
|
-
const REL_DICT = {
|
|
22
|
-
equal: 'eq', // 等于
|
|
23
|
-
unequal: 'neq', // 不等于
|
|
24
|
-
include: 'search', // 包含
|
|
25
|
-
exclude: '_exclude', // 不包含
|
|
26
|
-
begin_with: '_begin_with', // 开头是
|
|
27
|
-
greater: 'gt', // 大于
|
|
28
|
-
greater_or_equal: 'gte', // 大于等于
|
|
29
|
-
bigger_or_equal: 'gte', //大于等于
|
|
30
|
-
less: 'lt', // 小于
|
|
31
|
-
less_or_equal: 'lte', // 小于等于
|
|
32
|
-
in: 'in', // 多选值
|
|
33
|
-
not_in: 'nin', // 不在多选值
|
|
34
|
-
};
|
|
35
|
-
const isNull = (val) => [undefined, null].includes(val);
|
|
36
23
|
const getWhereList = (where) => {
|
|
37
24
|
let result = [];
|
|
38
25
|
Array.isArray(where) &&
|
|
@@ -48,7 +35,7 @@ const getWhereList = (where) => {
|
|
|
48
35
|
rel = 'regex';
|
|
49
36
|
val = `^((?!${val}).)*$`;
|
|
50
37
|
}
|
|
51
|
-
if (item2?.logic !== 'or' && item2?.key && rel && !
|
|
38
|
+
if (item2?.logic !== 'or' && item2?.key && rel && !isNil(val)) {
|
|
52
39
|
result.push({ key: item2.key, rel, val });
|
|
53
40
|
}
|
|
54
41
|
});
|
|
@@ -2,6 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
|
|
3
3
|
import classNames from '../../../utils/classnames';
|
|
4
4
|
import { CommonPropsType } from '../../../types';
|
|
5
|
+
import './index.css';
|
|
5
6
|
|
|
6
7
|
export default function Tips({
|
|
7
8
|
// 系统属性
|
|
@@ -10,7 +11,7 @@ export default function Tips({
|
|
|
10
11
|
tips = '表单提示',
|
|
11
12
|
type = 'normal',
|
|
12
13
|
id,
|
|
13
|
-
style
|
|
14
|
+
style,
|
|
14
15
|
}: PropsType) {
|
|
15
16
|
const cls = classNames({
|
|
16
17
|
'weda-ui': true,
|
|
@@ -21,7 +22,7 @@ export default function Tips({
|
|
|
21
22
|
});
|
|
22
23
|
|
|
23
24
|
return (
|
|
24
|
-
<div className={cls} id={id} style={style}
|
|
25
|
+
<div className={cls} id={id} style={style}>
|
|
25
26
|
{tips}
|
|
26
27
|
</div>
|
|
27
28
|
);
|
|
@@ -30,4 +31,4 @@ export default function Tips({
|
|
|
30
31
|
export interface PropsType extends CommonPropsType {
|
|
31
32
|
tips?: string;
|
|
32
33
|
type?: 'warn' | 'normal';
|
|
33
|
-
}
|
|
34
|
+
}
|
|
@@ -11,24 +11,11 @@ import { isInIde } from '../../utils/platform';
|
|
|
11
11
|
import classNames from '../../utils/classnames';
|
|
12
12
|
import isequal from 'lodash.isequal';
|
|
13
13
|
import './index.css';
|
|
14
|
+
import { REL_DICT } from '../../utils/constant';
|
|
15
|
+
import { isNil } from '../../utils/lodash';
|
|
14
16
|
|
|
15
|
-
const REL_DICT = {
|
|
16
|
-
equal: 'eq', // 等于
|
|
17
|
-
unequal: 'neq', // 不等于
|
|
18
|
-
include: 'search', // 包含
|
|
19
|
-
exclude: '_exclude', // 不包含
|
|
20
|
-
begin_with: '_begin_with', // 开头是
|
|
21
|
-
greater: 'gt', // 大于
|
|
22
|
-
greater_or_equal: 'gte', // 大于等于
|
|
23
|
-
bigger_or_equal: 'gte', //大于等于
|
|
24
|
-
less: 'lt', // 小于
|
|
25
|
-
less_or_equal: 'lte', // 小于等于
|
|
26
|
-
in: 'in', // 多选值
|
|
27
|
-
not_in: 'nin', // 不在多选值
|
|
28
|
-
};
|
|
29
17
|
const ORDERTYPE = ['asc', 'desc'];
|
|
30
18
|
const BLOCK_NAME = 'weda-list-view';
|
|
31
|
-
const isNull = (val) => [undefined, null].includes(val);
|
|
32
19
|
const getIdeMockData = (length = 3) => Array.from({ length }).map((d) => ({}));
|
|
33
20
|
const getWhereList = (where) => {
|
|
34
21
|
let result = [];
|
|
@@ -45,7 +32,7 @@ const getWhereList = (where) => {
|
|
|
45
32
|
rel = 'regex';
|
|
46
33
|
val = `^((?!${val}).)*$`;
|
|
47
34
|
}
|
|
48
|
-
if (item2?.logic !== 'or' && item2?.key && rel && !
|
|
35
|
+
if (item2?.logic !== 'or' && item2?.key && rel && !isNil(val)) {
|
|
49
36
|
result.push({ key: item2.key, rel, val });
|
|
50
37
|
}
|
|
51
38
|
});
|
|
@@ -185,7 +172,7 @@ export default function ListView(props: IListView) {
|
|
|
185
172
|
const { orderBy, orderType, pageNo, pageSize, where } = params || {};
|
|
186
173
|
const tcbParams = {};
|
|
187
174
|
// tcb分页参数
|
|
188
|
-
if (!
|
|
175
|
+
if (!isNil(pageNo) && !isNil(pageSize)) {
|
|
189
176
|
tcbParams['pageNo'] = pageNo;
|
|
190
177
|
tcbParams['pageSize'] = pageSize;
|
|
191
178
|
}
|