@cloudbase/weda-ui 1.0.21 → 2.0.9

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 (170) hide show
  1. package/package.json +6 -4
  2. package/src/configs/components/button.json +0 -2
  3. package/src/configs/components/calendar.json +5 -2
  4. package/src/configs/components/carousel.json +18 -9
  5. package/src/configs/components/chart/bar.json +12 -6
  6. package/src/configs/components/chart/line.json +8 -4
  7. package/src/configs/components/chart/pie.json +8 -4
  8. package/src/configs/components/dataView.json +11 -6
  9. package/src/configs/components/form/radio.json +27 -0
  10. package/src/configs/components/form/select.json +2 -2
  11. package/src/configs/components/graphicCard.json +6 -2
  12. package/src/configs/components/image.json +12 -6
  13. package/src/configs/components/link.json +6 -3
  14. package/src/configs/components/listView.json +21 -11
  15. package/src/configs/components/lottery.json +153 -0
  16. package/src/configs/components/navLayout.json +12 -6
  17. package/src/configs/components/richtextview.json +2 -1
  18. package/src/configs/components/scrollVeiw.json +24 -12
  19. package/src/configs/components/swiper.json +18 -9
  20. package/src/configs/components/tabs.json +4 -2
  21. package/src/configs/components/text.json +10 -5
  22. package/src/configs/index.js +2 -0
  23. package/src/docs/common/format.tsx +112 -0
  24. package/src/docs/common/tableView.css +164 -0
  25. package/src/docs/common/tableView.tsx +273 -0
  26. package/src/docs/compsdocs/chart/Bar.mdx +159 -0
  27. package/src/docs/compsdocs/chart/Line.mdx +100 -0
  28. package/src/docs/compsdocs/chart/Pie.mdx +83 -0
  29. package/src/docs/compsdocs/chart/_category_.json +1 -0
  30. package/src/docs/compsdocs/chart/statisticsCard.mdx +51 -0
  31. package/src/docs/compsdocs/database/DataView.mdx +33 -0
  32. package/src/docs/compsdocs/database/ListView.mdx +33 -0
  33. package/src/docs/compsdocs/database/_category_.json +1 -0
  34. package/src/docs/compsdocs/form/Form.mdx +35 -0
  35. package/src/docs/compsdocs/form/FormCheckbox.mdx +35 -0
  36. package/src/docs/compsdocs/form/FormDate.mdx +30 -0
  37. package/src/docs/compsdocs/form/FormEmail.mdx +30 -0
  38. package/src/docs/compsdocs/form/FormImageUploader.mdx +31 -0
  39. package/src/docs/compsdocs/form/FormInput.mdx +30 -0
  40. package/src/docs/compsdocs/form/FormLocation.mdx +64 -0
  41. package/src/docs/compsdocs/form/FormPhone.mdx +30 -0
  42. package/src/docs/compsdocs/form/FormRadio.mdx +35 -0
  43. package/src/docs/compsdocs/form/FormRegion.mdx +30 -0
  44. package/src/docs/compsdocs/form/FormSelect.mdx +36 -0
  45. package/src/docs/compsdocs/form/FormSwitch.mdx +30 -0
  46. package/src/docs/compsdocs/form/FormTextarea.mdx +30 -0
  47. package/src/docs/compsdocs/form/FormTime.mdx +30 -0
  48. package/src/docs/compsdocs/form/FormUploadFile.mdx +30 -0
  49. package/src/docs/compsdocs/form/FormUrl.mdx +30 -0
  50. package/src/docs/compsdocs/form/_category_.json +1 -0
  51. package/src/docs/compsdocs/grid/Card.mdx +32 -0
  52. package/src/docs/compsdocs/grid/Container.mdx +42 -0
  53. package/src/docs/compsdocs/grid/Footer.mdx +31 -0
  54. package/src/docs/compsdocs/grid/GridLayout.mdx +32 -0
  55. package/src/docs/compsdocs/grid/Header.mdx +31 -0
  56. package/src/docs/compsdocs/grid/Layout.mdx +25 -0
  57. package/src/docs/compsdocs/grid/List.mdx +31 -0
  58. package/src/docs/compsdocs/grid/ScrollView.mdx +37 -0
  59. package/src/docs/compsdocs/grid/Swiper.mdx +58 -0
  60. package/src/docs/compsdocs/grid/_category_.json +1 -0
  61. package/src/docs/compsdocs/media/Icon.mdx +31 -0
  62. package/src/docs/compsdocs/media/Image.mdx +55 -0
  63. package/src/docs/compsdocs/media/_category_.json +1 -0
  64. package/src/docs/compsdocs/model/ModelCreate.mdx +20 -0
  65. package/src/docs/compsdocs/model/ModelDetail.mdx +20 -0
  66. package/src/docs/compsdocs/model/ModelTable.mdx +24 -0
  67. package/src/docs/compsdocs/model/ModelUpdate.mdx +21 -0
  68. package/src/docs/compsdocs/model/PageLayout.mdx +21 -0
  69. package/src/docs/compsdocs/model/_category_.json +1 -0
  70. package/src/docs/compsdocs/navmenu/Classification.mdx +38 -0
  71. package/src/docs/compsdocs/navmenu/NavBar.mdx +43 -0
  72. package/src/docs/compsdocs/navmenu/NavLayout.mdx +30 -0
  73. package/src/docs/compsdocs/navmenu/TabBar.mdx +43 -0
  74. package/src/docs/compsdocs/navmenu/TabBarItem.mdx +29 -0
  75. package/src/docs/compsdocs/navmenu/_category_.json +1 -0
  76. package/src/docs/compsdocs/senior/Lottery.mdx +48 -0
  77. package/src/docs/compsdocs/senior/Modal.mdx +58 -0
  78. package/src/docs/compsdocs/senior/SlotMachine.mdx +52 -0
  79. package/src/docs/compsdocs/senior/_category_.json +1 -0
  80. package/src/docs/compsdocs/show/Calendar.mdx +29 -0
  81. package/src/docs/compsdocs/show/Divider.mdx +31 -0
  82. package/src/docs/compsdocs/show/GraphicCard.mdx +30 -0
  83. package/src/docs/compsdocs/show/Item.mdx +32 -0
  84. package/src/docs/compsdocs/show/ItemList.mdx +47 -0
  85. package/src/docs/compsdocs/show/Media.mdx +25 -0
  86. package/src/docs/compsdocs/show/StatusTip.mdx +25 -0
  87. package/src/docs/compsdocs/show/Swiper.mdx +33 -0
  88. package/src/docs/compsdocs/show/Tabs.mdx +38 -0
  89. package/src/docs/compsdocs/show/_category_.json +1 -0
  90. package/src/docs/compsdocs/show/button.mdx +25 -0
  91. package/src/docs/compsdocs/text/Link.mdx +43 -0
  92. package/src/docs/compsdocs/text/RichTextView.mdx +36 -0
  93. package/src/docs/compsdocs/text/Text.mdx +31 -0
  94. package/src/docs/compsdocs/text/Title.mdx +32 -0
  95. package/src/docs/compsdocs/text/_category_.json +1 -0
  96. package/src/docs/compsdocs/wxOpen/Phone.mdx +60 -0
  97. package/src/docs/compsdocs/wxOpen/Share.mdx +46 -0
  98. package/src/docs/compsdocs/wxOpen/UserInfo.mdx +60 -0
  99. package/src/docs/compsdocs/wxOpen/_category_.json +4 -0
  100. package/src/index.js +2 -0
  101. package/src/mp/components/button/index.js +18 -2
  102. package/src/mp/components/button/index.wxml +7 -4
  103. package/src/mp/components/form/form/index.wxml +1 -2
  104. package/src/mp/components/form/formcell/index.wxml +1 -1
  105. package/src/mp/components/form/formcell/index.wxss +17 -0
  106. package/src/mp/components/form/input/index.wxss +15 -0
  107. package/src/mp/components/form/location/index.wxss +4 -6
  108. package/src/mp/components/form/select/index.js +13 -23
  109. package/src/mp/components/form/select/index.wxss +4 -0
  110. package/src/mp/components/form/select/region/index.js +6 -3
  111. package/src/mp/components/form/textarea/index.js +1 -1
  112. package/src/mp/components/form/textarea/index.wxss +4 -0
  113. package/src/mp/components/form/uploader/index.json +3 -2
  114. package/src/mp/components/form/uploader/index.wxml +11 -7
  115. package/src/mp/components/form/uploader/index.wxss +20 -2
  116. package/src/mp/components/form/uploader/weui-uploader.js +209 -0
  117. package/src/mp/components/form/uploader/weui-uploader.json +7 -0
  118. package/src/mp/components/form/uploader/weui-uploader.wxml +45 -0
  119. package/src/mp/components/form/uploader/weui-uploader.wxss +1 -0
  120. package/src/mp/components/form/uploaderFile/index.wxss +4 -4
  121. package/src/mp/components/image/index.wxss +3 -2
  122. package/src/mp/components/listView/index.js +5 -16
  123. package/src/mp/components/lottery/index.js +270 -0
  124. package/src/mp/components/lottery/index.json +4 -0
  125. package/src/mp/components/lottery/index.wxml +43 -0
  126. package/src/mp/components/lottery/index.wxss +317 -0
  127. package/src/mp/components/wxOpenApi/phone/index.js +1 -1
  128. package/src/mp/index.json +4 -3
  129. package/src/mp/style/weda-ui.wxss +14 -0
  130. package/src/mp/utils/constant.js +15 -0
  131. package/src/mp/utils/lodash.js +2 -0
  132. package/src/web/components/button/index.tsx +7 -7
  133. package/src/web/components/calendar/index.jsx +1 -1
  134. package/src/web/components/carousel/index.tsx +8 -8
  135. package/src/web/components/chart/common/config/line.js +1 -1
  136. package/src/web/components/form/checkbox/index.tsx +6 -0
  137. package/src/web/components/form/form/index.css +5 -1
  138. package/src/web/components/form/form/index.tsx +3 -1
  139. package/src/web/components/form/formcell/index.css +22 -1
  140. package/src/web/components/form/formcell/index.tsx +11 -6
  141. package/src/web/components/form/input/index.css +7 -12
  142. package/src/web/components/form/location/components/LocationH5/index.css +4 -7
  143. package/src/web/components/form/location/components/LocationH5/location.h5.jsx +1 -1
  144. package/src/web/components/form/radio/index.tsx +6 -0
  145. package/src/web/components/form/select/h5.tsx +5 -24
  146. package/src/web/components/form/select/index.css +11 -0
  147. package/src/web/components/form/select/index.tsx +4 -17
  148. package/src/web/components/form/textarea/index.css +4 -0
  149. package/src/web/components/form/textarea/index.tsx +2 -2
  150. package/src/web/components/form/tips/index.css +4 -0
  151. package/src/web/components/form/tips/index.tsx +4 -3
  152. package/src/web/components/form/uploader/index.css +26 -2
  153. package/src/web/components/form/uploader/uploader.h5.tsx +81 -56
  154. package/src/web/components/form/uploaderFile/index.css +2 -4
  155. package/src/web/components/image/index.css +5 -5
  156. package/src/web/components/image/index.tsx +6 -7
  157. package/src/web/components/index.js +1 -0
  158. package/src/web/components/link/index.tsx +2 -2
  159. package/src/web/components/listView/index.tsx +6 -19
  160. package/src/web/components/lottery/index.css +327 -0
  161. package/src/web/components/lottery/index.tsx +567 -0
  162. package/src/web/components/lottery/lotteryUtil.ts +130 -0
  163. package/src/web/components/navLayout/index.tsx +2 -2
  164. package/src/web/components/navigationBar/index.tsx +0 -1
  165. package/src/web/components/picker/timePicker.tsx +2 -2
  166. package/src/web/components/slot/index.tsx +1 -1
  167. package/src/web/components/text/index.tsx +6 -6
  168. package/src/web/utils/{constant.js → constant.ts} +17 -2
  169. package/src/web/utils/lodash.ts +2 -0
  170. package/src/web/weda-ui.css +5 -1
@@ -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
- "PhoneCode": "components/wxOpenApi/phoneCode/index",
44
- "Share": "components/wxOpenApi/share/index"
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
+ }
@@ -40,3 +40,17 @@ page .weda-ui {
40
40
  .weda-ui.weda-picker .weui-btn_primary:not(.weui-btn_disabled):active {
41
41
  background-color: var(--weui-TAG-TEXT-BLUE);
42
42
  }
43
+
44
+ .weda-ui .weui-cell {
45
+ font-size: 16px; /* 修改默认weui的17为16 */
46
+ }
47
+
48
+ .weui-cells__group_form .weui-cell::before, .weui-cells__group_form .weui-cells::before {
49
+ left: 16px;
50
+ right: 16px;
51
+ }
52
+
53
+ .weui-cells__group_form .weui-cells::after {
54
+ left: 16px;
55
+ right: 16px;
56
+ }
@@ -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
+ };
@@ -0,0 +1,2 @@
1
+ // https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L11973
2
+ export const isNil = (val) => val == null;
@@ -8,13 +8,13 @@ import './index.css';
8
8
 
9
9
  // 不用 react-weui 而直接用底层实现的原因是 react-weui 不能支持表单类型
10
10
  const Button = ({
11
- text = '按钮',
12
- size = 'default',
13
- type = 'primary',
11
+ text,
12
+ size,
13
+ type,
14
14
  contentSlot,
15
15
  formType,
16
- loading = false,
17
- disabled = false,
16
+ loading,
17
+ disabled,
18
18
  events = ({} as Record<string, unknownFunction>),
19
19
  className,
20
20
  style,
@@ -61,7 +61,7 @@ const Button = ({
61
61
  return (
62
62
  <ConfigProvider classPrefix="wedatea2td">
63
63
  <TeaButton
64
- loading={loading}
64
+ loading={loading}
65
65
  onClick={onClick}
66
66
  disabled={disabled}
67
67
  htmlType={formType}
@@ -112,4 +112,4 @@ export interface PropsType extends CommonPropsType {
112
112
  contentSlot?: string;
113
113
  }
114
114
 
115
- export default Button;
115
+ export default Button;
@@ -19,7 +19,7 @@ const isShowWeekend = true; // 是否显示周末
19
19
  export default function Calendar({
20
20
  className,
21
21
  style,
22
- initVisible = true,
22
+ initVisible,
23
23
  initValue,
24
24
  configData = [],
25
25
  }) {
@@ -50,15 +50,15 @@ export interface PropsType extends CommonPropsType {
50
50
  export default function Carousel({
51
51
  className,
52
52
  style = {},
53
- autoplay = true,
54
- circular = true,
55
- vertical = false,
53
+ autoplay,
54
+ circular,
55
+ vertical,
56
56
  indicatorDots,
57
- indicatorColor = 'rgba(200, 200, 200, 0.9)',
58
- indicatorActiveColor = 'rgba(0, 0, 0, 0.9)',
59
- duration = 500,
60
- interval = 5000,
61
- current = 0,
57
+ indicatorColor,
58
+ indicatorActiveColor,
59
+ duration,
60
+ interval,
61
+ current,
62
62
  events = {},
63
63
  id,
64
64
  images,
@@ -47,4 +47,4 @@ const getConfig = () => {
47
47
  return lineH5;
48
48
  };
49
49
 
50
- module.exports = getConfig;
50
+ export default getConfig;
@@ -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
  ) => {
@@ -5,4 +5,8 @@
5
5
  .wedatea2td-form > .gsd-h5-react-formitem,
6
6
  .wedatea2td-form > div > .gsd-h5-react-formitem {
7
7
  padding-left: 32px;
8
- }
8
+ }
9
+
10
+ .weda-ui.weda-form-pc, .weda-ui.gsd-h5-react-form-pc {
11
+ padding-left: 24px;
12
+ }
@@ -22,6 +22,8 @@ export default function Form({
22
22
  'weda-ui': true,
23
23
  'weda-form': true,
24
24
  'weui-form': platform === 'h5',
25
+ 'weda-form-pc': platform === 'pc',
26
+ 'gsd-h5-react-form-pc': platform === 'pc',
25
27
  [className]: className,
26
28
  });
27
29
  if(platform === 'pc') {
@@ -45,4 +47,4 @@ export default function Form({
45
47
 
46
48
  export interface PropsType extends CommonFormPropsType {
47
49
  contentSlot?: any;
48
- }
50
+ }
@@ -4,7 +4,28 @@
4
4
  font-family: SimSun;
5
5
  font-size: 12px;
6
6
  color: #f60;
7
+ align-self: flex-start;
7
8
  }
9
+
10
+ .weda-ui .weui-cells__group_form .weui-cells {
11
+ margin: 0;
12
+ }
13
+ .weda-formcells.weui-flex .weda-formcells__label {
14
+ width: 130px;
15
+ }
16
+ .weui-cells__group_form .weui-cell {
17
+ padding: 16px 16px;
18
+ }
19
+
20
+ .weda-formcells__content.weui-flex__item .weui-cell_form {
21
+ padding: 0;
22
+ }
23
+
24
+ .weda-formcells__content.weui-flex__item .weui-cell_form {
25
+ padding-right: 16px;
26
+ }
27
+
28
+
8
29
  /* formcell 在 form container 外部兼容 and 独立 layout 适配 */
9
30
 
10
31
  .weda-formcells__pc.vertical .wedatea2td-form__controls,
@@ -68,4 +89,4 @@
68
89
  /*formcell end*/
69
90
 
70
91
 
71
- /* formcell 在 form container 外部兼容 */
92
+ /* formcell 在 form container 外部兼容 */
@@ -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={label}
36
+ label={
37
+ <>
38
+ {label}
39
+ {requiredFlag && <span className="weda-formcells__flag">*</span>}
40
+ </>
41
+ }
37
42
  >
38
43
  {children}
39
44
  </TeaForm.Item>
@@ -59,10 +64,10 @@ export default function FormCell({
59
64
  'weui-cell': true,
60
65
  })}
61
66
  >
67
+ <label>{label}</label>
62
68
  {requiredFlag ? (
63
69
  <label className="weda-formcells__flag">*</label>
64
70
  ) : null}
65
- <label>{label}</label>
66
71
  </div>
67
72
  ) : null}
68
73
  <div
@@ -7,22 +7,17 @@
7
7
  /*
8
8
  把weui-cell 的padding还回到input
9
9
  */
10
- .weda-ui.weda-input input.weui-input {
11
- padding: 28px 16px;
10
+ .weda-ui input.weui-input {
11
+ padding: 28px 0;
12
12
  }
13
13
 
14
- .weda-ui.weda-input .weui-cell.weda-formcells__label {
15
- padding: 16px;
16
- }
17
- .weda-ui.weda-input .weda-formcells__label.weui-cell label {
18
- padding: 0;
19
- }
20
- .weda-ui.weda-input .weui-cell {
14
+ .weda-ui.weda-input .weui-flex__item .weui-cell_form {
21
15
  padding: 0;
16
+ padding-right: 16px;
22
17
  }
23
18
 
24
- .weda-ui.weda-input .weui-btn_input-clear {
25
- padding-right: 16px;
19
+ .weda-ui.weda-input .weui-cell_form {
20
+ padding: 0 16px;
26
21
  }
27
22
 
28
23
  /**
@@ -38,4 +33,4 @@
38
33
  }
39
34
  /**
40
35
  * END
41
- */
36
+ */
@@ -1,7 +1,3 @@
1
- .weda-ui_form-location {
2
- padding: 1.14286rem 0;
3
- }
4
-
5
1
  .form-location-warp {
6
2
  display: flex;
7
3
  white-space: nowrap;
@@ -10,7 +6,9 @@
10
6
  .form-location-label {
11
7
  display: flex;
12
8
  align-items: center;
13
- padding: 0 1.14286rem;
9
+ padding: 16px;
10
+ width: 130px;
11
+
14
12
  }
15
13
  .form-location-label > span {
16
14
  margin-right: 0.28571rem;
@@ -19,8 +17,7 @@
19
17
  color: #f60;
20
18
  }
21
19
 
22
- .form-location-con {
23
- padding-left: 1.14286rem;
20
+ .weda-ui .form-location-con {
24
21
  display: flex;
25
22
  align-items: center;
26
23
  }
@@ -329,8 +329,8 @@ export default function LocationH5(props) {
329
329
  <div className="form-location-warp">
330
330
  {labelVisible && (
331
331
  <div className="form-location-label">
332
- {requiredFlag && <span>*</span>}
333
332
  {label}
333
+ {requiredFlag && <span>*</span>}
334
334
  </div>
335
335
  )}
336
336
  <div className="form-location-con">
@@ -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
  ) => {