@cloudbase/weda-ui 2.0.26 → 3.1.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 (411) hide show
  1. package/package.json +12 -13
  2. package/src/configs/actions/showModal.json +0 -48
  3. package/src/configs/actions/showToast.json +0 -41
  4. package/src/configs/components/auth.json +0 -16
  5. package/src/configs/components/button.json +0 -239
  6. package/src/configs/components/calendar.json +0 -81
  7. package/src/configs/components/carousel.json +0 -292
  8. package/src/configs/components/chart/bar.json +0 -721
  9. package/src/configs/components/chart/line.json +0 -674
  10. package/src/configs/components/chart/pie.json +0 -494
  11. package/src/configs/components/chart/statisticsCard.json +0 -376
  12. package/src/configs/components/container.json +0 -50
  13. package/src/configs/components/dataView.json +0 -151
  14. package/src/configs/components/drawer.json +0 -115
  15. package/src/configs/components/form/checkbox.json +0 -173
  16. package/src/configs/components/form/form.json +0 -45
  17. package/src/configs/components/form/input.json +0 -154
  18. package/src/configs/components/form/label.json +0 -22
  19. package/src/configs/components/form/location.json +0 -155
  20. package/src/configs/components/form/radio.json +0 -203
  21. package/src/configs/components/form/richText.json +0 -125
  22. package/src/configs/components/form/select.json +0 -411
  23. package/src/configs/components/form/switch.json +0 -58
  24. package/src/configs/components/form/textarea.json +0 -116
  25. package/src/configs/components/form/tips.json +0 -34
  26. package/src/configs/components/form/uploader.json +0 -169
  27. package/src/configs/components/form/uploaderFile.json +0 -158
  28. package/src/configs/components/graphicCard.json +0 -413
  29. package/src/configs/components/image.json +0 -179
  30. package/src/configs/components/link.json +0 -79
  31. package/src/configs/components/listView.json +0 -281
  32. package/src/configs/components/lottery.json +0 -157
  33. package/src/configs/components/modal.json +0 -83
  34. package/src/configs/components/navLayout.json +0 -368
  35. package/src/configs/components/navigationBar.json +0 -62
  36. package/src/configs/components/picker/datePicker.json +0 -33
  37. package/src/configs/components/picker/picker.json +0 -18
  38. package/src/configs/components/picker/timePicker.json +0 -23
  39. package/src/configs/components/richtextview.json +0 -26
  40. package/src/configs/components/scrollVeiw.json +0 -253
  41. package/src/configs/components/slot.json +0 -17
  42. package/src/configs/components/swiper.json +0 -90
  43. package/src/configs/components/tabs.json +0 -121
  44. package/src/configs/components/text.json +0 -95
  45. package/src/configs/components/wedaVideo.json +0 -89
  46. package/src/configs/components/wxOpenApi/phone.json +0 -127
  47. package/src/configs/components/wxOpenApi/phoneCode.json +0 -109
  48. package/src/configs/components/wxOpenApi/share.json +0 -157
  49. package/src/configs/components/wxOpenApi/userInfo.json +0 -156
  50. package/src/configs/index.js +0 -111
  51. package/src/index.js +0 -4
  52. package/src/mp/README.md +0 -1
  53. package/src/mp/actions/showModal/index.js +0 -3
  54. package/src/mp/actions/showToast/index.js +0 -3
  55. package/src/mp/components/button/index.js +0 -91
  56. package/src/mp/components/button/index.json +0 -4
  57. package/src/mp/components/button/index.wxml +0 -22
  58. package/src/mp/components/button/index.wxss +0 -13
  59. package/src/mp/components/calendar/arrowright--line.svg +0 -11
  60. package/src/mp/components/calendar/index.js +0 -268
  61. package/src/mp/components/calendar/index.json +0 -5
  62. package/src/mp/components/calendar/index.wxml +0 -35
  63. package/src/mp/components/calendar/index.wxss +0 -179
  64. package/src/mp/components/carousel/index.js +0 -88
  65. package/src/mp/components/carousel/index.json +0 -7
  66. package/src/mp/components/carousel/index.wxml +0 -6
  67. package/src/mp/components/chart/bar/index.js +0 -257
  68. package/src/mp/components/chart/bar/index.json +0 -6
  69. package/src/mp/components/chart/bar/index.wxml +0 -3
  70. package/src/mp/components/chart/bar/index.wxss +0 -9
  71. package/src/mp/components/chart/common/config/bar.js +0 -50
  72. package/src/mp/components/chart/common/config/global.js +0 -16
  73. package/src/mp/components/chart/common/config/line.js +0 -48
  74. package/src/mp/components/chart/common/config/pie.js +0 -36
  75. package/src/mp/components/chart/common/core/eChartBar.js +0 -258
  76. package/src/mp/components/chart/common/core/eChartBase.js +0 -389
  77. package/src/mp/components/chart/common/core/eChartLine.js +0 -223
  78. package/src/mp/components/chart/common/core/eChartPie.js +0 -169
  79. package/src/mp/components/chart/common/lib/echarts.min.js +0 -18
  80. package/src/mp/components/chart/ec-canvas/ec-canvas.js +0 -277
  81. package/src/mp/components/chart/ec-canvas/ec-canvas.json +0 -4
  82. package/src/mp/components/chart/ec-canvas/ec-canvas.wxml +0 -4
  83. package/src/mp/components/chart/ec-canvas/ec-canvas.wxss +0 -4
  84. package/src/mp/components/chart/ec-canvas/wx-canvas.js +0 -109
  85. package/src/mp/components/chart/line/index.js +0 -247
  86. package/src/mp/components/chart/line/index.json +0 -6
  87. package/src/mp/components/chart/line/index.wxml +0 -3
  88. package/src/mp/components/chart/line/index.wxss +0 -9
  89. package/src/mp/components/chart/pie/index.js +0 -182
  90. package/src/mp/components/chart/pie/index.json +0 -6
  91. package/src/mp/components/chart/pie/index.wxml +0 -3
  92. package/src/mp/components/chart/pie/index.wxss +0 -9
  93. package/src/mp/components/chart/statisticsCard/index.js +0 -253
  94. package/src/mp/components/chart/statisticsCard/index.json +0 -4
  95. package/src/mp/components/chart/statisticsCard/index.wxml +0 -9
  96. package/src/mp/components/chart/statisticsCard/index.wxss +0 -42
  97. package/src/mp/components/container/index.js +0 -20
  98. package/src/mp/components/container/index.json +0 -4
  99. package/src/mp/components/container/index.wxml +0 -3
  100. package/src/mp/components/dataView/index.js +0 -34
  101. package/src/mp/components/dataView/index.json +0 -7
  102. package/src/mp/components/dataView/index.wxml +0 -3
  103. package/src/mp/components/dataView/index.wxss +0 -0
  104. package/src/mp/components/form/checkbox/index.js +0 -124
  105. package/src/mp/components/form/checkbox/index.json +0 -7
  106. package/src/mp/components/form/checkbox/index.wxml +0 -13
  107. package/src/mp/components/form/checkbox/index.wxss +0 -1
  108. package/src/mp/components/form/form/index.js +0 -18
  109. package/src/mp/components/form/form/index.json +0 -4
  110. package/src/mp/components/form/form/index.wxml +0 -5
  111. package/src/mp/components/form/form/index.wxss +0 -1
  112. package/src/mp/components/form/formcell/index.js +0 -54
  113. package/src/mp/components/form/formcell/index.json +0 -4
  114. package/src/mp/components/form/formcell/index.wxml +0 -11
  115. package/src/mp/components/form/formcell/index.wxss +0 -31
  116. package/src/mp/components/form/input/index.js +0 -110
  117. package/src/mp/components/form/input/index.json +0 -7
  118. package/src/mp/components/form/input/index.wxml +0 -24
  119. package/src/mp/components/form/input/index.wxss +0 -22
  120. package/src/mp/components/form/location/components/mapChoose/index.js +0 -201
  121. package/src/mp/components/form/location/components/mapChoose/index.json +0 -4
  122. package/src/mp/components/form/location/components/mapChoose/index.wxml +0 -42
  123. package/src/mp/components/form/location/components/mapChoose/index.wxss +0 -188
  124. package/src/mp/components/form/location/index.js +0 -388
  125. package/src/mp/components/form/location/index.json +0 -6
  126. package/src/mp/components/form/location/index.wxml +0 -21
  127. package/src/mp/components/form/location/index.wxss +0 -89
  128. package/src/mp/components/form/radio/index.js +0 -124
  129. package/src/mp/components/form/radio/index.json +0 -7
  130. package/src/mp/components/form/radio/index.wxml +0 -13
  131. package/src/mp/components/form/radio/index.wxss +0 -1
  132. package/src/mp/components/form/select/index.js +0 -677
  133. package/src/mp/components/form/select/index.json +0 -7
  134. package/src/mp/components/form/select/index.wxml +0 -12
  135. package/src/mp/components/form/select/index.wxss +0 -16
  136. package/src/mp/components/form/select/region/index.js +0 -107
  137. package/src/mp/components/form/switch/index.js +0 -75
  138. package/src/mp/components/form/switch/index.json +0 -7
  139. package/src/mp/components/form/switch/index.wxml +0 -11
  140. package/src/mp/components/form/switch/index.wxss +0 -1
  141. package/src/mp/components/form/textarea/index.js +0 -90
  142. package/src/mp/components/form/textarea/index.json +0 -7
  143. package/src/mp/components/form/textarea/index.wxml +0 -8
  144. package/src/mp/components/form/textarea/index.wxss +0 -10
  145. package/src/mp/components/form/tips/index.js +0 -41
  146. package/src/mp/components/form/tips/index.json +0 -4
  147. package/src/mp/components/form/tips/index.wxml +0 -1
  148. package/src/mp/components/form/tips/index.wxss +0 -1
  149. package/src/mp/components/form/uploader/index.js +0 -158
  150. package/src/mp/components/form/uploader/index.json +0 -10
  151. package/src/mp/components/form/uploader/index.wxml +0 -14
  152. package/src/mp/components/form/uploader/index.wxss +0 -36
  153. package/src/mp/components/form/uploader/weui-uploader.js +0 -219
  154. package/src/mp/components/form/uploader/weui-uploader.json +0 -7
  155. package/src/mp/components/form/uploader/weui-uploader.wxml +0 -45
  156. package/src/mp/components/form/uploader/weui-uploader.wxss +0 -1
  157. package/src/mp/components/form/uploaderFile/index.js +0 -313
  158. package/src/mp/components/form/uploaderFile/index.json +0 -9
  159. package/src/mp/components/form/uploaderFile/index.wxml +0 -45
  160. package/src/mp/components/form/uploaderFile/index.wxss +0 -105
  161. package/src/mp/components/graphicCard/chevron-right.svg +0 -3
  162. package/src/mp/components/graphicCard/index.js +0 -203
  163. package/src/mp/components/graphicCard/index.json +0 -4
  164. package/src/mp/components/graphicCard/index.wxml +0 -25
  165. package/src/mp/components/graphicCard/index.wxss +0 -157
  166. package/src/mp/components/image/index.js +0 -182
  167. package/src/mp/components/image/index.json +0 -7
  168. package/src/mp/components/image/index.wxml +0 -9
  169. package/src/mp/components/image/index.wxss +0 -49
  170. package/src/mp/components/listView/arrow-right-line.svg +0 -3
  171. package/src/mp/components/listView/index.js +0 -274
  172. package/src/mp/components/listView/index.json +0 -4
  173. package/src/mp/components/listView/index.wxml +0 -38
  174. package/src/mp/components/listView/index.wxss +0 -155
  175. package/src/mp/components/listView/more-line.svg +0 -3
  176. package/src/mp/components/lottery/index.js +0 -270
  177. package/src/mp/components/lottery/index.json +0 -4
  178. package/src/mp/components/lottery/index.wxml +0 -41
  179. package/src/mp/components/lottery/index.wxss +0 -323
  180. package/src/mp/components/modal/index.js +0 -39
  181. package/src/mp/components/modal/index.json +0 -4
  182. package/src/mp/components/modal/index.wxml +0 -1
  183. package/src/mp/components/navLayout/index.js +0 -120
  184. package/src/mp/components/navLayout/index.json +0 -7
  185. package/src/mp/components/navLayout/index.wxml +0 -23
  186. package/src/mp/components/navLayout/index.wxss +0 -1193
  187. package/src/mp/components/navigationBar/index.js +0 -193
  188. package/src/mp/components/navigationBar/index.json +0 -5
  189. package/src/mp/components/navigationBar/index.wxml +0 -80
  190. package/src/mp/components/navigationBar/index.wxss +0 -1257
  191. package/src/mp/components/richText/index.js +0 -67
  192. package/src/mp/components/richText/index.json +0 -4
  193. package/src/mp/components/richText/index.wxml +0 -3
  194. package/src/mp/components/richText/index.wxss +0 -27
  195. package/src/mp/components/scrollView/index.js +0 -119
  196. package/src/mp/components/scrollView/index.json +0 -4
  197. package/src/mp/components/scrollView/index.wxml +0 -38
  198. package/src/mp/components/slot/index.js +0 -20
  199. package/src/mp/components/slot/index.json +0 -4
  200. package/src/mp/components/slot/index.wxml +0 -3
  201. package/src/mp/components/swiper/index.js +0 -65
  202. package/src/mp/components/swiper/index.json +0 -4
  203. package/src/mp/components/swiper/index.wxml +0 -3
  204. package/src/mp/components/tabs/index.js +0 -59
  205. package/src/mp/components/tabs/index.json +0 -4
  206. package/src/mp/components/tabs/index.wxml +0 -12
  207. package/src/mp/components/tabs/index.wxss +0 -57
  208. package/src/mp/components/text/index.js +0 -40
  209. package/src/mp/components/text/index.json +0 -4
  210. package/src/mp/components/text/index.wxml +0 -1
  211. package/src/mp/components/text/index.wxss +0 -26
  212. package/src/mp/components/wedaVideo/index.js +0 -86
  213. package/src/mp/components/wedaVideo/index.json +0 -4
  214. package/src/mp/components/wedaVideo/index.wxml +0 -4
  215. package/src/mp/components/wedaVideo/index.wxss +0 -20
  216. package/src/mp/components/wxOpenApi/phone/index.js +0 -109
  217. package/src/mp/components/wxOpenApi/phone/index.json +0 -4
  218. package/src/mp/components/wxOpenApi/phone/index.wxml +0 -4
  219. package/src/mp/components/wxOpenApi/phone/index.wxss +0 -22
  220. package/src/mp/components/wxOpenApi/phoneCode/index.js +0 -89
  221. package/src/mp/components/wxOpenApi/phoneCode/index.json +0 -4
  222. package/src/mp/components/wxOpenApi/phoneCode/index.wxml +0 -4
  223. package/src/mp/components/wxOpenApi/phoneCode/index.wxss +0 -22
  224. package/src/mp/components/wxOpenApi/share/index.js +0 -117
  225. package/src/mp/components/wxOpenApi/share/index.json +0 -4
  226. package/src/mp/components/wxOpenApi/share/index.wxml +0 -4
  227. package/src/mp/components/wxOpenApi/share/index.wxss +0 -22
  228. package/src/mp/components/wxOpenApi/userInfo/index.js +0 -88
  229. package/src/mp/components/wxOpenApi/userInfo/index.json +0 -4
  230. package/src/mp/components/wxOpenApi/userInfo/index.wxml +0 -4
  231. package/src/mp/components/wxOpenApi/userInfo/index.wxss +0 -22
  232. package/src/mp/index.json +0 -52
  233. package/src/mp/package.json +0 -6
  234. package/src/mp/style/weda-ui.wxss +0 -71
  235. package/src/mp/utils/classnames.js +0 -39
  236. package/src/mp/utils/constant.js +0 -20
  237. package/src/mp/utils/dayjs.min.js +0 -1
  238. package/src/mp/utils/debounce.js +0 -133
  239. package/src/mp/utils/deepEqual.js +0 -42
  240. package/src/mp/utils/destr.js +0 -49
  241. package/src/mp/utils/dr_square_point.js +0 -29
  242. package/src/mp/utils/handleEvents.js +0 -32
  243. package/src/mp/utils/lodash.js +0 -2
  244. package/src/mp/utils/platform.js +0 -45
  245. package/src/mp/utils/qqmap-wx-jssdk1.2/qqmap-wx-jssdk.js +0 -1336
  246. package/src/mp/utils/spark-md5.js +0 -776
  247. package/src/mp/utils/tcb.js +0 -76
  248. package/src/setupTests.js +0 -14
  249. package/src/web/actions/index.js +0 -2
  250. package/src/web/actions/showModal/index.tsx +0 -118
  251. package/src/web/actions/showToast/index.js +0 -3
  252. package/src/web/components/auth/index.css +0 -0
  253. package/src/web/components/auth/index.js +0 -66
  254. package/src/web/components/button/index.css +0 -27
  255. package/src/web/components/button/index.tsx +0 -119
  256. package/src/web/components/calendar/index.css +0 -416
  257. package/src/web/components/calendar/index.jsx +0 -312
  258. package/src/web/components/calendar/util.js +0 -90
  259. package/src/web/components/carousel/index.css +0 -119
  260. package/src/web/components/carousel/index.tsx +0 -417
  261. package/src/web/components/chart/bar/index.tsx +0 -140
  262. package/src/web/components/chart/common/config/bar.js +0 -49
  263. package/src/web/components/chart/common/config/global.js +0 -16
  264. package/src/web/components/chart/common/config/line.js +0 -50
  265. package/src/web/components/chart/common/config/pie.js +0 -37
  266. package/src/web/components/chart/common/core/eChartBar.js +0 -259
  267. package/src/web/components/chart/common/core/eChartBase.ts +0 -396
  268. package/src/web/components/chart/common/core/eChartLine.js +0 -225
  269. package/src/web/components/chart/common/core/eChartPie.js +0 -173
  270. package/src/web/components/chart/common/core/type.ts +0 -34
  271. package/src/web/components/chart/common/echart.css +0 -106
  272. package/src/web/components/chart/common/echarts.ts +0 -31
  273. package/src/web/components/chart/common/useChart.tsx +0 -87
  274. package/src/web/components/chart/line/index.tsx +0 -136
  275. package/src/web/components/chart/pie/index.tsx +0 -99
  276. package/src/web/components/chart/statisticsCard/index.css +0 -63
  277. package/src/web/components/chart/statisticsCard/index.tsx +0 -307
  278. package/src/web/components/chart/statisticsCard/interface.ts +0 -14
  279. package/src/web/components/container/index.tsx +0 -34
  280. package/src/web/components/dataView/index.tsx +0 -20
  281. package/src/web/components/dataView/interface.ts +0 -6
  282. package/src/web/components/drawer/index.tsx +0 -68
  283. package/src/web/components/form/checkbox/index.tsx +0 -210
  284. package/src/web/components/form/enumSelect/MultipleSelect.jsx +0 -89
  285. package/src/web/components/form/enumSelect/NormalSelect.tsx +0 -92
  286. package/src/web/components/form/enumSelect/SelectContainer.jsx +0 -43
  287. package/src/web/components/form/enumSelect/index.jsx +0 -9
  288. package/src/web/components/form/enumSelect/props/defaultProps.js +0 -39
  289. package/src/web/components/form/enumSelect/props/propsTypes.js +0 -50
  290. package/src/web/components/form/form/index.css +0 -9
  291. package/src/web/components/form/form/index.tsx +0 -51
  292. package/src/web/components/form/formcell/index.css +0 -85
  293. package/src/web/components/form/formcell/index.tsx +0 -85
  294. package/src/web/components/form/input/index.css +0 -40
  295. package/src/web/components/form/input/index.tsx +0 -166
  296. package/src/web/components/form/location/common/mapChoose.css +0 -180
  297. package/src/web/components/form/location/common/mapChoose.jsx +0 -343
  298. package/src/web/components/form/location/common/mapView.jsx +0 -190
  299. package/src/web/components/form/location/common/propsConfig.js +0 -54
  300. package/src/web/components/form/location/common/selectModal.css +0 -44
  301. package/src/web/components/form/location/common/selectModal.jsx +0 -73
  302. package/src/web/components/form/location/common/useLocationInfo.js +0 -104
  303. package/src/web/components/form/location/components/LocationH5/index.css +0 -239
  304. package/src/web/components/form/location/components/LocationH5/location.h5.jsx +0 -413
  305. package/src/web/components/form/location/components/LocationPC/Header.jsx +0 -96
  306. package/src/web/components/form/location/components/LocationPC/index.css +0 -44
  307. package/src/web/components/form/location/components/LocationPC/location.PC.jsx +0 -332
  308. package/src/web/components/form/location/constants.js +0 -4
  309. package/src/web/components/form/location/index.css +0 -0
  310. package/src/web/components/form/location/index.jsx +0 -25
  311. package/src/web/components/form/radio/index.css +0 -12
  312. package/src/web/components/form/radio/index.tsx +0 -179
  313. package/src/web/components/form/renderDecorator.tsx +0 -28
  314. package/src/web/components/form/select/h5.tsx +0 -602
  315. package/src/web/components/form/select/index.css +0 -27
  316. package/src/web/components/form/select/index.tsx +0 -510
  317. package/src/web/components/form/select/region/index.ts +0 -152
  318. package/src/web/components/form/select/time.jsx +0 -145
  319. package/src/web/components/form/select/year.tsx +0 -172
  320. package/src/web/components/form/switch/index.tsx +0 -100
  321. package/src/web/components/form/textarea/index.css +0 -11
  322. package/src/web/components/form/textarea/index.tsx +0 -127
  323. package/src/web/components/form/tips/index.css +0 -4
  324. package/src/web/components/form/tips/index.tsx +0 -34
  325. package/src/web/components/form/types.d.ts +0 -12
  326. package/src/web/components/form/uploader/index.css +0 -118
  327. package/src/web/components/form/uploader/index.tsx +0 -65
  328. package/src/web/components/form/uploader/uploader.h5.tsx +0 -290
  329. package/src/web/components/form/uploader/uploader.pc.tsx +0 -287
  330. package/src/web/components/form/uploaderFile/fail.svg +0 -12
  331. package/src/web/components/form/uploaderFile/index.css +0 -422
  332. package/src/web/components/form/uploaderFile/index.jsx +0 -25
  333. package/src/web/components/form/uploaderFile/pending.svg +0 -18
  334. package/src/web/components/form/uploaderFile/success.svg +0 -12
  335. package/src/web/components/form/uploaderFile/uploadFile.h5.tsx +0 -606
  336. package/src/web/components/form/uploaderFile/uploadFile.pc.tsx +0 -520
  337. package/src/web/components/graphicCard/index.css +0 -159
  338. package/src/web/components/graphicCard/index.tsx +0 -310
  339. package/src/web/components/image/image.tsx +0 -187
  340. package/src/web/components/image/index.css +0 -54
  341. package/src/web/components/image/index.tsx +0 -121
  342. package/src/web/components/index.js +0 -95
  343. package/src/web/components/link/index.css +0 -8
  344. package/src/web/components/link/index.tsx +0 -119
  345. package/src/web/components/listView/arrow-right-line.svg +0 -3
  346. package/src/web/components/listView/index.css +0 -143
  347. package/src/web/components/listView/index.tsx +0 -346
  348. package/src/web/components/listView/interface.ts +0 -98
  349. package/src/web/components/lottery/index.css +0 -333
  350. package/src/web/components/lottery/index.tsx +0 -567
  351. package/src/web/components/lottery/lotteryUtil.ts +0 -130
  352. package/src/web/components/modal/index.tsx +0 -60
  353. package/src/web/components/navLayout/index.css +0 -332
  354. package/src/web/components/navLayout/index.tsx +0 -247
  355. package/src/web/components/navigationBar/chevron-right--double.svg +0 -3
  356. package/src/web/components/navigationBar/common.tsx +0 -198
  357. package/src/web/components/navigationBar/h5Menu.tsx +0 -179
  358. package/src/web/components/navigationBar/horizontalMenu.tsx +0 -200
  359. package/src/web/components/navigationBar/index.css +0 -762
  360. package/src/web/components/navigationBar/index.tsx +0 -230
  361. package/src/web/components/navigationBar/type.d.ts +0 -111
  362. package/src/web/components/navigationBar/verticalMenu.tsx +0 -81
  363. package/src/web/components/phone/index.css +0 -0
  364. package/src/web/components/phone/index.tsx +0 -22
  365. package/src/web/components/phoneCode/index.css +0 -0
  366. package/src/web/components/phoneCode/index.tsx +0 -22
  367. package/src/web/components/picker/datePicker.tsx +0 -48
  368. package/src/web/components/picker/picker.tsx +0 -59
  369. package/src/web/components/picker/timePicker.tsx +0 -56
  370. package/src/web/components/richText/const.ts +0 -3
  371. package/src/web/components/richText/index.css +0 -93
  372. package/src/web/components/richText/index.jsx +0 -473
  373. package/src/web/components/richTextView/index.css +0 -63
  374. package/src/web/components/richTextView/index.tsx +0 -63
  375. package/src/web/components/scrollView/index.tsx +0 -148
  376. package/src/web/components/share/index.css +0 -0
  377. package/src/web/components/share/index.tsx +0 -38
  378. package/src/web/components/slot/index.tsx +0 -19
  379. package/src/web/components/swiper/index.css +0 -106
  380. package/src/web/components/swiper/index.tsx +0 -291
  381. package/src/web/components/tabs/index.css +0 -64
  382. package/src/web/components/tabs/index.tsx +0 -35
  383. package/src/web/components/tabs/tabs.h5.tsx +0 -84
  384. package/src/web/components/tabs/tabs.pc.tsx +0 -74
  385. package/src/web/components/text/index.css +0 -26
  386. package/src/web/components/text/index.tsx +0 -60
  387. package/src/web/components/uploaderFileView/index.css +0 -11
  388. package/src/web/components/uploaderFileView/index.jsx +0 -84
  389. package/src/web/components/uploaderView/index.css +0 -31
  390. package/src/web/components/uploaderView/index.tsx +0 -92
  391. package/src/web/components/userInfo/index.css +0 -0
  392. package/src/web/components/userInfo/index.tsx +0 -30
  393. package/src/web/components/wedaVideo/index.css +0 -42
  394. package/src/web/components/wedaVideo/index.tsx +0 -208
  395. package/src/web/index.js +0 -4
  396. package/src/web/types.d.ts +0 -21
  397. package/src/web/utils/classnames.js +0 -39
  398. package/src/web/utils/constant.ts +0 -23
  399. package/src/web/utils/debounce.js +0 -98
  400. package/src/web/utils/events.js +0 -2
  401. package/src/web/utils/getLocalCounter.js +0 -5
  402. package/src/web/utils/isObjectEqual.js +0 -15
  403. package/src/web/utils/loading-fallback.tsx +0 -2
  404. package/src/web/utils/lodash.ts +0 -2
  405. package/src/web/utils/platform.js +0 -156
  406. package/src/web/utils/tcb.js +0 -86
  407. package/src/web/utils/tmap.js +0 -4
  408. package/src/web/utils/useSetState.ts +0 -18
  409. package/src/web/utils/useSyncValue.ts +0 -17
  410. package/src/web/utils/weui.js +0 -3
  411. package/src/web/weda-ui.css +0 -86
@@ -1,416 +0,0 @@
1
- /* weda_calendar */
2
-
3
- .weda-calendar {
4
- font-size: 14px;
5
- }
6
-
7
- /* pc 日历样式 start */
8
- .weda-calendar.weda-calendar-pc {
9
- background: #ffffff;
10
- border: 0.5px solid #dcdcdc;
11
- box-sizing: border-box;
12
- box-shadow: 0px 3px 14px 2px rgba(0, 0, 0, 0.05),
13
- 0px 8px 10px 1px rgba(0, 0, 0, 0.06), 0px 5px 5px -3px rgba(0, 0, 0, 0.1);
14
- border-radius: 3px;
15
- min-width: 560px;
16
- }
17
-
18
- .weda-calendar-pc .weda-calendar__control_h5 {
19
- display: none;
20
- }
21
-
22
- .weda-calendar-pc .weda-calendar__control_pc {
23
- padding: 32px;
24
- display: flex;
25
- display: -webkit-box;
26
- display: -ms-flexbox;
27
- -webkit-box-pack: end;
28
- -ms-flex-pack: end;
29
- justify-content: flex-end;
30
- -webkit-box-align: center;
31
- -ms-flex-align: center;
32
- align-items: center;
33
- }
34
-
35
- .weda-calendar-pc .weda-calendar__control-section {
36
- display: flex;
37
- display: -webkit-box;
38
- display: -ms-flexbox;
39
- -webkit-box-pack: end;
40
- -ms-flex-pack: end;
41
- justify-content: flex-end;
42
- -webkit-box-align: center;
43
- -ms-flex-align: center;
44
- align-items: center;
45
- height: 100%;
46
- margin-right: 16px;
47
- }
48
-
49
- .weda-calendar-pc .weda-calendar__control-section:last-child {
50
- margin-right: 0;
51
- }
52
-
53
- .weda-calendar-pc
54
- .weda-calendar__control-section
55
- .weda-calendar__control-section-cell {
56
- height: 100%;
57
- margin-right: 8px;
58
- }
59
-
60
- .weda-calendar-pc
61
- .weda-calendar__control-section
62
- .weda-calendar__control-section-cell:last-child {
63
- margin-right: 0;
64
- }
65
-
66
- .weda-calendar-pc .weda-calendar__control_pc .weda-calendar__current-date {
67
- font-size: 1em;
68
- line-height: 1.57142em;
69
- color: rgba(0, 0, 0, 0.9);
70
- }
71
-
72
- .weda-calendar-pc .weda-calendar__panel {
73
- position: relative;
74
- padding: 0 32px 32px 32px;
75
- width: 100%;
76
- box-sizing: border-box;
77
- }
78
-
79
- .weda-calendar .weda-calendar__table {
80
- font-size: inherit;
81
- border-collapse: collapse;
82
- border-spacing: 0;
83
- width: 100%;
84
- height: 100%;
85
- }
86
-
87
- .weda-calendar .weda-calendar__table .weda-calendar__table-head {
88
- display: block;
89
- width: 100%;
90
- margin-bottom: 8px;
91
- box-sizing: border-box;
92
- }
93
-
94
- .weda-calendar .weda-calendar__table .weda-calendar__table-head-row,
95
- .weda-calendar .weda-calendar__table .weda-calendar__table-body-row {
96
- display: flex;
97
- display: -webkit-box;
98
- display: -ms-flexbox;
99
- width: 100%;
100
- padding-bottom: 0;
101
- }
102
-
103
- .weda-calendar .weda-calendar__table .weda-calendar__table-head-cell {
104
- cursor: default;
105
- -webkit-box-flex: 1;
106
- -ms-flex: 1;
107
- flex: 1;
108
- display: -webkit-box;
109
- display: -ms-flexbox;
110
- display: flex;
111
- -webkit-box-pack: end;
112
- -ms-flex-pack: end;
113
- justify-content: flex-end;
114
- height: 100%;
115
- padding: 0;
116
- font-size: 1em;
117
- line-height: 1.57142em;
118
- color: rgba(0, 0, 0, 0.6);
119
- margin-right: 12px;
120
- position: relative;
121
- }
122
-
123
- .weda-calendar .weda-calendar__table .weda-calendar__table-head-cell:last-child,
124
- .weda-calendar
125
- .weda-calendar__table
126
- .weda-calendar__table-body-cell:last-child {
127
- margin-right: 0;
128
- }
129
-
130
- .weda-calendar .weda-calendar__table .weda-calendar__table-body {
131
- width: 100%;
132
- }
133
-
134
- .weda-calendar .weda-calendar__table .weda-calendar__table-body-cell {
135
- flex: 1;
136
- -webkit-box-flex: 1;
137
- -ms-flex: 1;
138
- border-top: 1px solid #e7e7e7;
139
- padding: 0;
140
- height: 87.4px;
141
- display: flex;
142
- display: -webkit-box;
143
- display: -ms-flexbox;
144
- -webkit-box-orient: vertical;
145
- -webkit-box-direction: normal;
146
- -ms-flex-direction: column;
147
- flex-direction: column;
148
- -webkit-box-align: end;
149
- -ms-flex-align: end;
150
- align-items: flex-end;
151
- margin-left: 0;
152
- margin-right: 12px;
153
- position: relative;
154
- justify-content: flex-start;
155
- color: rgba(0, 0, 0, 0.26);
156
- }
157
-
158
- .weda-calendar
159
- .weda-calendar__table
160
- .weda-calendar__table-body-cell.is-disabled,
161
- .weda-calendar
162
- .weda-calendar__table
163
- .weda-calendar__table-body-cell.is-invalid {
164
- cursor: not-allowed;
165
- }
166
-
167
- .weda-calendar
168
- .weda-calendar__table
169
- .weda-calendar__table-body-cell.is-invalid {
170
- background: #f3f3f3;
171
- }
172
-
173
- .weda-calendar .weda-calendar__table .weda-calendar__table-body-cell.is-now {
174
- border-top-color: #0052d9;
175
- background: #ecf2fe;
176
- }
177
-
178
- .weda-calendar .weda-calendar__table .weda-calendar__table-body-cell-value {
179
- font-size: 1em;
180
- font-weight: 400;
181
- line-height: 1.57142em;
182
- color: rgba(0, 0, 0, 0.9);
183
- margin-top: 3px;
184
- position: relative;
185
- }
186
-
187
- .weda-calendar
188
- .weda-calendar__table
189
- .weda-calendar__table-body-cell.is-disabled
190
- .weda-calendar__table-body-cell-value {
191
- color: rgba(0, 0, 0, 0.26);
192
- }
193
-
194
- .weda-calendar
195
- .weda-calendar__table
196
- .weda-calendar__table-body-cell
197
- .weda-calendar__table-body-cell-marked {
198
- position: absolute;
199
- width: 6px;
200
- height: 6px;
201
- border-radius: 50%;
202
- left: 50%;
203
- transform: translate(-50%);
204
- bottom: -10px;
205
- }
206
-
207
- /* pc 日历样式 end */
208
-
209
- /* h5 日历样式 start */
210
-
211
- .weda-calendar.weda-calendar-h5 {
212
- background: #ffffff;
213
- width: 100%;
214
- opacity: 0.9;
215
- }
216
-
217
- .weda-calendar-h5 .weda-calendar__control_pc {
218
- display: none;
219
- }
220
-
221
- .weda-calendar__control_h5 {
222
- width: 100%;
223
- box-sizing: border-box;
224
- padding: 16px 16px 0 16px;
225
- position: relative;
226
- text-align: center;
227
- }
228
- .weda-calendar__control_h5 .wedatea2td-icon-arrowleft--line,
229
- .weda-calendar__control_h5 .wedatea2td-icon-arrowright--line {
230
- vertical-align: middle;
231
- background-repeat: no-repeat;
232
- background-size: contain;
233
- background-position: center;
234
- }
235
-
236
- .weda-calendar__control_h5
237
- .weda-calendar_prevMonth.wedatea2td-icon-arrowleft--line,
238
- .weda-calendar__control_h5
239
- .weda-calendar_nextMonth.wedatea2td-icon-arrowright--line {
240
- position: absolute;
241
- top: 17px;
242
- width: 1.42857em;
243
- height: 1.42857em;
244
- }
245
-
246
- .weda-calendar__control_h5
247
- .weda-calendar_prevMonth.wedatea2td-icon-arrowleft--line {
248
- left: 16px;
249
- }
250
- .weda-calendar__control_h5
251
- .weda-calendar_nextMonth.wedatea2td-icon-arrowright--line {
252
- right: 16px;
253
- }
254
-
255
- .weda-calendar__control_h5 .weda-calendar__current-date {
256
- font-size: 1em;
257
- line-height: 1.57142em;
258
- font-weight: bold;
259
- }
260
-
261
- .weda-calendar-h5 .weda-calendar__panel {
262
- height: 21.85714em;
263
- padding: 20px 16px 16px 16px;
264
- width: 100%;
265
- box-sizing: border-box;
266
- }
267
-
268
- .weda-calendar-h5 .weda-calendar__table {
269
- width: 100%;
270
- height: 100%;
271
- display: -webkit-box;
272
- display: -ms-flexbox;
273
- display: flex;
274
- -webkit-box-orient: vertical;
275
- -webkit-box-direction: normal;
276
- -ms-flex-direction: column;
277
- flex-direction: column;
278
- justify-self: start;
279
- -webkit-box-align: start;
280
- -ms-flex-align: start;
281
- align-items: flex-start;
282
- }
283
-
284
- .weda-calendar-h5 .weda-calendar__table .weda-calendar__table-head {
285
- margin-bottom: 0;
286
- }
287
-
288
- .weda-calendar-h5 .weda-calendar__table .weda-calendar__table-head-cell {
289
- font-size: 0.85714em;
290
- line-height: 20px;
291
- width: 100%;
292
- height: 100%;
293
- margin: 0;
294
- -webkit-box-pack: center;
295
- -ms-flex-pack: center;
296
- justify-content: center;
297
- font-size: 0.85714em;
298
- line-height: 1.428571em;
299
- -webkit-box-sizing: border-box;
300
- box-sizing: border-box;
301
- }
302
-
303
- .weda-calendar-h5 .weda-calendar__table-body {
304
- display: -webkit-box;
305
- display: -ms-flexbox;
306
- display: flex;
307
- -webkit-box-orient: vertical;
308
- -webkit-box-direction: normal;
309
- -ms-flex-direction: column;
310
- flex-direction: column;
311
- justify-self: center;
312
- -webkit-box-align: center;
313
- -ms-flex-align: center;
314
- align-items: center;
315
- -webkit-box-flex: 1;
316
- -ms-flex: 1;
317
- flex: 1;
318
- }
319
-
320
- .weda-calendar-h5 .weda-calendar__table-body .weda-calendar__table-body-row {
321
- width: 100%;
322
- display: -webkit-box;
323
- display: -ms-flexbox;
324
- display: flex;
325
- flex: 1;
326
- }
327
-
328
- .weda-calendar-h5 .weda-calendar__table-body .weda-calendar__table-body-cell {
329
- width: 100%;
330
- height: 100%;
331
- margin: 0;
332
- border: none;
333
- -webkit-box-pack: center;
334
- -ms-flex-pack: center;
335
- justify-content: center;
336
- font-size: 0.85714em;
337
- line-height: 1.42857em;
338
- -webkit-box-sizing: border-box;
339
- box-sizing: border-box;
340
- -webkit-box-pack: center;
341
- -ms-flex-pack: center;
342
- justify-content: center;
343
- -webkit-box-align: center;
344
- -ms-flex-align: center;
345
- align-items: center;
346
- flex-direction: row;
347
- }
348
-
349
- .weda-calendar-h5 .weda-calendar__table .weda-calendar__table-body-cell.is-now {
350
- border: none;
351
- background: transparent;
352
- }
353
-
354
- .weda-calendar-h5
355
- .weda-calendar__table-body
356
- .weda-calendar__table-body-cell-value {
357
- font-size: 1em;
358
- text-align: center;
359
- border-radius: 50%;
360
- width: 40px;
361
- line-height: 2.85714em;
362
- margin: 0;
363
- box-sizing: border-box;
364
- }
365
-
366
- .weda-calendar-h5
367
- .weda-calendar__table
368
- .weda-calendar__table-body-cell.is-now
369
- .weda-calendar__table-body-cell-value {
370
- color: #fff;
371
- }
372
-
373
- .weda-calendar-h5
374
- .weda-calendar__table
375
- .weda-calendar__table-body-cell.is-now
376
- .weda-calendar__table-body-cell-bg {
377
- position: absolute;
378
- width: 1.714285em;
379
- height: 1.714285em;
380
- background: #0052d9;
381
- border-radius: 100%;
382
- left: calc(50% - 0.85714em);
383
- top: calc(50% - 0.85714em);
384
- z-index: -1;
385
- }
386
-
387
- .weda-calendar-h5
388
- .weda-calendar__table
389
- .weda-calendar__table-body-cell
390
- .weda-calendar__table-body-cell-marked {
391
- width: 4px;
392
- height: 4px;
393
- top: calc(50% + 14px);
394
- }
395
-
396
- .weda-calendar-h5
397
- .weda-calendar__table
398
- .weda-calendar__table-body-cell.is-disabled
399
- .weda-calendar__table-body-cell-value {
400
- color: rgba(0, 0, 0, 0.6);
401
- }
402
-
403
- .weda-calendar-h5
404
- .weda-calendar__table
405
- .weda-calendar__table-body-cell.is-invalid {
406
- background: transparent;
407
- }
408
-
409
- .weda-calendar-h5
410
- .weda-calendar__table
411
- .weda-calendar__table-body-cell.is-invalid
412
- .weda-calendar__table-body-cell-value {
413
- color: #c5c5c5;
414
- }
415
-
416
- /* h5 日历样式 end */
@@ -1,312 +0,0 @@
1
- import React, { useState, useEffect, useMemo } from 'react';
2
- import { usePlatform } from '../../utils/platform';
3
- import { ConfigProvider, Select } from 'tea-component';
4
- import * as PropTypes from 'prop-types';
5
- import classNames from '../../utils/classnames';
6
- import dayjs from 'dayjs';
7
- import { createDateList } from './util';
8
- import './index.css';
9
-
10
- // 抽取配置常量
11
- const blockName = 'weda-calendar'; // 类名前缀
12
- const minYear = 1970; // 最早选择年份
13
- const firstDayOfWeek = 1; // 日历从周一开始
14
- const format = 'YYYY-MM-DD';
15
- const controlSectionSize = 'auto'; // 操作栏控件尺寸
16
- const week = ['一', '二', '三', '四', '五', '六', '日']; // 表头日历星期展示方式
17
- const isShowWeekend = true; // 是否显示周末
18
-
19
- export default function Calendar({
20
- className,
21
- style,
22
- initVisible,
23
- initValue,
24
- configData = [],
25
- }) {
26
- // 'h5' || 'pc'
27
- const platform = usePlatform();
28
- const visible = typeof initVisible === 'boolean' ? initVisible : true;
29
- // dayjs.Dayjs
30
- const [value, setValue] = useState(dayjs());
31
- // number
32
- const [year, setYear] = useState(dayjs().year());
33
- const [month, setMonth] = useState(parseInt(dayjs().format('M'), 10));
34
-
35
- useEffect(() => {
36
- if (initValue !== null && initValue !== '') {
37
- setValue(dayjs(initValue));
38
- setYear(dayjs(initValue).year());
39
- setMonth(parseInt(dayjs(initValue).format('M'), 10));
40
- }
41
- }, [initValue]);
42
-
43
- // 年份、月份 Select 选择框选项
44
- const [yearSelectList, monthSelectList] = useMemo(() => {
45
- const yearList = [];
46
- const monthList = [];
47
-
48
- // 年列表
49
- const yearBegin = Math.min(minYear, year - 50);
50
- const yearEnd = Math.max(minYear, year + 50); // parseInt(dayjs().format('YYYY-MM-DD'));
51
-
52
- for (let i = yearBegin; i <= yearEnd; i++) {
53
- yearList.push({
54
- value: i,
55
- });
56
- }
57
- // 月列表
58
- for (let i = 1; i <= 12; i++) {
59
- monthList.push({
60
- value: i,
61
- });
62
- }
63
-
64
- return [yearList, monthList];
65
- }, [year, month]);
66
-
67
- // 匹配数据
68
- const _dateList = (configList) => {
69
- const _map = new Map();
70
- const configArr = JSON.parse(JSON.stringify(configData));
71
- // 补日期的零
72
- configArr &&
73
- configArr.length &&
74
- configArr.map((item) => {
75
- if (item.matchDate === '' || item.matchDate === undefined) return;
76
- const date = item.matchDate.split('-');
77
- const day = date[2].split('');
78
- if (day.length === 1) {
79
- date[2] = `0${date[2]}`;
80
- item.matchDate = date.join('-');
81
- }
82
- });
83
- for (const item of configArr) {
84
- _map.set(item.matchDate, item);
85
- }
86
- return configList.map((item) => {
87
- return item.reduce((res, i) => {
88
- if (_map.has(i.formattedDate)) {
89
- const _disabled = _map.get(i.formattedDate)['disabled'];
90
- const _marked = _map.get(i.formattedDate)['marked'];
91
- i['disabled'] =
92
- _disabled !== undefined ? JSON.parse(_disabled) : false;
93
- i['marked'] = _marked;
94
- }
95
- res.push(i);
96
- return res;
97
- }, []);
98
- });
99
- };
100
-
101
- // 日历单元格数据
102
- const dateList = useMemo(
103
- () => _dateList(createDateList(year, month, firstDayOfWeek, value, format)),
104
- [year, month, firstDayOfWeek, format, value, configData]
105
- );
106
-
107
- // 表头数组
108
- const colHeaderList = useMemo(() => {
109
- const weekTextArr = week;
110
- const list = [];
111
- for (let i = firstDayOfWeek; i <= 7; i++) {
112
- if (!isShowWeekend && i > 5) {
113
- break;
114
- }
115
- list.push({
116
- day: i,
117
- text: weekTextArr[i - 1],
118
- });
119
- }
120
- if (firstDayOfWeek > 1) {
121
- for (let i = 1; i < firstDayOfWeek; i++) {
122
- if (!isShowWeekend && i > 5) {
123
- break;
124
- }
125
- list.push({
126
- day: i,
127
- text: weekTextArr[i - 1],
128
- });
129
- }
130
- }
131
- return list;
132
- }, [firstDayOfWeek, isShowWeekend, week]);
133
-
134
- // 补零
135
- // const fix0 = (num) => {
136
- // return num < 10 ? `0${num}` : num;
137
- // };
138
- const yearSelectOptions = () => {
139
- return yearSelectList.map((item) => ({
140
- text: `${item.value} 年`,
141
- value: `${item.value}`,
142
- }));
143
- };
144
-
145
- const monthSelectOptions = () => {
146
- return monthSelectList.map((item) => ({
147
- text: `${item.value} 月`,
148
- value: `${item.value}`,
149
- }));
150
- };
151
-
152
- return (
153
- <div
154
- data-testid="weda-calendar"
155
- className={classNames(
156
- blockName,
157
- 'weda-ui',
158
- platform === 'h5' ? `${blockName}-h5` : `${blockName}-pc`,
159
- {
160
- [className]: className,
161
- }
162
- )}
163
- style={style}
164
- >
165
- {/* 操作部分 PC*/}
166
- <ConfigProvider classPrefix="wedatea2td">
167
- <div
168
- className={blockName + '__control_pc'}
169
- data-testid="weda-calendar-control-pc"
170
- >
171
- {visible ? (
172
- <div className={blockName + '__control-section'}>
173
- {/* 年份选择框 */}
174
- <div className={blockName + '__control-section-cell'}>
175
- <Select
176
- appearance="button"
177
- size={controlSectionSize}
178
- value={String(year)}
179
- options={yearSelectOptions()}
180
- onChange={(selectYear) => setYear(parseInt(selectYear))}
181
- />
182
- </div>
183
- {/* 月份选择框 */}
184
- <div className={blockName + '__control-section-cell'}>
185
- <Select
186
- appearance="button"
187
- size={controlSectionSize}
188
- value={String(month)}
189
- options={monthSelectOptions()}
190
- onChange={(selectMonth) => setMonth(parseInt(selectMonth))}
191
- />
192
- </div>
193
- </div>
194
- ) : (
195
- <div
196
- className={`${blockName}__current-date`}
197
- >{`${year} 年 ${month} 月`}</div>
198
- )}
199
- </div>
200
- </ConfigProvider>
201
-
202
- {/* H5 */}
203
- <div
204
- className={blockName + '__control_h5'}
205
- data-testid="weda-calendar-control-h5"
206
- >
207
- {visible && (
208
- <div
209
- className={blockName + '_prevMonth wedatea2td-icon-arrowleft--line'}
210
- onClick={() => {
211
- // 上一个月
212
- setYear(month === 1 ? year - 1 : year);
213
- setMonth(month === 1 ? 12 : month - 1);
214
- }}
215
- ></div>
216
- )}
217
- <div
218
- className={`${blockName}__current-date`}
219
- >{`${year}年${month}月`}</div>
220
- {visible && (
221
- <div
222
- className={
223
- blockName + '_nextMonth wedatea2td-icon-arrowright--line'
224
- }
225
- onClick={() => {
226
- // 下一个月
227
- setYear(month === 12 ? year + 1 : year);
228
- setMonth(month === 12 ? 1 : month + 1);
229
- }}
230
- ></div>
231
- )}
232
- </div>
233
-
234
- {/* 主体部分 */}
235
- <div className={blockName + '__panel'}>
236
- <table className={blockName + '__table'}>
237
- {/* 表头部分 */}
238
- {colHeaderList.length > 0 && (
239
- <thead className={blockName + '__table-head'}>
240
- <tr className={blockName + '__table-head-row'}>
241
- {colHeaderList.map((item) => (
242
- <th
243
- key={item.day}
244
- className={blockName + '__table-head-cell'}
245
- >
246
- {item.text}
247
- </th>
248
- ))}
249
- </tr>
250
- </thead>
251
- )}
252
- <tbody className={blockName + '__table-body'}>
253
- {dateList.map((dateRow, dateRowIndex) => (
254
- <tr
255
- key={String(dateRowIndex)}
256
- className={blockName + '__table-body-row'}
257
- >
258
- {dateRow.map((dateCell, dateCellIndex) => {
259
- if (!isShowWeekend && [6, 7].indexOf(dateCell.day) >= 0)
260
- return null;
261
- const isNow =
262
- (dateCell.formattedDate === dayjs().format('YYYY-MM-DD') &&
263
- 'is-now') ||
264
- '';
265
- return (
266
- <td
267
- key={String(dateCellIndex)}
268
- className={classNames(
269
- `${blockName}__table-body-cell`,
270
- isNow,
271
- dateCell.isCurrent ? 'is-checked' : '',
272
- dateCell.belongTo !== 0 ? 'is-disabled' : '',
273
- dateCell.disabled ? 'is-invalid' : ''
274
- )}
275
- >
276
- <div className={blockName + '__table-body-cell-value'}>
277
- {dateCell.date.getDate()}
278
- <div
279
- className={`${blockName}__table-body-cell-bg`}
280
- ></div>
281
- {dateCell.marked && dateCell.marked !== '' && (
282
- <div
283
- style={{ backgroundColor: `${dateCell.marked}` }}
284
- className={blockName + '__table-body-cell-marked'}
285
- data-testid="weda-calendar-cell-marked"
286
- ></div>
287
- )}
288
- </div>
289
- </td>
290
- );
291
- })}
292
- </tr>
293
- ))}
294
- </tbody>
295
- </table>
296
- </div>
297
- </div>
298
- );
299
- }
300
-
301
- Calendar.propTypes = {
302
- className: PropTypes.string,
303
- style: PropTypes.object,
304
- /** 传入日期 '2021-01-01' */
305
- initValue: PropTypes.string,
306
- /** 平台 'h5' || 'pc'*/
307
- platform: PropTypes.string,
308
- /** 时间控制器 */
309
- initVisible: PropTypes.bool,
310
- /** 展示配置 */
311
- configData: PropTypes.array,
312
- };