@cloudbase/weda-ui 3.12.2 → 3.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/configs/components/listView.js +13 -26
  2. package/dist/configs/components/wd-ad.d.ts +3 -0
  3. package/dist/configs/components/wd-ad.js +3 -3
  4. package/dist/configs/components/wd-select-multiple.d.ts +2 -0
  5. package/dist/configs/components/wd-select-multiple.js +9 -7
  6. package/dist/configs/components/wd-select.d.ts +2 -0
  7. package/dist/configs/components/wd-select.js +9 -7
  8. package/dist/configs/components/wd-side-tab.js +16 -1
  9. package/dist/configs/components/wd-store-home.d.ts +36 -0
  10. package/dist/configs/components/wd-store-home.js +38 -0
  11. package/dist/configs/components/wd-store-product.d.ts +106 -0
  12. package/dist/configs/components/wd-store-product.js +102 -0
  13. package/dist/configs/components/wd-table.js +1 -1
  14. package/dist/configs/index.d.ts +214 -0
  15. package/dist/configs/index.js +4 -0
  16. package/dist/style/weda-ui.min.css +52 -2
  17. package/dist/web/components/flow/process/constants.d.ts +3 -3
  18. package/dist/web/components/form/uploaderFile/index.css +23 -71
  19. package/dist/web/components/index.d.ts +2 -0
  20. package/dist/web/components/index.js +2 -0
  21. package/dist/web/components/wd-ad/style/view.css +1 -1
  22. package/dist/web/components/wd-icon/wd-icon.d.ts +1 -0
  23. package/dist/web/components/wd-icon/wd-icon.js +4 -9
  24. package/dist/web/components/wd-select/relationSelect/relationSelect.js +14 -10
  25. package/dist/web/components/wd-select/select/selectUI.js +11 -12
  26. package/dist/web/components/wd-select/wd-select.js +3 -3
  27. package/dist/web/components/wd-select-multiple/wd-select-multiple.js +3 -3
  28. package/dist/web/components/wd-store-home/index.css +81 -0
  29. package/dist/web/components/wd-store-home/index.d.ts +8 -0
  30. package/dist/web/components/wd-store-home/index.js +6 -0
  31. package/dist/web/components/wd-store-home/style.d.ts +2 -0
  32. package/dist/web/components/wd-store-home/style.js +2 -0
  33. package/dist/web/components/wd-store-product/index.d.ts +8 -0
  34. package/dist/web/components/wd-store-product/index.js +7 -0
  35. package/dist/web/components/wd-store-product/style.d.ts +2 -0
  36. package/dist/web/components/wd-store-product/style.js +2 -0
  37. package/dist/web/components/wd-table/hooks/useChooseList.d.ts +1 -1
  38. package/dist/web/components/wd-table/hooks/useChooseList.js +5 -4
  39. package/dist/web/components/wd-tabs/util.js +2 -4
  40. package/dist/web/utils/loadIconCss.d.ts +2 -1
  41. package/dist/web/utils/loadIconCss.js +33 -0
  42. package/package.json +3 -3
@@ -88,11 +88,11 @@ declare const OPERATION_NODE_STATUS: readonly [{
88
88
  /** 操作节点状态相关映射关系转换 */
89
89
  declare const
90
90
  /** 状态码-状态名称映射 */
91
- CODE_NAME_MAPPING: Record<number, "stop" | "drop" | "end" | "start" | "down" | "pending" | "revoke" | "cc" | "pass" | "turn" | "trans" | "countersign" | "skip_pass" | "skip_down" | "handled" | "handling" | "delete_draft">,
91
+ CODE_NAME_MAPPING: Record<number, "drop" | "stop" | "end" | "start" | "down" | "pending" | "revoke" | "cc" | "pass" | "turn" | "trans" | "countersign" | "skip_pass" | "skip_down" | "handled" | "handling" | "delete_draft">,
92
92
  /** 状态名称-状态码映射 */
93
- NAME_CODE_MAPPING: Record<"CC" | "REVOKE" | "STOP" | "DROP" | "END" | "START" | "DOWN" | "PENDING" | "PASS" | "TURN" | "TRANS" | "COUNTERSIGN" | "SKIP_PASS" | "SKIP_DOWN" | "HANDLED" | "HANDLING" | "DELETE_DRAFT", number>,
93
+ NAME_CODE_MAPPING: Record<"CC" | "REVOKE" | "DROP" | "STOP" | "END" | "START" | "DOWN" | "PENDING" | "PASS" | "TURN" | "TRANS" | "COUNTERSIGN" | "SKIP_PASS" | "SKIP_DOWN" | "HANDLED" | "HANDLING" | "DELETE_DRAFT", number>,
94
94
  /** 状态名称映射 */
95
- NAME_MAPPING: Record<"CC" | "REVOKE" | "STOP" | "DROP" | "END" | "START" | "DOWN" | "PENDING" | "PASS" | "TURN" | "TRANS" | "COUNTERSIGN" | "SKIP_PASS" | "SKIP_DOWN" | "HANDLED" | "HANDLING" | "DELETE_DRAFT", "stop" | "drop" | "end" | "start" | "down" | "pending" | "revoke" | "cc" | "pass" | "turn" | "trans" | "countersign" | "skip_pass" | "skip_down" | "handled" | "handling" | "delete_draft">,
95
+ NAME_MAPPING: Record<"CC" | "REVOKE" | "DROP" | "STOP" | "END" | "START" | "DOWN" | "PENDING" | "PASS" | "TURN" | "TRANS" | "COUNTERSIGN" | "SKIP_PASS" | "SKIP_DOWN" | "HANDLED" | "HANDLING" | "DELETE_DRAFT", "drop" | "stop" | "end" | "start" | "down" | "pending" | "revoke" | "cc" | "pass" | "turn" | "trans" | "countersign" | "skip_pass" | "skip_down" | "handled" | "handling" | "delete_draft">,
96
96
  /** 状态名称-状态文本信息映射 */
97
97
  NAME_TEXT_MAPPING: Record<string, {
98
98
  theme: string;
@@ -122,15 +122,11 @@
122
122
  align-items: center;
123
123
  }
124
124
 
125
- .weda-upload-file-pc
126
- .weda-upload-file-pc--item-header
127
- .weda-upload-file-pc--item-label {
125
+ .weda-upload-file-pc .weda-upload-file-pc--item-header .weda-upload-file-pc--item-label {
128
126
  border-right: 1px solid #e7e7e7;
129
127
  }
130
128
 
131
- .weda-upload-file-pc
132
- .weda-upload-file-pc--item
133
- .weda-upload-file-pc--item-title {
129
+ .weda-upload-file-pc .weda-upload-file-pc--item .weda-upload-file-pc--item-title {
134
130
  width: 220px;
135
131
  padding: 10px 12px;
136
132
  overflow: hidden;
@@ -138,16 +134,12 @@
138
134
  white-space: nowrap;
139
135
  }
140
136
 
141
- .weda-upload-file-pc
142
- .weda-upload-file-pc--item
143
- .weda-upload-file-pc--item-size {
137
+ .weda-upload-file-pc .weda-upload-file-pc--item .weda-upload-file-pc--item-size {
144
138
  width: 100px;
145
139
  padding: 10px 12px;
146
140
  }
147
141
 
148
- .weda-upload-file-pc
149
- .weda-upload-file-pc--item
150
- .weda-upload-file-pc--item-status {
142
+ .weda-upload-file-pc .weda-upload-file-pc--item .weda-upload-file-pc--item-status {
151
143
  width: 150px;
152
144
  padding: 10px 12px;
153
145
  overflow: hidden;
@@ -155,25 +147,20 @@
155
147
  white-space: nowrap;
156
148
  }
157
149
 
158
- .weda-upload-file-pc
159
- .weda-upload-file-pc--item
160
- .weda-upload-file-pc--item-action {
150
+ .weda-upload-file-pc .weda-upload-file-pc--item .weda-upload-file-pc--item-action {
161
151
  width: 160px;
162
152
  padding: 10px 12px;
163
153
  }
164
154
 
165
155
  .weda-upload-file-pc .weda-upload-file-pc__btn--weak {
166
156
  border-color: #dcdcdc;
167
- width: 88px;
157
+ width: auto;
168
158
  font-weight: normal;
169
159
  color: var(--wd-color-text-default, rgba(0, 0, 0, 0.9));
170
160
  font: var(--wd-typography-body-md, 14px);
171
161
  }
172
162
 
173
- .weda-upload-file-pc
174
- .weda-upload-file-pc--item
175
- .weda-upload-file-pc--item-status
176
- .wedatea2td-icon {
163
+ .weda-upload-file-pc .weda-upload-file-pc--item .weda-upload-file-pc--item-status .wedatea2td-icon {
177
164
  margin-right: 8px;
178
165
  }
179
166
 
@@ -184,20 +171,14 @@
184
171
  background-image: url(data:image/svg+xml;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTRweCIgaGVpZ2h0PSIxNHB4IiB2aWV3Qm94PSIwIDAgMTQgMTQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8dGl0bGU+SWNvbjwvdGl0bGU+CiAgICA8ZyBpZD0i6aG16Z2iLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSJwYyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTY1MS4wMDAwMDAsIC0zOTQuMDAwMDAwKSI+CiAgICAgICAgICAgIDxnIGlkPSLkuIrkvKAv5om56YeP5LiK5Lyg5Lit5aSH5Lu9IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzNzIuMDAwMDAwLCAxNDcuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8ZyBpZD0i5YaF5a655YiXIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLjAwMDAwMCwgMTA3LjAwMDAwMCkiPgogICAgICAgICAgICAgICAgICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI1NC4wMDAwMDAsIDEyNi4wMDAwMDApIiBpZD0i57yW57uEIj4KICAgICAgICAgICAgICAgICAgICAgICAgPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjQuMDAwMDAwLCAxMy4wMDAwMDApIiBpZD0iMS5CYWNl5Z+656GALzMuSWNvbuWbvuaghy/mk43kvZwvbW92ZSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMCwwIEwxNiwwIEwxNiwxNiBMMCwxNiBMMCwwIFoiIGlkPSJ0aW1lLWZpbGxlZC0oQmFja2dyb3VuZCkiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0xNSw4IEMxNSw0LjEzNDAwNjc0IDExLjg2NTk5MzUsMSA4LDEgQzQuMTM0MDA2NzQsMSAxLDQuMTM0MDA2NzQgMSw4IEMxLDExLjg2NTk5MzUgNC4xMzQwMDY3NCwxNSA4LDE1IEMxMS44NjU5OTM1LDE1IDE1LDExLjg2NTk5MzUgMTUsOCBaIE03LjUsOC4zODg5MjQ2IEwxMC42NDY2OTA0LDExLjUzNTYxNTkgTDExLjM1Mzc5NzksMTAuODI4NTA4NCBMOC41LDcuOTc0NzExNDIgTDguNSw1IEw3LjUsNSBMNy41LDguMzg4OTI0NiBaIiBpZD0idGltZS1maWxsZWQiIGZpbGwtb3BhY2l0eT0iMC40IiBmaWxsPSIjMDAwMDAwIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg==);
185
172
  }
186
173
 
187
- .weda-upload-file-pc
188
- .weda-upload-file-pc--item
189
- .weda-upload-file-pc--item-action
190
- .wedatea2td-btn {
174
+ .weda-upload-file-pc .weda-upload-file-pc--item .weda-upload-file-pc--item-action .wedatea2td-btn {
191
175
  font-size: 0.875em;
192
176
  line-height: 1.375em;
193
177
  margin-right: 12px;
194
178
  color: var(--wd-color-brand, #0052d9);
195
179
  }
196
180
 
197
- .weda-upload-file-pc
198
- .weda-upload-file-pc--item
199
- .weda-upload-file-pc--item-action
200
- .wedatea2td-btn:last-child {
181
+ .weda-upload-file-pc .weda-upload-file-pc--item .weda-upload-file-pc--item-action .wedatea2td-btn:last-child {
201
182
  margin-right: 0;
202
183
  }
203
184
 
@@ -212,9 +193,7 @@
212
193
  border-radius: 0 0 2px 2px;
213
194
  }
214
195
 
215
- .weda-upload-file-pc
216
- .weda-upload-file-pc--item-empty
217
- .weda-upload-file-pc--item {
196
+ .weda-upload-file-pc .weda-upload-file-pc--item-empty .weda-upload-file-pc--item {
218
197
  line-height: 1.375em;
219
198
  color: var(--wd-color-text-placeholder, rgba(0, 0, 0, 0.4));
220
199
  font-size: var(--wd-font-size-3, 0.875em);
@@ -261,9 +240,7 @@
261
240
  font-size: var(--wd-font-size-2, 0.75em);
262
241
  }
263
242
 
264
- .weda-upload-file-mobile
265
- .weda-upload-file-mobile__bd
266
- .weda-uploader-files_split {
243
+ .weda-upload-file-mobile .weda-upload-file-mobile__bd .weda-uploader-files_split {
267
244
  height: 8px;
268
245
  width: 100%;
269
246
  background-color: #f6f6f6;
@@ -293,48 +270,34 @@
293
270
  margin-right: 16px;
294
271
  }
295
272
 
296
- .weda-upload-file-mobile
297
- .weda-upload-file-mobile__btn-group
298
- .wedatea2td-icon:last-child {
273
+ .weda-upload-file-mobile .weda-upload-file-mobile__btn-group .wedatea2td-icon:last-child {
299
274
  margin-right: 0;
300
275
  }
301
276
 
302
- .weda-upload-file-mobile
303
- .weda-upload-file-mobile__item
304
- .wedatea2td-icon.wedatea2td-icon-delete {
277
+ .weda-upload-file-mobile .weda-upload-file-mobile__item .wedatea2td-icon.wedatea2td-icon-delete {
305
278
  background-image: url('https://imgcache.qq.com/qcloud/tcloud_dtc/static/static_source_business/2372f6a8-2f6a-4f30-92bf-73c62a5c0ae7.svg');
306
279
  }
307
280
 
308
- .weda-upload-file-mobile
309
- .weda-upload-file-mobile__item
310
- .wedatea2td-icon.wedatea2td-icon-download {
281
+ .weda-upload-file-mobile .weda-upload-file-mobile__item .wedatea2td-icon.wedatea2td-icon-download {
311
282
  background-image: url('https://imgcache.qq.com/qcloud/tcloud_dtc/static/static_source_business/4cba5da1-cde4-40c6-a075-86eff22858a4.svg');
312
283
  }
313
284
 
314
- .weda-upload-file-mobile
315
- .weda-upload-file-mobile__item
316
- .wedatea2td-icon.wedatea2td-icon-refresh {
285
+ .weda-upload-file-mobile .weda-upload-file-mobile__item .wedatea2td-icon.wedatea2td-icon-refresh {
317
286
  background-image: url('https://imgcache.qq.com/qcloud/tcloud_dtc/static/static_source_business/af5486eb-65e0-4536-8e51-6c68a17b71ac.svg');
318
287
  }
319
288
 
320
- .weda-upload-file-mobile
321
- .weda-upload-file-mobile__item
322
- .weda-upload-file-mobile__item-left {
289
+ .weda-upload-file-mobile .weda-upload-file-mobile__item .weda-upload-file-mobile__item-left {
323
290
  flex: 1;
324
291
  margin-right: 4px;
325
292
  max-width: calc(100% - 75px);
326
293
  }
327
294
 
328
- .weda-upload-file-mobile
329
- .weda-upload-file-mobile__item
330
- .weda-upload-file-mobile__file-detail {
295
+ .weda-upload-file-mobile .weda-upload-file-mobile__item .weda-upload-file-mobile__file-detail {
331
296
  display: flex;
332
297
  align-items: center;
333
298
  }
334
299
 
335
- .weda-upload-file-mobile
336
- .weda-upload-file-mobile__item
337
- .weda-upload-file-mobile__file-name {
300
+ .weda-upload-file-mobile .weda-upload-file-mobile__item .weda-upload-file-mobile__file-name {
338
301
  font-size: 0.875em;
339
302
  line-height: 1.375em;
340
303
  color: rgba(0, 0, 0, 0.9);
@@ -344,9 +307,7 @@
344
307
  white-space: nowrap;
345
308
  }
346
309
 
347
- .weda-upload-file-mobile
348
- .weda-upload-file-mobile__item
349
- .weda-upload-file-mobile__file-status {
310
+ .weda-upload-file-mobile .weda-upload-file-mobile__item .weda-upload-file-mobile__file-status {
350
311
  margin-right: 0.28571rem;
351
312
  display: inline-block;
352
313
  white-space: nowrap;
@@ -354,10 +315,7 @@
354
315
  text-overflow: ellipsis;
355
316
  }
356
317
 
357
- .weda-upload-file-mobile
358
- .weda-upload-file-mobile__item
359
- .weda-upload-file-mobile__file-status
360
- .wedatea2td-icon {
318
+ .weda-upload-file-mobile .weda-upload-file-mobile__item .weda-upload-file-mobile__file-status .wedatea2td-icon {
361
319
  width: 16px;
362
320
  height: 16px;
363
321
  background-size: 100% 100%;
@@ -375,16 +333,12 @@
375
333
  .wedatea2td-icon.wedatea2td-icon-success {
376
334
  background-image: url(data:image/svg+xml;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNnB4IiB2aWV3Qm94PSIwIDAgMTQgMTQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8dGl0bGU+MS5CYWNl5Z+656GALzMuSWNvbuWbvuaghy/mk43kvZwvbW92ZTwvdGl0bGU+CiAgICA8ZyBpZD0i6aG16Z2iLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSLnlLvmnb8iIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMDQuMDAwMDAwLCAtMTIwLjAwMDAwMCkiPgogICAgICAgICAgICA8ZyBpZD0iMS5CYWNl5Z+656GALzMuSWNvbuWbvuaghy/mk43kvZwvbW92ZSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAzLjAwMDAwMCwgMTE5LjAwMDAwMCkiPgogICAgICAgICAgICAgICAgPHBhdGggZD0iTTAsMCBMMTYsMCBMMTYsMTYgTDAsMTYgTDAsMCBaIiBpZD0iY2hlY2stY2lyY2xlLWZpbGxlZC0oQmFja2dyb3VuZCkiPjwvcGF0aD4KICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0xNSw4IEMxNSw0LjEzNDAwNjc0IDExLjg2NTk5MzUsMSA4LDEgQzQuMTM0MDA2NzQsMSAxLDQuMTM0MDA2NzQgMSw4IEMxLDExLjg2NTk5MzUgNC4xMzQwMDY3NCwxNSA4LDE1IEMxMS44NjU5OTM1LDE1IDE1LDExLjg2NTk5MzUgMTUsOCBaIE03LDEwLjcwNjk5OTggTDExLjUsNi4yMDc0OTk5OCBMMTAuNzkyNDk5NSw1LjUgTDcsOS4yOTMwMDAyMiBMNS4yMDY1MDAwNSw3LjUgTDQuNSw4LjIwNjUwMDA1IEw3LDEwLjcwNjk5OTggWiIgaWQ9ImNoZWNrLWNpcmNsZS1maWxsZWQiIGZpbGw9IiMwMEE4NzAiPjwvcGF0aD4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+);
377
335
  }
378
- .weda-upload-file-mobile
379
- .weda-upload-file-mobile__item
380
- .weda-upload-file-mobile__file-status--msg {
336
+ .weda-upload-file-mobile .weda-upload-file-mobile__item .weda-upload-file-mobile__file-status--msg {
381
337
  width: 4.2rem;
382
338
  line-height: 1.25em;
383
339
  }
384
340
 
385
- .weda-upload-file-mobile
386
- .weda-upload-file-mobile__item
387
- .weda-upload-file-mobile__file-foot {
341
+ .weda-upload-file-mobile .weda-upload-file-mobile__item .weda-upload-file-mobile__file-foot {
388
342
  line-height: 1.25em;
389
343
  margin-top: 8px;
390
344
  display: flex;
@@ -392,9 +346,7 @@
392
346
  font-size: var(--wd-font-size-2, 0.75em);
393
347
  }
394
348
 
395
- .weda-upload-file-mobile
396
- .weda-upload-file-mobile__item
397
- .weda-upload-file-mobile__file-progress {
349
+ .weda-upload-file-mobile .weda-upload-file-mobile__item .weda-upload-file-mobile__file-progress {
398
350
  margin-top: 4px;
399
351
  border-radius: 0;
400
352
  background-color: #e7e7e7;
@@ -150,5 +150,7 @@ export { default as WdFormObj } from "./wd-form-obj";
150
150
  export { default as WdFormArr } from "./wd-form-arr";
151
151
  export { default as WdRating } from "./wd-rating";
152
152
  export { default as WdCascader } from "./wd-cascader";
153
+ export { default as WdStoreHome } from "./wd-store-home";
154
+ export { default as WdStoreProduct } from "./wd-store-product";
153
155
  export { default as FormDetail, default as WdFormDetail } from "./formdetail";
154
156
  export { default as WdTagSelect, WdTag } from "./wd-tag";
@@ -211,3 +211,5 @@ export { default as WdFormObj } from './wd-form-obj';
211
211
  export { default as WdFormArr } from './wd-form-arr';
212
212
  export { default as WdRating } from './wd-rating';
213
213
  export { default as WdCascader } from './wd-cascader';
214
+ export { default as WdStoreHome } from './wd-store-home';
215
+ export { default as WdStoreProduct } from './wd-store-product';
@@ -14,7 +14,7 @@
14
14
  }
15
15
 
16
16
  .ad-view__mark-ad {
17
- width: 52px;
17
+ width: 60px;
18
18
  height: 20px;
19
19
  position: absolute;
20
20
  top: 10px;
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import type { CommonPropsType, unknownFunction } from '../../types';
3
3
  import type { DataType } from '../../../configs/components/wd-icon';
4
4
  import '../style';
5
+ import '../../utils/loadIconCss';
5
6
  export declare const WdIcon: React.ForwardRefExoticComponent<WdIconProps & React.RefAttributes<unknown>>;
6
7
  export interface WdIconProps extends CommonPropsType, DataType {
7
8
  [handlers: `on${string}`]: unknownFunction;
@@ -8,13 +8,12 @@ import { convertLegacyEnum } from '../../utils/tool';
8
8
  import { WD_ICON_TYPE, WD_ICON_SIZE } from '../../../enum';
9
9
  import WdImage from '../wd-image';
10
10
  import '../style';
11
+ import '../../utils/loadIconCss';
11
12
  export const WdIcon = forwardRef(function WdIcon({ type: _type = 'inner', name = 'success', src, size: _size = 'md', sizeSelfAdaptive: _sizeSelfAdaptive = false, events = emptyObject, className, style: _style, id, color: _color, ...props }, ref) {
12
13
  const platform = usePlatform();
13
14
  // 兼容旧版组件的属性值 size/color
14
15
  const remdiff = 2;
15
- const iconNumSize = !isNaN(Number(_size))
16
- ? `${Number(_size) / remdiff}px`
17
- : '';
16
+ const iconNumSize = !isNaN(Number(_size)) ? `${Number(_size) / remdiff}px` : '';
18
17
  const fontSize = iconNumSize && _type === 'inner' ? { fontSize: iconNumSize } : {};
19
18
  const width = iconNumSize && _type === 'custom' ? { width: iconNumSize } : {};
20
19
  const height = iconNumSize && _type === 'custom' ? { height: iconNumSize } : {};
@@ -22,9 +21,7 @@ export const WdIcon = forwardRef(function WdIcon({ type: _type = 'inner', name =
22
21
  const style = { ...fontSize, ...width, ...height, ...color, ..._style };
23
22
  // 枚举转换
24
23
  const type = convertLegacyEnum(_type, WD_ICON_TYPE);
25
- const size = ['xxs'].includes(_size)
26
- ? _size
27
- : convertLegacyEnum(_size, WD_ICON_SIZE); // 不对外暴露的size属性值
24
+ const size = ['xxs'].includes(_size) ? _size : convertLegacyEnum(_size, WD_ICON_SIZE); // 不对外暴露的size属性值
28
25
  // 样式
29
26
  const { classPrefix } = useConfig();
30
27
  const compClassName = `${classPrefix}-icon`;
@@ -73,8 +70,6 @@ export const WdIcon = forwardRef(function WdIcon({ type: _type = 'inner', name =
73
70
  return (_jsx("i", { className: classNames(classes, className), style: style, id: id, onClick: onClick, ...propsStartWithOn }));
74
71
  }
75
72
  else {
76
- return (_jsx("div", { "data-testid": propsStartWithOn['data-testid'], style: { display: 'inherit' }, children: _jsx(WdImage, { className: classNames(classes, className), style: style, id: id, src: src
77
- ? src
78
- : 'https://qcloudimg.tencent-cloud.cn/raw/4a29d51b504f12b4933ce4490110b4dc.svg', events: { tap: onClick }, maskClosable: false, alt: '', lazyLoad: false, ...propsStartWithOn }) }));
73
+ return (_jsx("div", { "data-testid": propsStartWithOn['data-testid'], style: { display: 'inherit' }, children: _jsx(WdImage, { className: classNames(classes, className), style: style, id: id, src: src ? src : 'https://qcloudimg.tencent-cloud.cn/raw/4a29d51b504f12b4933ce4490110b4dc.svg', events: { tap: onClick }, maskClosable: false, alt: '', lazyLoad: false, ...propsStartWithOn }) }));
79
74
  }
80
75
  });
@@ -1,6 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  /* eslint-disable @typescript-eslint/no-magic-numbers */
3
3
  import { useState, useImperativeHandle, useMemo, useEffect, useCallback } from 'react';
4
+ import { useDebouncedCallback } from '@react-hookz/web';
4
5
  import { LoadingTip } from 'tea-component';
5
6
  import { SelectUI as Select } from '../select/selectUI';
6
7
  import { WdIcon } from '../../wd-icon';
@@ -48,8 +49,14 @@ const OptionText = ({ mode, option, selectFields, authFields, onChange, onRelati
48
49
  const defaultSize = 50;
49
50
  const defaultPage = 1;
50
51
  export function RelationSelect(props) {
51
- var _a;
52
- const { placeholder, size, disabled, onChange, value, onSearch, addRelationButton, childRef, dataSourceName, selectFields, selectFieldType, primaryField, setRefreshStatus, mode, onRelationOptionJump, enableRelationOptionJump, } = props;
52
+ var _a, _b;
53
+ const { placeholder, size, disabled, onChange, value, onSearch, addRelationButton, childRef, dataSourceName, selectFields, selectFieldType, primaryField, setRefreshStatus, mode, onRelationOptionJump, enableRelationOptionJump, listWidth = 700, } = props;
54
+ const selectFieldsLength = selectFieldType === 'custom' ? selectFields === null || selectFields === void 0 ? void 0 : selectFields.length : 0;
55
+ // 设置下拉列表与下拉按钮同宽
56
+ // 以传入为准,未传入,在自定义展示字段少于2个时设置为 true,否则设置为false,宽度设置为700,
57
+ const _matchButtonWidth = (_a = props === null || props === void 0 ? void 0 : props.matchButtonWidth) !== null && _a !== void 0 ? _a : selectFieldsLength < 2;
58
+ // 以传入为准,未传入,在不与按钮同宽度的情况下,listHeight 会被设置为 400
59
+ const _listHeight = (_b = props === null || props === void 0 ? void 0 : props.listHeight) !== null && _b !== void 0 ? _b : (_matchButtonWidth ? undefined : 400);
53
60
  const { authFields } = useAuthFields({
54
61
  dbName: dataSourceName,
55
62
  dbFieldNames: [],
@@ -95,10 +102,10 @@ export function RelationSelect(props) {
95
102
  options,
96
103
  selectFields,
97
104
  ]);
98
- const searchOptionListWithWhere = useCallback((where = whereList) => {
105
+ const searchOptionListWithWhere = useDebouncedCallback((where = whereList) => {
99
106
  empty();
100
107
  setQuery({ ...query, pageNo: defaultPage, where });
101
- }, [empty, query, setQuery, whereList]);
108
+ }, [empty, query, setQuery, whereList], 300);
102
109
  useImperativeHandle(childRef, () => {
103
110
  return {
104
111
  refresh: async () => {
@@ -128,9 +135,7 @@ export function RelationSelect(props) {
128
135
  searchOptionListWithWhere(where);
129
136
  onSearch(keyword);
130
137
  };
131
- const primaryFieldTitle = (_a = authFields === null || authFields === void 0 ? void 0 : authFields.find((j) => (j === null || j === void 0 ? void 0 : j.name) === primaryField)) === null || _a === void 0 ? void 0 : _a.title;
132
- const searchPlaceholder = `搜索主列${primaryFieldTitle}[${primaryField}]`;
133
- return (_jsx(EnumHoc, { fields: authFields, children: _jsx(Select, { ...props, overlayClassName: isRelationSelectOption ? 'wd-relation-select-overlay' : '', searchable: true, matchButtonWidth: true, placeholder: placeholder, appearance: 'button', size: size, disabled: disabled, autoClearSearchValue: true, options: customOptions, value: value, onChange: onChange, onSearch: searchHandle, tips: isLoading ? '' : undefined, bottomTips: isLoading ? _jsx(LoadingTip, {}) : undefined, onScrollBottom: () => {
138
+ return (_jsx(EnumHoc, { fields: authFields, children: _jsx(Select, { ...props, overlayClassName: isRelationSelectOption ? 'wd-relation-select-overlay' : '', searchable: true, listWidth: listWidth, listHeight: _listHeight, matchButtonWidth: _matchButtonWidth, placeholder: placeholder, appearance: 'button', filter: () => true, size: size, disabled: disabled, autoClearSearchValue: true, options: customOptions, value: value, onChange: onChange, onSearch: searchHandle, tips: isLoading ? '' : undefined, bottomTips: isLoading ? _jsx(LoadingTip, {}) : undefined, onScrollBottom: () => {
134
139
  if (!isLoading && customOptions.length < total) {
135
140
  setQuery((query) => ({
136
141
  ...query,
@@ -139,7 +144,7 @@ export function RelationSelect(props) {
139
144
  }
140
145
  }, onOpen: () => {
141
146
  searchOptionListWithWhere();
142
- }, footer: addRelationButton, mode: mode, searchPlaceholder: searchPlaceholder }) }));
147
+ }, footer: addRelationButton, mode: mode }) }));
143
148
  }
144
149
  export function EnumSelect(props) {
145
150
  const { placeholder, size, disabled, onChange, value, onSearch, addRelationButton, childRef, dataSourceName, enumName, primaryField, format, viewId, where, setRefreshStatus, mode, } = props;
@@ -185,7 +190,6 @@ export function CustomSelect(props) {
185
190
  const { format, addRelationButtonText, enableAddRelationButton, events } = props;
186
191
  const isEnumType = format === 'x-enum';
187
192
  const [refreshStatus, setRefreshStatus] = useState(false);
188
- const listWidth = 700;
189
193
  const addRelationButton = enableAddRelationButton && (_jsxs("span", { className: "wd-add-relation-button-wrap", onClick: () => {
190
194
  var _a;
191
195
  (_a = events === null || events === void 0 ? void 0 : events.onAddRelationButtonClick) === null || _a === void 0 ? void 0 : _a.call(events);
@@ -193,5 +197,5 @@ export function CustomSelect(props) {
193
197
  if (refreshStatus) {
194
198
  return _jsx(LoadingTip, {});
195
199
  }
196
- return isEnumType ? (_jsx(EnumSelect, { ...props, addRelationButton: addRelationButton, setRefreshStatus: setRefreshStatus, listWidth: listWidth })) : (_jsx(RelationSelect, { ...props, addRelationButton: addRelationButton, setRefreshStatus: setRefreshStatus, listWidth: listWidth, searchPlaceholder: '搜索主列' }));
200
+ return isEnumType ? (_jsx(EnumSelect, { ...props, addRelationButton: addRelationButton, setRefreshStatus: setRefreshStatus })) : (_jsx(RelationSelect, { ...props, addRelationButton: addRelationButton, setRefreshStatus: setRefreshStatus }));
197
201
  }
@@ -42,20 +42,20 @@ function SelectH5(props) {
42
42
  // 聚焦在搜索框
43
43
  const [inputFocus, setInputFocus] = useState(false);
44
44
  const [searchValue, setSearchValue] = useState('');
45
- const [isSearch, setIsSearch] = useState(false);
45
+ const [isSearch, setIsSearch] = useState(true);
46
46
  const [currentSelected, setCurrentSelected] = useSyncValue(getSelectedItem(options, value), isObjectEqual);
47
47
  const getOptionList = () => {
48
48
  return options.filter((i) => String(i === null || i === void 0 ? void 0 : i.label).toLowerCase().includes(searchValue.toLowerCase()));
49
49
  };
50
50
  // 前端查询
51
- const customOptions = isSearch ? getOptionList() : options;
51
+ const customOptions = isSearch && searchValue ? getOptionList() : options;
52
52
  const handleZhStart = () => {
53
53
  // 判断是否输入中文,则停止搜索
54
54
  setIsSearch(false);
55
55
  };
56
- const handleZhEnd = (e) => {
56
+ const handleZhEnd = () => {
57
57
  setIsSearch(true);
58
- handleSearch(e);
58
+ onSearch(searchValue);
59
59
  };
60
60
  const handleSearch = (e) => {
61
61
  const tValue = e.target.value.trim();
@@ -80,8 +80,7 @@ function SelectH5(props) {
80
80
  };
81
81
  const getInitOptions = () => {
82
82
  setSearchValue('');
83
- setIsSearch(true);
84
- setCurrentSelected([]);
83
+ setCurrentSelected(getSelectedItem(options, value));
85
84
  if (onOpen) {
86
85
  onOpen();
87
86
  }
@@ -117,8 +116,8 @@ function SelectH5(props) {
117
116
  if (!isMultiple) {
118
117
  // 单选直接关弹窗
119
118
  onChange(item.value);
120
- setVisible(false);
121
119
  setCurrentSelected([item]);
120
+ setVisible(false);
122
121
  }
123
122
  else {
124
123
  setCurrentSelected(dealSelectedItem(item));
@@ -138,7 +137,7 @@ function SelectH5(props) {
138
137
  }, children: _jsx(OptionList, { onScrollBottom: onScrollBottom, options: customOptions, inputFocus: inputFocus, currentSelected: currentSelected, optionClick: optionClick, bottomTips: bottomTips }) }), footer] })) })] })] }));
139
138
  }
140
139
  export function SelectUI(props) {
141
- const { placeholder, size, disabled, onChange, onSearch, searchable, options = [], value, footer, overlayClassName, onOpen, onScrollBottom, tips, bottomTips, mode, format, readOnly, setAllOption, listHeight, listWidth, popupContainer, searchPlaceholder = '搜索选项', } = props;
140
+ const { placeholder, size, disabled, onChange, onSearch, searchable, options = [], value, footer, overlayClassName, onOpen, onScrollBottom, tips, bottomTips, mode, format, readOnly, setAllOption, listHeight, listWidth, popupContainer, searchPlaceholder = '搜索选项', matchButtonWidth = true, ...restProps } = props;
142
141
  const platform = usePlatform();
143
142
  const [currentOption] = useSyncValue((options === null || options === void 0 ? void 0 : options.map(({ label, value }) => ({ label, value }))) || [], isObjectEqual);
144
143
  // 更新option,从而更新最新的选项值
@@ -165,20 +164,20 @@ export function SelectUI(props) {
165
164
  return _jsx(SelectH5, { ...props, readValue: readValue, searchPlaceholder: searchPlaceholder });
166
165
  }
167
166
  else if (mode === 'multiple') {
168
- return (_jsx(SelectMultiple, { popupContainer: popupContainer, button: (selectedItem) => {
167
+ return (_jsx(SelectMultiple, { ...restProps, popupContainer: popupContainer, button: (selectedItem) => {
169
168
  if (!(selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.length)) {
170
169
  return _jsx("div", { className: "wedatea2td-text-weak", children: placeholder });
171
170
  }
172
171
  return selectedItem.map((i) => (i === null || i === void 0 ? void 0 : i.label) || i.value).join(',');
173
- }, staging: false, overlayClassName: `${overlayClassName} multiple`, searchable: searchable, matchButtonWidth: true, placeholder: placeholder, searchPlaceholder: searchPlaceholder, appearance: 'button', size: size, disabled: disabled, autoClearSearchValue: true, options: options === null || options === void 0 ? void 0 : options.map((i) => ({ ...i, text: i.text || i.label })), value: Array.isArray(value) ? value : [], onChange: onChange, onSearch: onSearch, footer: footer, onOpen: onOpen, onScrollBottom: onScrollBottom, bottomTips: bottomTips, tips: tips, listHeight: listHeight, listWidth: listWidth }));
172
+ }, staging: false, overlayClassName: `${overlayClassName} multiple`, searchable: searchable, matchButtonWidth: matchButtonWidth, placeholder: placeholder, searchPlaceholder: searchPlaceholder, appearance: 'button', size: size, disabled: disabled, autoClearSearchValue: true, options: options === null || options === void 0 ? void 0 : options.map((i) => ({ ...i, text: i.text || i.label })), value: Array.isArray(value) ? value : [], onChange: onChange, onSearch: onSearch, footer: footer, onOpen: onOpen, onScrollBottom: onScrollBottom, bottomTips: bottomTips, tips: tips, listHeight: listHeight, listWidth: listWidth }));
174
173
  }
175
174
  else {
176
- return (_jsx(Select, { popupContainer: popupContainer, button: (selectedItem) => {
175
+ return (_jsx(Select, { ...restProps, popupContainer: popupContainer, button: (selectedItem) => {
177
176
  if (!selectedItem) {
178
177
  return _jsx("div", { className: "wedatea2td-text-weak", children: placeholder });
179
178
  }
180
179
  return (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.label) || (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.value);
181
- }, overlayClassName: overlayClassName, searchable: searchable, matchButtonWidth: true, placeholder: placeholder, searchPlaceholder: searchPlaceholder, appearance: 'button', size: size, disabled: disabled, autoClearSearchValue: true, options: options === null || options === void 0 ? void 0 : options.map((i) => ({ ...i, text: i.text || i.label })), value: value, onChange: onChange, onSearch: onSearch, footer: footer, onOpen: onOpen, onScrollBottom: onScrollBottom, bottomTips: bottomTips, tips: tips, listHeight: listHeight, listWidth: listWidth }));
180
+ }, overlayClassName: overlayClassName, searchable: searchable, matchButtonWidth: matchButtonWidth, placeholder: placeholder, searchPlaceholder: searchPlaceholder, appearance: 'button', size: size, disabled: disabled, autoClearSearchValue: true, options: options === null || options === void 0 ? void 0 : options.map((i) => ({ ...i, text: i.text || i.label })), value: value, onChange: onChange, onSearch: onSearch, footer: footer, onOpen: onOpen, onScrollBottom: onScrollBottom, bottomTips: bottomTips, tips: tips, listHeight: listHeight, listWidth: listWidth }));
182
181
  }
183
182
  };
184
183
  return (_jsx(WdFormItemReadOnly, { after: props.after, before: props.before, onRelationTagClick: props.onRelationTagClick, readBeforeAfter: true, readOnly: readOnly, readValue: readValue, format: format, value: value, version: 'wd', children: _jsx("div", { "data-testid": isMultiple ? 'form-item-select-multiple-pc' : 'form-select', className: isMultiple ? 'form-select-multiple-pc' : 'form-select-pc', children: render() }) }));
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React, { forwardRef, useState, useCallback, useRef } from 'react';
3
- import { useHandleClear, useFixedIcon, SELECT_ICON_H5, SELECT_ICON_PC, } from '../../utils/hooks/useFormLegacy';
3
+ import { useHandleClear, useFixedIcon, SELECT_ICON_H5, SELECT_ICON_PC } from '../../utils/hooks/useFormLegacy';
4
4
  import { useFormInputTrait } from '../../components/form-input-hooks';
5
5
  import { WdFormItem, WdInputGroup, WdInputWrap } from '../wd-form-item';
6
6
  import { isFormatWithRelation } from '../form/select/formats-util';
@@ -17,7 +17,7 @@ import { SelectCom as Select } from './select';
17
17
  */
18
18
  export const WdSelect = forwardRef(function WsSelect(props, ref) {
19
19
  const { classRoot = 'select', clearable = X_RUNTIME_DEFAULT.clearable, placeholder, range, format, tipBlock = X_RUNTIME_DEFAULT.tipBlock, where = X_RUNTIME_DEFAULT.where, enumName, primaryField, viewId, dataSourceName, events = emptyObject, ignoreCase = X_RUNTIME_DEFAULT.ignoreCase, staticSearchable = X_RUNTIME_DEFAULT.staticSearchable, enableRelationalSetting = X_RUNTIME_DEFAULT.enableRelationalSetting, enableRelationalRefresh = X_RUNTIME_DEFAULT.enableRelationalRefresh, addRelationButtonText = X_RUNTIME_DEFAULT.addRelationButtonText, enableAddRelationButton = X_RUNTIME_DEFAULT.enableAddRelationButton, enableRelationOptionJump = X_RUNTIME_DEFAULT.enableRelationOptionJump, popupContainer, selectFields: customFields = [], // 自定义展示字段
20
- selectFieldType = 'primary', } = props;
20
+ selectFieldType = 'primary', searchPlaceholder, } = props;
21
21
  const childRef = useRef(null);
22
22
  const [options, setOptions] = useState([]);
23
23
  const [innerHandle, setInnerHandle] = useState({});
@@ -108,5 +108,5 @@ export const WdSelect = forwardRef(function WsSelect(props, ref) {
108
108
  }, enableRelationOptionJump: enableRelationOptionJump, onRelationOptionJump: (item) => {
109
109
  var _a;
110
110
  (_a = delayEvents === null || delayEvents === void 0 ? void 0 : delayEvents.onRelationOptionJump) === null || _a === void 0 ? void 0 : _a.call(delayEvents, item);
111
- }, selectFieldType: selectFieldType, selectFields: customFields, isRelation: isRelation, addRelationButtonText: addRelationButtonText, enableAddRelationButton: enableAddRelationButton, childRef: childRef, events: delayEvents, labelVisible: false, value: value, enumName: enumName, format: format, placeholder: placeholder, primaryField: primaryField, options: range, size: "full", tipBlock: tipBlock, viewId: viewId, where: where, dataSourceName: dataSourceName, readOnly: readOnly, disabled: disabled, mode: "selector", decorator: null, ignoreCase: ignoreCase, staticSearchable: staticSearchable, onChange: handleChange, onSearch: onSearchValueInput, popupContainer: popupContainer, searchable: true }) }) }), layout === 'horizontal' && LabelAdornment] }) }));
111
+ }, selectFieldType: selectFieldType, selectFields: customFields, isRelation: isRelation, addRelationButtonText: addRelationButtonText, enableAddRelationButton: enableAddRelationButton, childRef: childRef, events: delayEvents, labelVisible: false, value: value, enumName: enumName, format: format, placeholder: placeholder, primaryField: primaryField, options: range, size: "full", tipBlock: tipBlock, viewId: viewId, where: where, dataSourceName: dataSourceName, readOnly: readOnly, disabled: disabled, mode: "selector", decorator: null, ignoreCase: ignoreCase, staticSearchable: staticSearchable, onChange: handleChange, onSearch: onSearchValueInput, popupContainer: popupContainer, searchable: true, searchPlaceholder: searchPlaceholder }) }) }), layout === 'horizontal' && LabelAdornment] }) }));
112
112
  });
@@ -2,7 +2,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
2
2
  import React, { forwardRef, useState, useCallback, useRef } from 'react';
3
3
  import { WdFormItem, WdInputGroup, WdInputWrap } from '../wd-form-item';
4
4
  import { SelectCom as SelectMultiple } from '../wd-select/select';
5
- import { useHandleClear, useFixedIcon, SELECT_ICON_H5, SELECT_ICON_PC, } from '../../utils/hooks/useFormLegacy';
5
+ import { useHandleClear, useFixedIcon, SELECT_ICON_H5, SELECT_ICON_PC } from '../../utils/hooks/useFormLegacy';
6
6
  import { useFormInputTrait } from '../../components/form-input-hooks';
7
7
  import { useSelected } from '../../utils/hooks/use-selected';
8
8
  import { emptyObject } from '../../utils/constant';
@@ -18,7 +18,7 @@ import { RelationalSetting } from '../wd-select/relationSelect/relationalSetting
18
18
  */
19
19
  export const WdSelectMultiple = forwardRef(function WdSelectMultiple(props, ref) {
20
20
  const { classRoot = 'select-multiple', clearable = X_RUNTIME_DEFAULT.clearable, placeholder, range, enumName, format, primaryField, tipBlock = X_RUNTIME_DEFAULT.tipBlock, viewId, dataSourceName, events = emptyObject, ignoreCase = X_RUNTIME_DEFAULT.ignoreCase, staticSearchable = X_RUNTIME_DEFAULT.staticSearchable, where = X_RUNTIME_DEFAULT.where, enableRelationalSetting = X_RUNTIME_DEFAULT.enableRelationalSetting, enableRelationalRefresh = X_RUNTIME_DEFAULT.enableRelationalRefresh, addRelationButtonText = X_RUNTIME_DEFAULT.addRelationButtonText, enableAddRelationButton = X_RUNTIME_DEFAULT.enableAddRelationButton, enableRelationOptionJump = X_RUNTIME_DEFAULT.enableRelationOptionJump, popupContainer, selectFields: customFields = [], // 自定义展示字段
21
- selectFieldType = 'primary', } = props;
21
+ selectFieldType = 'primary', searchPlaceholder, } = props;
22
22
  const childRef = useRef(null);
23
23
  const [options, setOptions] = useState([]);
24
24
  const [innerHandle, setInnerHandle] = useState({});
@@ -104,5 +104,5 @@ export const WdSelectMultiple = forwardRef(function WdSelectMultiple(props, ref)
104
104
  }, enableRelationOptionJump: enableRelationOptionJump, onRelationOptionJump: (item) => {
105
105
  var _a;
106
106
  (_a = delayEvents === null || delayEvents === void 0 ? void 0 : delayEvents.onRelationOptionJump) === null || _a === void 0 ? void 0 : _a.call(delayEvents, item);
107
- }, selectFieldType: selectFieldType, selectFields: customFields, isRelation: isRelation, addRelationButtonText: addRelationButtonText, enableAddRelationButton: enableAddRelationButton, childRef: childRef, events: delayEvents, labelVisible: false, value: value, enumName: enumName, format: format, placeholder: placeholder, primaryField: primaryField, options: range, size: "full", tipBlock: tipBlock, viewId: viewId, dataSourceName: dataSourceName, readOnly: readOnly, disabled: disabled, mode: "multiple", decorator: null, ignoreCase: ignoreCase, staticSearchable: staticSearchable, where: where, onChange: handleChange, onSearch: onSearchValueInput, popupContainer: popupContainer, searchable: true }) }) }), layout === 'horizontal' && LabelAdornment] }) }));
107
+ }, selectFieldType: selectFieldType, selectFields: customFields, isRelation: isRelation, addRelationButtonText: addRelationButtonText, enableAddRelationButton: enableAddRelationButton, childRef: childRef, events: delayEvents, labelVisible: false, value: value, enumName: enumName, format: format, placeholder: placeholder, primaryField: primaryField, options: range, size: "full", tipBlock: tipBlock, viewId: viewId, dataSourceName: dataSourceName, readOnly: readOnly, disabled: disabled, mode: "multiple", decorator: null, ignoreCase: ignoreCase, staticSearchable: staticSearchable, where: where, onChange: handleChange, onSearch: onSearchValueInput, popupContainer: popupContainer, searchable: true, searchPlaceholder: searchPlaceholder }) }) }), layout === 'horizontal' && LabelAdornment] }) }));
108
108
  });
@@ -0,0 +1,81 @@
1
+ .wd-store-home__wrap {
2
+ width: 320px;
3
+ background-color: #fff;
4
+ border: 1px solid #f2f2f2;
5
+ border-radius: 2px;
6
+ padding: 15px 15px 0 15px;
7
+ }
8
+
9
+ .wd-store-home__content {
10
+ display: flex;
11
+ margin-bottom: 15px;
12
+ }
13
+ .wd-store-home__title {
14
+ margin-bottom: 5px;
15
+ font-size: 18px;
16
+ font-weight: bold;
17
+ }
18
+ .wd-store-home__label {
19
+ font-size: 14px;
20
+ color: rgba(0, 0, 0, 0.4);
21
+ }
22
+ .wd-store-home__img {
23
+ height: 54px;
24
+ width: 54px;
25
+ border-radius: 100%;
26
+ margin-right: 15px;
27
+ }
28
+ .wd-store-home__footer {
29
+ border-top: 1px solid #f2f2f2;
30
+ font-size: 12px;
31
+ padding: 5px 0;
32
+ display: flex;
33
+ color: #b7b7b7;
34
+ font-weight: bold;
35
+ }
36
+ .wd-store-home__icon {
37
+ background-image: url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyB3aWR0aD0iMjYiIGhlaWdodD0iMjYiIHZpZXdCb3g9IjAgMCAyNiAyNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIzLjgzMzIgMTAuNjQ0OUMyMy44MzMyIDEyLjAzOCAyMi42ODA1IDEzLjIxMDIgMjEuMTI3IDEzLjUzNTJDMjAuODQ5NyAxMy41OTM3IDIwLjU1NzIgMTMuNjI0IDIwLjI1ODIgMTMuNjI0QzE5Ljg1OTUgMTMuNjI0IDE5LjQ3NiAxMy41Njk5IDE5LjExNjMgMTMuNDY4QzE4LjAxMTMgMTMuMTU2IDE3LjE0NjggMTIuNDA2NCAxNi44MjE4IDExLjQ2ODJDMTYuNzkxNSAxMS4zODE1IDE2Ljc2NzcgMTEuMjkyNyAxNi43NDgyIDExLjIwMzlDMTYuNzI2NSAxMS4yNjY3IDE2LjcwMjcgMTEuMzI5NSAxNi42NzQ1IDExLjM5MjRDMTYuMTMyOCAxMi42NDY5IDE0LjY4OTggMTMuNTQ4MiAxMi45OTk4IDEzLjU0ODJDMTEuMzA5OCAxMy41NDgyIDkuODY2ODQgMTIuNjQ2OSA5LjMyMyAxMS4zOTI0QzkuMjk5MTcgMTEuMzMxNyA5LjI3MzE3IDExLjI3MSA5LjI1MzY3IDExLjIwODJDOS4yMzQxNyAxMS4yOTQ5IDkuMjEwMzQgMTEuMzgxNSA5LjE4IDExLjQ2NkM4Ljg1OTM0IDEyLjQxMjkgNy45ODgzNCAxMy4xNjY5IDYuODc2ODQgMTMuNDc4OUM2LjUyMTUgMTMuNTc4NSA2LjEzOCAxMy42MzI3IDUuNzQxNSAxMy42MzI3QzUuNDQwMzQgMTMuNjMyNyA1LjE1IDEzLjYwMjQgNC44NzA1IDEzLjU0MzlDMy4zMTkxNyAxMy4yMTY3IDIuMTY2NSAxMi4wNDQ1IDIuMTY2NSAxMC42NTM1QzIuMTY2NSAxMC4yODk1IDIuMjQ0NSA5Ljk0MDcxIDIuMzg5NjcgOS42MTc4N0wyLjM5NCA5LjYwNzA0TDQuNjEyNjcgNC42MzQ1NEM1LjExOTY3IDMuNDk5MjEgNi4yNTcxNyAyLjcwODM3IDcuNTgxIDIuNzA4MzdIMTguNDE0M0MxOS43MzYgMi43MDgzNyAyMC44NzM1IDMuNDk5MjEgMjEuMzgwNSA0LjYzMjM3QzIxLjM5MTMgNC42NTE4NyAyMS40IDQuNjcxMzcgMjEuNDA4NyA0LjY5MzA0TDIzLjYwNzggOS42MDQ4N0MyMy43NTA4IDkuOTI3NzEgMjMuODMxIDEwLjI3ODcgMjMuODMxIDEwLjY0NDlIMjMuODMzMloiIGZpbGw9IiNiN2I3YjciLz4KPHBhdGggZD0iTTIxLjY0MDcgMTYuNTc1QzIxLjY0MDcgMTYuNTk2NyAyMS42NDA3IDE2LjYyMDUgMjEuNjM2NCAxNi42NDIyQzIxLjYzNjQgMTYuNjU3NCAyMS42MzY0IDE2LjY3NDcgMjEuNjMyIDE2LjY4OTlWMTYuNjk4NUMyMS4yNDIgMjAuMzk0OSAxNy41MjYyIDIzLjI5MTcgMTMgMjMuMjkxN0M4LjQ3Mzg4IDIzLjI5MTcgNC43NTgwNCAyMC4zOTQ5IDQuMzY4MDQgMTYuNjk4NVYxNi42ODk5QzQuMzYzNzEgMTYuNjc0NyA0LjM2MzcxIDE2LjY1NzQgNC4zNjM3MSAxNi42NDIyQzQuMzU5MzcgMTYuNjIwNSA0LjM1OTM4IDE2LjU5NjcgNC4zNTkzOCAxNi41NzVDNC4zNTkzOCAxNi4wOTYyIDQuNzQ3MjEgMTUuNzA4NCA1LjIyNjA0IDE1LjcwODRDNS42NjgwNCAxNS43MDg0IDYuMDMyMDQgMTYuMDM5OSA2LjA4NjIxIDE2LjQ2NjdDNi4wODgzNyAxNi40Nzk3IDYuMDg4MzcgMTYuNDk0OSA2LjA5MDU0IDE2LjUxQzYuMzgzMDQgMTkuMzMzMiA5LjM2ODcxIDIxLjU1ODQgMTMgMjEuNTU4NEMxNi42MzE0IDIxLjU1ODQgMTkuNjE3IDE5LjMzMzIgMTkuOTA5NSAxNi41MUMxOS45MDk1IDE2LjQ5NDkgMTkuOTA5NSAxNi40Nzk3IDE5LjkxMzkgMTYuNDY2N0MxOS45NjggMTYuMDM5OSAyMC4zMzIgMTUuNzA4NCAyMC43NzQgMTUuNzA4NEMyMS4yNTI5IDE1LjcwODQgMjEuNjQwNyAxNi4wOTYyIDIxLjY0MDcgMTYuNTc1WiIgZmlsbD0iI2I3YjdiNyIvPgo8L3N2Zz4K);
38
+ background-repeat: no-repeat;
39
+ background-position: center;
40
+ background-size: cover;
41
+ width: 20px;
42
+ height: 20px;
43
+ display: inline-block;
44
+ margin-right: 5px;
45
+ }
46
+
47
+ /* 微信商品 */
48
+ .wd-store-product__wrap {
49
+ background-color: #fafafa;
50
+ border-radius: 15px;
51
+ padding: 15px 15px 0 15px;
52
+ }
53
+ .wd-store-product__img {
54
+ width: 30%;
55
+ margin-right: 15px;
56
+ }
57
+ .wd-store-product__text {
58
+ flex: 1;
59
+ display: flex;
60
+ flex-direction: column;
61
+ justify-content: space-between;
62
+ }
63
+ .wd-store-product__text__footer {
64
+ display: flex;
65
+ justify-content: space-between;
66
+ align-items: end;
67
+ margin-top: 20px;
68
+ color: #fc6346;
69
+ }
70
+ .wd-store-product__text .wd-store-home__label {
71
+ border: 1px solid rgba(0, 0, 0, 0.2);
72
+ border-radius: 3px;
73
+ color: rgba(0, 0, 0, 0.4);
74
+ padding: 5px;
75
+ }
76
+ .wd-store-product__text__footer .wd-btn {
77
+ --wd-btn-color-brand: #fc6346;
78
+ --wd-btn-color-brand-hover: #fc6346;
79
+ --wd-btn-color-brand-active: #fc6346;
80
+ --wd-btn-color-brand-focus: #fc6346;
81
+ }
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import type { CommonPropsType } from '../../types';
3
+ import type { DataType } from '../../../configs/components/wd-store-home';
4
+ import './style';
5
+ export type PropsType = CommonPropsType;
6
+ export default function WdStoreHome(): JSX.Element;
7
+ export interface WdStoreHomeProps extends CommonPropsType, DataType {
8
+ }
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { ConfigProvider, Bubble } from 'tea-component';
3
+ import './style';
4
+ export default function WdStoreHome() {
5
+ return (_jsx(ConfigProvider, { classPrefix: "wedatea2td", children: _jsx(Bubble, { placement: "auto", openDelay: 300, content: _jsxs(_Fragment, { children: ["\u8BE5\u7EC4\u4EF6\u5FC5\u987B\u5728\u5C0F\u7A0B\u5E8F\u771F\u5B9E\u73AF\u5883\u4F7F\u7528\u624D\u80FD\u591F\u770B\u5230\u5B9E\u9645\u6548\u679C\u3002", _jsx("br", {}), _jsx("a", { href: "https://developers.weixin.qq.com/miniprogram/dev/component/store-home.html", target: "_blank", rel: "noreferrer", children: "\u67E5\u770B\u8BF4\u660E" })] }), children: _jsxs("div", { className: "wd-store-home__wrap", children: [_jsxs("div", { className: "wd-store-home__content", children: [_jsx("img", { className: "wd-store-home__img", src: "https://qcloudimg.tencent-cloud.cn/raw/4a29d51b504f12b4933ce4490110b4dc.svg", alt: "" }), _jsxs("div", { children: [_jsx("p", { className: "wd-store-home__title", children: "\u5C0F\u5E97\u540D\u79F0" }), _jsx("p", { className: "wd-store-home__label", children: "\u5C0F\u5E97\u7B80\u4ECB" })] })] }), _jsxs("div", { className: "wd-store-home__footer", children: [_jsx("i", { className: "wd-store-home__icon" }), "\u5C0F\u5E97\u540D\u79F0"] })] }) }) }));
6
+ }
@@ -0,0 +1,2 @@
1
+ import './index.css';
2
+ import '../style';
@@ -0,0 +1,2 @@
1
+ import './index.css';
2
+ import '../style';