@cloudbase/weda-ui 0.2.14 → 0.2.17

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 (400) hide show
  1. package/README.md +41 -167
  2. package/package.json +51 -19
  3. package/src/configs/components/calendar.json +75 -0
  4. package/src/configs/components/carousel.json +273 -0
  5. package/src/configs/components/chart/bar.json +711 -0
  6. package/src/configs/components/chart/line.json +666 -0
  7. package/src/configs/components/chart/pie.json +487 -0
  8. package/src/configs/components/chart/statisticsCard.json +331 -0
  9. package/src/configs/components/dataView.json +139 -0
  10. package/src/configs/components/form/location.json +152 -0
  11. package/src/configs/components/form/uploaderFile.json +2 -1
  12. package/src/configs/components/graphicCard.json +399 -0
  13. package/src/configs/components/image.json +4 -0
  14. package/src/configs/components/link.json +2 -2
  15. package/src/configs/components/listView.json +231 -0
  16. package/src/configs/components/navLayout.json +350 -0
  17. package/src/configs/components/swiper.json +3 -3
  18. package/src/configs/index.js +23 -0
  19. package/src/mp/components/button/index.js +12 -13
  20. package/src/mp/components/button/index.wxml +1 -1
  21. package/src/{web/wedatheme/src/styles/assets → mp/components/calendar}/arrowright--line.svg +3 -4
  22. package/src/mp/components/calendar/index.js +238 -0
  23. package/src/mp/components/calendar/index.json +4 -0
  24. package/src/mp/components/calendar/index.wxml +37 -0
  25. package/src/mp/components/calendar/index.wxss +178 -0
  26. package/src/mp/components/carousel/index.js +88 -0
  27. package/src/mp/components/carousel/index.json +7 -0
  28. package/src/mp/components/carousel/index.wxml +6 -0
  29. package/src/mp/components/chart/bar/index.js +254 -0
  30. package/src/mp/components/chart/bar/index.json +6 -0
  31. package/src/mp/components/chart/bar/index.wxml +3 -0
  32. package/src/mp/components/chart/bar/index.wxss +9 -0
  33. package/src/mp/components/chart/common/config/bar.js +50 -0
  34. package/src/mp/components/chart/common/config/global.js +16 -0
  35. package/src/mp/components/chart/common/config/line.js +48 -0
  36. package/src/mp/components/chart/common/config/pie.js +36 -0
  37. package/src/mp/components/chart/common/core/eChartBar.js +262 -0
  38. package/src/mp/components/chart/common/core/eChartBase.js +371 -0
  39. package/src/mp/components/chart/common/core/eChartLine.js +228 -0
  40. package/src/mp/components/chart/common/core/eChartPie.js +166 -0
  41. package/src/mp/components/chart/common/lib/echarts.min.js +18 -0
  42. package/src/mp/components/chart/ec-canvas/ec-canvas.js +277 -0
  43. package/src/mp/components/chart/ec-canvas/ec-canvas.json +4 -0
  44. package/src/mp/components/chart/ec-canvas/ec-canvas.wxml +4 -0
  45. package/src/mp/components/chart/ec-canvas/ec-canvas.wxss +4 -0
  46. package/src/mp/components/chart/ec-canvas/wx-canvas.js +107 -0
  47. package/src/mp/components/chart/line/index.js +243 -0
  48. package/src/mp/components/chart/line/index.json +6 -0
  49. package/src/mp/components/chart/line/index.wxml +3 -0
  50. package/src/mp/components/chart/line/index.wxss +9 -0
  51. package/src/mp/components/chart/pie/index.js +178 -0
  52. package/src/mp/components/chart/pie/index.json +6 -0
  53. package/src/mp/components/chart/pie/index.wxml +4 -0
  54. package/src/mp/components/chart/pie/index.wxss +9 -0
  55. package/src/mp/components/chart/statisticsCard/index.js +226 -0
  56. package/src/mp/components/chart/statisticsCard/index.json +4 -0
  57. package/src/mp/components/chart/statisticsCard/index.wxml +9 -0
  58. package/src/mp/components/chart/statisticsCard/index.wxss +45 -0
  59. package/src/mp/components/container/index.js +4 -0
  60. package/src/mp/components/dataView/index.js +34 -0
  61. package/src/mp/components/dataView/index.json +7 -0
  62. package/src/mp/components/dataView/index.wxml +15 -0
  63. package/src/{web/wedatheme/src/styles/theme/_icon.scss → mp/components/dataView/index.wxss} +0 -0
  64. package/src/mp/components/form/location/components/mapChoose/index.js +201 -0
  65. package/src/mp/components/form/location/components/mapChoose/index.json +4 -0
  66. package/src/mp/components/form/location/components/mapChoose/index.wxml +42 -0
  67. package/src/mp/components/form/location/components/mapChoose/index.wxss +188 -0
  68. package/src/mp/components/form/location/index.js +341 -0
  69. package/src/mp/components/form/location/index.json +6 -0
  70. package/src/mp/components/form/location/index.wxml +25 -0
  71. package/src/mp/components/form/location/index.wxss +91 -0
  72. package/src/mp/components/form/radio/index.js +5 -0
  73. package/src/mp/components/form/select/index.wxml +4 -4
  74. package/src/mp/components/form/textarea/index.wxml +6 -5
  75. package/src/mp/components/form/uploader/index.js +64 -40
  76. package/src/mp/components/form/uploader/index.wxml +15 -3
  77. package/src/mp/components/form/uploaderFile/index.js +102 -27
  78. package/src/mp/components/graphicCard/chevron-right.svg +3 -0
  79. package/src/mp/components/graphicCard/index.js +203 -0
  80. package/src/mp/components/graphicCard/index.json +4 -0
  81. package/src/mp/components/graphicCard/index.wxml +29 -0
  82. package/src/mp/components/graphicCard/index.wxss +157 -0
  83. package/src/mp/components/image/index.js +53 -52
  84. package/src/mp/components/internals/listView/arrow-right-line.svg +3 -0
  85. package/src/mp/components/internals/listView/index.js +286 -0
  86. package/src/mp/components/internals/listView/index.json +4 -0
  87. package/src/mp/components/internals/listView/index.wxml +40 -0
  88. package/src/mp/components/internals/listView/index.wxss +150 -0
  89. package/src/mp/components/internals/listView/more-line.svg +3 -0
  90. package/src/mp/components/listView/arrow-right-line.svg +3 -0
  91. package/src/mp/components/listView/index.js +279 -0
  92. package/src/mp/components/listView/index.json +4 -0
  93. package/src/mp/components/listView/index.wxml +40 -0
  94. package/src/mp/components/listView/index.wxss +150 -0
  95. package/src/mp/components/listView/more-line.svg +3 -0
  96. package/src/mp/components/navLayout/index.js +123 -0
  97. package/src/mp/components/navLayout/index.json +7 -0
  98. package/src/mp/components/navLayout/index.wxml +25 -0
  99. package/src/mp/components/navLayout/index.wxss +1193 -0
  100. package/src/mp/components/swiper/index.wxml +2 -0
  101. package/src/mp/components/text/index.wxss +6 -6
  102. package/src/mp/index.json +12 -1
  103. package/src/mp/utils/debounce.js +133 -0
  104. package/src/mp/utils/dr_square_point.js +25 -0
  105. package/src/mp/utils/platform.js +15 -0
  106. package/src/mp/utils/qqmap-wx-jssdk1.2/qqmap-wx-jssdk.js +1336 -0
  107. package/src/mp/utils/spark-md5.js +776 -0
  108. package/src/mp/utils/tcb.js +18 -0
  109. package/src/setupTests.js +2 -1
  110. package/src/web/components/button/index.tsx +1 -1
  111. package/src/web/components/calendar/index.css +382 -0
  112. package/src/web/components/calendar/index.jsx +312 -0
  113. package/src/web/components/calendar/util.js +90 -0
  114. package/src/web/components/carousel/index.css +119 -0
  115. package/src/web/components/carousel/index.tsx +417 -0
  116. package/src/web/components/chart/bar/index.tsx +139 -0
  117. package/src/web/components/chart/common/config/bar.js +49 -0
  118. package/src/web/components/chart/common/config/global.js +16 -0
  119. package/src/web/components/chart/common/config/line.js +50 -0
  120. package/src/web/components/chart/common/config/pie.js +37 -0
  121. package/src/web/components/chart/common/core/eChartBar.js +264 -0
  122. package/src/web/components/chart/common/core/eChartBase.ts +379 -0
  123. package/src/web/components/chart/common/core/eChartLine.js +229 -0
  124. package/src/web/components/chart/common/core/eChartPie.js +170 -0
  125. package/src/web/components/chart/common/core/type.ts +34 -0
  126. package/src/web/components/chart/common/echart.css +106 -0
  127. package/src/web/components/chart/common/echarts.ts +33 -0
  128. package/src/web/components/chart/common/useChart.tsx +69 -0
  129. package/src/web/components/chart/line/index.tsx +135 -0
  130. package/src/web/components/chart/pie/index.tsx +99 -0
  131. package/src/web/components/chart/statisticsCard/index.css +62 -0
  132. package/src/web/components/chart/statisticsCard/index.tsx +286 -0
  133. package/src/web/components/chart/statisticsCard/interface.ts +14 -0
  134. package/src/web/components/dataView/index.tsx +20 -0
  135. package/src/web/components/dataView/interface.ts +6 -0
  136. package/src/web/components/form/input/index.css +5 -3
  137. package/src/web/components/form/input/index.tsx +1 -0
  138. package/src/web/components/form/location/common/mapChoose.css +178 -0
  139. package/src/web/components/form/location/common/mapChoose.jsx +343 -0
  140. package/src/web/components/form/location/common/mapView.jsx +190 -0
  141. package/src/web/components/form/location/common/propsConfig.js +54 -0
  142. package/src/web/components/form/location/common/selectModal.css +44 -0
  143. package/src/web/components/form/location/common/selectModal.jsx +82 -0
  144. package/src/web/components/form/location/common/useLocationInfo.js +100 -0
  145. package/src/web/components/form/location/components/LocationH5/index.css +243 -0
  146. package/src/web/components/form/location/components/LocationH5/location.h5.jsx +403 -0
  147. package/src/web/components/form/location/components/LocationPC/Header.jsx +109 -0
  148. package/src/web/components/form/location/components/LocationPC/index.css +44 -0
  149. package/src/web/components/form/location/components/LocationPC/location.PC.jsx +323 -0
  150. package/src/web/components/form/location/constants.js +4 -0
  151. package/src/web/{wedatheme/src/styles/theme/_timeline.scss → components/form/location/index.css} +0 -0
  152. package/src/web/components/form/location/index.jsx +25 -0
  153. package/src/web/components/form/select/h5.tsx +3 -1
  154. package/src/web/components/form/select/time.jsx +1 -0
  155. package/src/web/components/form/uploader/uploader.h5.tsx +10 -2
  156. package/src/web/components/form/uploader/uploader.pc.tsx +4 -3
  157. package/src/web/components/form/uploaderFile/uploadFile.h5.tsx +119 -106
  158. package/src/web/components/form/uploaderFile/uploadFile.pc.tsx +3 -6
  159. package/src/web/components/graphicCard/index.css +159 -0
  160. package/src/web/components/graphicCard/index.tsx +310 -0
  161. package/src/web/components/image/image.tsx +107 -94
  162. package/src/web/components/image/index.tsx +1 -1
  163. package/src/web/components/index.js +18 -3
  164. package/src/web/components/listView/arrow-right-line.svg +3 -0
  165. package/src/web/components/listView/index.css +139 -0
  166. package/src/web/components/listView/index.tsx +354 -0
  167. package/src/web/components/listView/interface.ts +98 -0
  168. package/src/web/components/navLayout/index.css +332 -0
  169. package/src/web/components/navLayout/index.tsx +247 -0
  170. package/src/web/components/swiper/index.css +4 -0
  171. package/src/web/components/swiper/index.tsx +9 -4
  172. package/src/web/components/tabs/index.tsx +2 -2
  173. package/src/web/components/tabs/tabs.h5.tsx +7 -4
  174. package/src/web/components/uploaderFileView/index.css +9 -9
  175. package/src/web/components/uploaderFileView/index.jsx +34 -25
  176. package/src/web/types.d.ts +15 -14
  177. package/src/web/utils/debounce.js +98 -0
  178. package/src/web/utils/platform.js +31 -0
  179. package/src/web/utils/tcb.js +23 -0
  180. package/src/web/utils/tmap.js +4 -0
  181. package/CHANGELOG.md +0 -240
  182. package/src/.DS_Store +0 -0
  183. package/src/configs/.DS_Store +0 -0
  184. package/src/mp/.gitignore +0 -10
  185. package/src/web/.DS_Store +0 -0
  186. package/src/web/wedatheme/.code.yml +0 -16
  187. package/src/web/wedatheme/.editorconfig +0 -9
  188. package/src/web/wedatheme/.eslintrc +0 -20
  189. package/src/web/wedatheme/.git +0 -1
  190. package/src/web/wedatheme/.gitignore +0 -5
  191. package/src/web/wedatheme/.npmrc +0 -1
  192. package/src/web/wedatheme/.orange-ci.yml +0 -55
  193. package/src/web/wedatheme/.vscode/extensions.json +0 -3
  194. package/src/web/wedatheme/.vscode/settings.json +0 -11
  195. package/src/web/wedatheme/README.md +0 -50
  196. package/src/web/wedatheme/i18n/README.md +0 -4
  197. package/src/web/wedatheme/i18n/translation/index.js +0 -10
  198. package/src/web/wedatheme/i18n/translation/zh.js +0 -15
  199. package/src/web/wedatheme/jsconfig.json +0 -15
  200. package/src/web/wedatheme/mock/app.js +0 -42
  201. package/src/web/wedatheme/mock/history-context.js +0 -8
  202. package/src/web/wedatheme/mock/index.js +0 -3
  203. package/src/web/wedatheme/mock/layout/AppLayout.jsx +0 -28
  204. package/src/web/wedatheme/mock/layout/MenuWithRouter.jsx +0 -50
  205. package/src/web/wedatheme/mock/layout/index.js +0 -1
  206. package/src/web/wedatheme/package-lock.json +0 -14335
  207. package/src/web/wedatheme/package.json +0 -61
  208. package/src/web/wedatheme/public/index.html +0 -19
  209. package/src/web/wedatheme/src/app.js +0 -22
  210. package/src/web/wedatheme/src/components/README.md +0 -4
  211. package/src/web/wedatheme/src/configs/menu.js +0 -9
  212. package/src/web/wedatheme/src/routes/wedatheme-index/Component.jsx +0 -402
  213. package/src/web/wedatheme/src/routes/wedatheme-index/Form.jsx +0 -729
  214. package/src/web/wedatheme/src/routes/wedatheme-index/FormItem.jsx +0 -18
  215. package/src/web/wedatheme/src/routes/wedatheme-index/WedathemeIndex.jsx +0 -1276
  216. package/src/web/wedatheme/src/routes/wedatheme-index/index.js +0 -1
  217. package/src/web/wedatheme/src/routes/weui2td/WEUI2TD.jsx +0 -3
  218. package/src/web/wedatheme/src/routes/weui2td/index.js +0 -1
  219. package/src/web/wedatheme/src/styles/_btn.scss +0 -24
  220. package/src/web/wedatheme/src/styles/_icon.scss +0 -653
  221. package/src/web/wedatheme/src/styles/_map.scss +0 -12
  222. package/src/web/wedatheme/src/styles/_middle.scss +0 -340
  223. package/src/web/wedatheme/src/styles/_upload.scss +0 -47
  224. package/src/web/wedatheme/src/styles/assets/alert-close.svg +0 -3
  225. package/src/web/wedatheme/src/styles/assets/and.svg +0 -12
  226. package/src/web/wedatheme/src/styles/assets/arrowdown--line.svg +0 -12
  227. package/src/web/wedatheme/src/styles/assets/arrowdown.svg +0 -12
  228. package/src/web/wedatheme/src/styles/assets/arrowleft--line.svg +0 -12
  229. package/src/web/wedatheme/src/styles/assets/arrowleft.svg +0 -12
  230. package/src/web/wedatheme/src/styles/assets/arrowright-blue--line.svg +0 -12
  231. package/src/web/wedatheme/src/styles/assets/arrowright.svg +0 -12
  232. package/src/web/wedatheme/src/styles/assets/arrowup--line.svg +0 -12
  233. package/src/web/wedatheme/src/styles/assets/arrowup.svg +0 -12
  234. package/src/web/wedatheme/src/styles/assets/bell-warning.svg +0 -3
  235. package/src/web/wedatheme/src/styles/assets/btnback.svg +0 -12
  236. package/src/web/wedatheme/src/styles/assets/calendar.svg +0 -12
  237. package/src/web/wedatheme/src/styles/assets/chartcolumn-1.svg +0 -12
  238. package/src/web/wedatheme/src/styles/assets/chartcolumn.svg +0 -12
  239. package/src/web/wedatheme/src/styles/assets/chartline-1.svg +0 -9
  240. package/src/web/wedatheme/src/styles/assets/chartline.svg +0 -9
  241. package/src/web/wedatheme/src/styles/assets/chartpie-1.svg +0 -12
  242. package/src/web/wedatheme/src/styles/assets/chartpie.svg +0 -12
  243. package/src/web/wedatheme/src/styles/assets/check-1.svg +0 -8
  244. package/src/web/wedatheme/src/styles/assets/check-2.svg +0 -1
  245. package/src/web/wedatheme/src/styles/assets/check.svg +0 -8
  246. package/src/web/wedatheme/src/styles/assets/close-1.svg +0 -8
  247. package/src/web/wedatheme/src/styles/assets/close.svg +0 -8
  248. package/src/web/wedatheme/src/styles/assets/consult.svg +0 -8
  249. package/src/web/wedatheme/src/styles/assets/convertip--blue.svg +0 -12
  250. package/src/web/wedatheme/src/styles/assets/convertip.svg +0 -12
  251. package/src/web/wedatheme/src/styles/assets/copy.svg +0 -12
  252. package/src/web/wedatheme/src/styles/assets/cur-active.svg +0 -12
  253. package/src/web/wedatheme/src/styles/assets/cur.svg +0 -12
  254. package/src/web/wedatheme/src/styles/assets/daily.svg +0 -13
  255. package/src/web/wedatheme/src/styles/assets/database.svg +0 -12
  256. package/src/web/wedatheme/src/styles/assets/datasheet.svg +0 -12
  257. package/src/web/wedatheme/src/styles/assets/delete-white.svg +0 -8
  258. package/src/web/wedatheme/src/styles/assets/delete.svg +0 -8
  259. package/src/web/wedatheme/src/styles/assets/detail.svg +0 -13
  260. package/src/web/wedatheme/src/styles/assets/dismiss.svg +0 -8
  261. package/src/web/wedatheme/src/styles/assets/download.svg +0 -12
  262. package/src/web/wedatheme/src/styles/assets/drop.svg +0 -15
  263. package/src/web/wedatheme/src/styles/assets/email-error.svg +0 -14
  264. package/src/web/wedatheme/src/styles/assets/email-warning.svg +0 -12
  265. package/src/web/wedatheme/src/styles/assets/email.svg +0 -14
  266. package/src/web/wedatheme/src/styles/assets/emailv.svg +0 -12
  267. package/src/web/wedatheme/src/styles/assets/error-1.svg +0 -8
  268. package/src/web/wedatheme/src/styles/assets/error-filled.svg +0 -3
  269. package/src/web/wedatheme/src/styles/assets/error.svg +0 -8
  270. package/src/web/wedatheme/src/styles/assets/externallink.svg +0 -12
  271. package/src/web/wedatheme/src/styles/assets/favorable.svg +0 -9
  272. package/src/web/wedatheme/src/styles/assets/filter.svg +0 -12
  273. package/src/web/wedatheme/src/styles/assets/firstpage.svg +0 -13
  274. package/src/web/wedatheme/src/styles/assets/folderclose.svg +0 -8
  275. package/src/web/wedatheme/src/styles/assets/folderopen.svg +0 -8
  276. package/src/web/wedatheme/src/styles/assets/fullscreenquit.svg +0 -12
  277. package/src/web/wedatheme/src/styles/assets/fullsreen.svg +0 -12
  278. package/src/web/wedatheme/src/styles/assets/globe-gray.svg +0 -12
  279. package/src/web/wedatheme/src/styles/assets/guide.svg +0 -9
  280. package/src/web/wedatheme/src/styles/assets/help.svg +0 -8
  281. package/src/web/wedatheme/src/styles/assets/hide.svg +0 -8
  282. package/src/web/wedatheme/src/styles/assets/info.svg +0 -8
  283. package/src/web/wedatheme/src/styles/assets/infoblue-1.svg +0 -8
  284. package/src/web/wedatheme/src/styles/assets/infoblue-filled.svg +0 -3
  285. package/src/web/wedatheme/src/styles/assets/infoblue.svg +0 -8
  286. package/src/web/wedatheme/src/styles/assets/jump-black.svg +0 -12
  287. package/src/web/wedatheme/src/styles/assets/jump.svg +0 -12
  288. package/src/web/wedatheme/src/styles/assets/lastpage.svg +0 -13
  289. package/src/web/wedatheme/src/styles/assets/loading.svg +0 -12
  290. package/src/web/wedatheme/src/styles/assets/local.svg +0 -10
  291. package/src/web/wedatheme/src/styles/assets/menu-fold-white.svg +0 -6
  292. package/src/web/wedatheme/src/styles/assets/menu-fold.svg +0 -6
  293. package/src/web/wedatheme/src/styles/assets/minus.svg +0 -12
  294. package/src/web/wedatheme/src/styles/assets/monitor.svg +0 -12
  295. package/src/web/wedatheme/src/styles/assets/more.svg +0 -8
  296. package/src/web/wedatheme/src/styles/assets/multi-line.svg +0 -12
  297. package/src/web/wedatheme/src/styles/assets/news.svg +0 -3
  298. package/src/web/wedatheme/src/styles/assets/not.svg +0 -12
  299. package/src/web/wedatheme/src/styles/assets/notice.svg +0 -8
  300. package/src/web/wedatheme/src/styles/assets/pencil.svg +0 -12
  301. package/src/web/wedatheme/src/styles/assets/pending-1.svg +0 -8
  302. package/src/web/wedatheme/src/styles/assets/pending-gray.svg +0 -8
  303. package/src/web/wedatheme/src/styles/assets/pending.svg +0 -8
  304. package/src/web/wedatheme/src/styles/assets/percent-blue.svg +0 -16
  305. package/src/web/wedatheme/src/styles/assets/percent.svg +0 -16
  306. package/src/web/wedatheme/src/styles/assets/phone-error.svg +0 -11
  307. package/src/web/wedatheme/src/styles/assets/phone-warning.svg +0 -9
  308. package/src/web/wedatheme/src/styles/assets/phone.svg +0 -12
  309. package/src/web/wedatheme/src/styles/assets/phonev.svg +0 -9
  310. package/src/web/wedatheme/src/styles/assets/plus.svg +0 -12
  311. package/src/web/wedatheme/src/styles/assets/qq.svg +0 -11
  312. package/src/web/wedatheme/src/styles/assets/realname.svg +0 -8
  313. package/src/web/wedatheme/src/styles/assets/realnamev.svg +0 -9
  314. package/src/web/wedatheme/src/styles/assets/refresh-blue.svg +0 -12
  315. package/src/web/wedatheme/src/styles/assets/refresh.svg +0 -12
  316. package/src/web/wedatheme/src/styles/assets/relationship-1.svg +0 -12
  317. package/src/web/wedatheme/src/styles/assets/relationship.svg +0 -12
  318. package/src/web/wedatheme/src/styles/assets/remind.svg +0 -8
  319. package/src/web/wedatheme/src/styles/assets/search.svg +0 -8
  320. package/src/web/wedatheme/src/styles/assets/setting.svg +0 -12
  321. package/src/web/wedatheme/src/styles/assets/shopcart.svg +0 -8
  322. package/src/web/wedatheme/src/styles/assets/show.svg +0 -8
  323. package/src/web/wedatheme/src/styles/assets/sort.svg +0 -12
  324. package/src/web/wedatheme/src/styles/assets/sortdown.svg +0 -12
  325. package/src/web/wedatheme/src/styles/assets/sortup.svg +0 -12
  326. package/src/web/wedatheme/src/styles/assets/success-1.svg +0 -8
  327. package/src/web/wedatheme/src/styles/assets/success-filled.svg +0 -3
  328. package/src/web/wedatheme/src/styles/assets/success.svg +0 -8
  329. package/src/web/wedatheme/src/styles/assets/table-1.svg +0 -12
  330. package/src/web/wedatheme/src/styles/assets/table.svg +0 -12
  331. package/src/web/wedatheme/src/styles/assets/tag.svg +0 -12
  332. package/src/web/wedatheme/src/styles/assets/time.svg +0 -12
  333. package/src/web/wedatheme/src/styles/assets/transfer.svg +0 -8
  334. package/src/web/wedatheme/src/styles/assets/trenddown.svg +0 -12
  335. package/src/web/wedatheme/src/styles/assets/trendup.svg +0 -12
  336. package/src/web/wedatheme/src/styles/assets/viewgrid.svg +0 -12
  337. package/src/web/wedatheme/src/styles/assets/viewlist.svg +0 -12
  338. package/src/web/wedatheme/src/styles/assets/warning-1.svg +0 -8
  339. package/src/web/wedatheme/src/styles/assets/warning-filled.svg +0 -3
  340. package/src/web/wedatheme/src/styles/assets/warning.svg +0 -8
  341. package/src/web/wedatheme/src/styles/assets/wechat-error.svg +0 -14
  342. package/src/web/wedatheme/src/styles/assets/wechat-warning.svg +0 -12
  343. package/src/web/wedatheme/src/styles/assets/wechat.svg +0 -12
  344. package/src/web/wedatheme/src/styles/assets/wechatv.svg +0 -12
  345. package/src/web/wedatheme/src/styles/assets/zoom-in-white.svg +0 -4
  346. package/src/web/wedatheme/src/styles/assets/zoom-in.svg +0 -4
  347. package/src/web/wedatheme/src/styles/assets/zoom-out-white.svg +0 -4
  348. package/src/web/wedatheme/src/styles/assets/zoom-out.svg +0 -4
  349. package/src/web/wedatheme/src/styles/index.scss +0 -18
  350. package/src/web/wedatheme/src/styles/main.css +0 -166
  351. package/src/web/wedatheme/src/styles/theme/_alert.scss +0 -73
  352. package/src/web/wedatheme/src/styles/theme/_badge.scss +0 -38
  353. package/src/web/wedatheme/src/styles/theme/_blank-page-v2.scss +0 -7
  354. package/src/web/wedatheme/src/styles/theme/_breadcrumb.scss +0 -8
  355. package/src/web/wedatheme/src/styles/theme/_bubble.scss +0 -24
  356. package/src/web/wedatheme/src/styles/theme/_button.scss +0 -212
  357. package/src/web/wedatheme/src/styles/theme/_card.scss +0 -12
  358. package/src/web/wedatheme/src/styles/theme/_cascader.scss +0 -43
  359. package/src/web/wedatheme/src/styles/theme/_checkbox&radio.scss +0 -83
  360. package/src/web/wedatheme/src/styles/theme/_datepicker.scss +0 -36
  361. package/src/web/wedatheme/src/styles/theme/_dialog.scss +0 -39
  362. package/src/web/wedatheme/src/styles/theme/_divider.scss +0 -1
  363. package/src/web/wedatheme/src/styles/theme/_drawer.scss +0 -15
  364. package/src/web/wedatheme/src/styles/theme/_dropdown.scss +0 -53
  365. package/src/web/wedatheme/src/styles/theme/_form.scss +0 -38
  366. package/src/web/wedatheme/src/styles/theme/_input&textarea&select.scss +0 -85
  367. package/src/web/wedatheme/src/styles/theme/_inputnumber.scss +0 -16
  368. package/src/web/wedatheme/src/styles/theme/_link.scss +0 -14
  369. package/src/web/wedatheme/src/styles/theme/_list.scss +0 -41
  370. package/src/web/wedatheme/src/styles/theme/_metrics-board.scss +0 -14
  371. package/src/web/wedatheme/src/styles/theme/_notification.scss +0 -27
  372. package/src/web/wedatheme/src/styles/theme/_pagination.scss +0 -22
  373. package/src/web/wedatheme/src/styles/theme/_popconfirm.scss +0 -4
  374. package/src/web/wedatheme/src/styles/theme/_progress.scss +0 -28
  375. package/src/web/wedatheme/src/styles/theme/_region-select.scss +0 -17
  376. package/src/web/wedatheme/src/styles/theme/_search.scss +0 -18
  377. package/src/web/wedatheme/src/styles/theme/_segment.scss +0 -69
  378. package/src/web/wedatheme/src/styles/theme/_slider.scss +0 -18
  379. package/src/web/wedatheme/src/styles/theme/_status.scss +0 -4
  380. package/src/web/wedatheme/src/styles/theme/_steps.scss +0 -68
  381. package/src/web/wedatheme/src/styles/theme/_switch.scss +0 -11
  382. package/src/web/wedatheme/src/styles/theme/_table.scss +0 -44
  383. package/src/web/wedatheme/src/styles/theme/_tabs.scss +0 -44
  384. package/src/web/wedatheme/src/styles/theme/_tag-search.scss +0 -9
  385. package/src/web/wedatheme/src/styles/theme/_tag.scss +0 -48
  386. package/src/web/wedatheme/src/styles/theme/_toast.scss +0 -3
  387. package/src/web/wedatheme/src/styles/theme/_transfer.scss +0 -9
  388. package/src/web/wedatheme/src/styles/theme/_tree.scss +0 -11
  389. package/src/web/wedatheme/src/styles/theme/_upload.scss +0 -14
  390. package/src/web/wedatheme/src/styles/theme/_variables.scss +0 -140
  391. package/src/web/wedatheme/src/styles/theme/index.scss +0 -91
  392. package/src/web/wedatheme/style-package/README.md +0 -31
  393. package/src/web/wedatheme/style-package/ef6fa527e24e354765d806b826b41391.svg +0 -627
  394. package/src/web/wedatheme/style-package/index.css +0 -3
  395. package/src/web/wedatheme/style-package/package.json +0 -15
  396. package/src/web/wedatheme/tea.config.js +0 -66
  397. package/src/web/wedatheme/webpack/css.config.js +0 -114
  398. package/src/web/wedatheme/webpack/plugins/css-package-plugin.js +0 -23
  399. package/src/web/wedatheme/webpack/plugins/inject-assets-plugin.js +0 -32
  400. package/src/web/wedatheme/webpack/plugins/package-json-plugin.js +0 -66
@@ -0,0 +1,139 @@
1
+ .weda-list-view__containor {
2
+ overflow-y: auto;
3
+ max-height: 100%;
4
+ overflow-x: hidden;
5
+ }
6
+
7
+ .weda-list-view-card {
8
+ display: flex;
9
+ flex-wrap: wrap;
10
+ margin-right: 3px;
11
+ }
12
+
13
+ /* 加载更多 */
14
+ .weda-list-view__containor .weda-list-view__more {
15
+ width: 100%;
16
+ }
17
+
18
+ .weda-list-view__containor .weda-list-view__more .weda-list-view__bottom-load {
19
+ padding-top: 1px;
20
+ }
21
+
22
+ .weda-list-view__containor .weda-list-view__more .weda-list-view__more-text {
23
+ padding-top: 10px;
24
+ padding-bottom: 14px;
25
+ font-size: 12px;
26
+ line-height: 22px;
27
+ color: rgba(0, 0, 0, 0.4);
28
+ text-align: center;
29
+ box-sizing: border-box;
30
+ cursor: pointer;
31
+ }
32
+
33
+ /* 加载更多 ... */
34
+ .weda-list-view__containor .weda-list-view__more .weda-list-view__more-symbol {
35
+ display: flex;
36
+ align-items: center;
37
+ justify-content: center;
38
+ padding-top: 20px;
39
+ padding-bottom: 18px;
40
+ box-sizing: border-box;
41
+ }
42
+
43
+ .weda-list-view__containor .weda-list-view__more .weda-list-view__symbol-item {
44
+ width: 8px;
45
+ height: 8px;
46
+ background: #c4c4c4;
47
+ margin-left: 6px;
48
+ border-radius: 50%;
49
+ }
50
+
51
+ .weda-list-view__containor
52
+ .weda-list-view__more
53
+ .weda-list-view__symbol-item:first-child {
54
+ width: 6px;
55
+ height: 6px;
56
+ margin-left: 0;
57
+ }
58
+
59
+ /* 加载更多 分页 */
60
+ .weda-list-view__containor .weda-list-view__more {
61
+ background-color: #fff;
62
+ }
63
+ .weda-list-view__containor
64
+ .weda-list-view__more
65
+ .weda-list-view__more-pagination {
66
+ display: flex;
67
+ align-items: center;
68
+ justify-content: space-between;
69
+ position: relative;
70
+ padding: 10px 18px 12px 16px;
71
+ box-sizing: border-box;
72
+ }
73
+
74
+ .weda-list-view__containor
75
+ .weda-list-view__more
76
+ .weda-list-view__pagination-pre,
77
+ .weda-list-view__containor
78
+ .weda-list-view__more
79
+ .weda-list-view__pagination-next {
80
+ font-size: 12px;
81
+ line-height: 24px;
82
+ color: rgba(0, 0, 0, 0.4);
83
+ padding: 0 24px;
84
+ cursor: pointer;
85
+ }
86
+
87
+ .weda-list-view__containor
88
+ .weda-list-view__more
89
+ .weda-list-view__pagination-pre.active,
90
+ .weda-list-view__containor
91
+ .weda-list-view__more
92
+ .weda-list-view__pagination-next.active {
93
+ color: rgba(0, 0, 0, 0.9);
94
+ }
95
+
96
+ .weda-list-view__containor
97
+ .weda-list-view__more
98
+ .weda-list-view__pagination-pre::before,
99
+ .weda-list-view__containor
100
+ .weda-list-view__more
101
+ .weda-list-view__pagination-next::after {
102
+ position: absolute;
103
+ content: '';
104
+ width: 24px;
105
+ height: 24px;
106
+ top: 10px;
107
+ opacity: 0.2;
108
+ background-image: url(arrow-right-line.svg);
109
+ }
110
+
111
+ .weda-list-view__containor
112
+ .weda-list-view__more
113
+ .active.weda-list-view__pagination-pre::before,
114
+ .weda-list-view__containor
115
+ .weda-list-view__more
116
+ .active.weda-list-view__pagination-next::after {
117
+ opacity: 1;
118
+ }
119
+
120
+ .weda-list-view__containor
121
+ .weda-list-view__more
122
+ .weda-list-view__pagination-pre::before {
123
+ left: 16px;
124
+ transform: rotate(180deg);
125
+ }
126
+
127
+ .weda-list-view__containor
128
+ .weda-list-view__more
129
+ .weda-list-view__pagination-next::after {
130
+ right: 18px;
131
+ }
132
+
133
+ .weda-list-view__containor
134
+ .weda-list-view__more
135
+ .weda-list-view__pagination-text {
136
+ font-size: 12px;
137
+ line-height: 22px;
138
+ color: rgba(0, 0, 0, 0.4);
139
+ }
@@ -0,0 +1,354 @@
1
+ import React, {
2
+ useState,
3
+ useEffect,
4
+ useRef,
5
+ useMemo,
6
+ useCallback,
7
+ } from 'react';
8
+ import { IListView } from './interface';
9
+ import { callDataSource } from '../../utils/tcb';
10
+ import { isInIde } from '../../utils/platform';
11
+ import classNames from '../../utils/classnames';
12
+ import isequal from 'lodash.isequal';
13
+ import './index.css';
14
+
15
+ const REL_DICT = {
16
+ equal: 'eq', // 等于
17
+ unequal: 'neq', // 不等于
18
+ include: 'search', // 包含
19
+ exclude: '_exclude', // 不包含
20
+ begin_with: '_begin_with', // 开头是
21
+ greater: 'gt', // 大于
22
+ greater_or_equal: 'gte', // 大于等于
23
+ bigger_or_equal: 'gte', //大于等于
24
+ less: 'lt', // 小于
25
+ less_or_equal: 'lte', // 小于等于
26
+ in: 'in', // 多选值
27
+ not_in: 'nin', // 不在多选值
28
+ };
29
+ const ORDERTYPE = ['asc', 'desc'];
30
+ const BLOCK_NAME = 'weda-list-view';
31
+ const isNull = (val) => [undefined, null].includes(val);
32
+ const getIdeMockData = (length = 3) => Array.from({ length }).map((d) => ({}));
33
+ const getWhereList = (where) => {
34
+ let result = [];
35
+ Array.isArray(where) &&
36
+ where.forEach((item1) => {
37
+ if (item1?.groupLogic !== 'or' && Array.isArray(item1?.logicData)) {
38
+ item1?.logicData.forEach((item2) => {
39
+ let [rel, val] = [REL_DICT[item2?.rel], item2?.value];
40
+ if ('_begin_with' === rel) {
41
+ rel = 'regex';
42
+ val = `^${val}`;
43
+ }
44
+ if ('_exclude' === rel) {
45
+ rel = 'regex';
46
+ val = `^((?!${val}).)*$`;
47
+ }
48
+ if (item2?.logic !== 'or' && item2?.key && rel && !isNull(val)) {
49
+ result.push({ key: item2.key, rel, val });
50
+ }
51
+ });
52
+ }
53
+ });
54
+ return result;
55
+ };
56
+
57
+ /**
58
+ * 数据容器-列表视图
59
+ */
60
+ export default function ListView(props: IListView) {
61
+ const {
62
+ datasource,
63
+ orderBy,
64
+ orderType,
65
+ where,
66
+ template = 'simpleList',
67
+ pageSize = 5,
68
+ pagination = 'loadMoreButton',
69
+ events,
70
+ className,
71
+ children,
72
+ appCloud = { callDataSource, isInIde },
73
+ beforeDataChange = (v) => v,
74
+ ...rest
75
+ } = props;
76
+
77
+ const methodName = useMemo(
78
+ () => datasource?.extra?.methodName || 'wedaGetRecords',
79
+ [datasource?.extra?.methodName]
80
+ ); // 默认方法名
81
+ const [pageNo, setPageNo] = useState(1); // 分页状态
82
+ const [loading, setLoading] = useState(false); // 触底刷新加载状态
83
+ const [entry, setEntry] = useState(null); // 触底的observer对象
84
+ const paramRef = useRef({
85
+ dataSourceName: datasource.name,
86
+ methodName,
87
+ params: { orderBy, orderType, where, pageNo: 1, pageSize },
88
+ pagination,
89
+ }); // 最新请求参数
90
+ const dataRef = useRef({ total: 0, records: [] }); // 最新数据列表
91
+ const observeRef = useRef(null); // 当前监听对象
92
+ const isIdeMockData = !datasource?.name && appCloud?.isInIde?.(); // 在ide环境且未绑定数据源时,存在mock数据逻辑
93
+ const shouldBottomLoad =
94
+ pagination === 'bottomLoad' && entry?.isIntersecting && !loading; // 能否触底加载
95
+
96
+ // 组件卸载时触发
97
+ useEffect(() => {
98
+ return () => {
99
+ observeRef.current?.disconnect();
100
+ events?.onDataChange?.({ data: beforeDataChange([]) });
101
+ };
102
+ }, []);
103
+
104
+ // props 基本类型监听,需重新分页;处于 ide 且未绑定数据源时返回mock数据
105
+ useEffect(() => {
106
+ dataRef.current = { total: 0, records: [] };
107
+ if (datasource?.name) {
108
+ fetchData({
109
+ dataSourceName: datasource.name,
110
+ methodName,
111
+ params: {
112
+ ...paramRef.current?.params,
113
+ orderBy,
114
+ orderType,
115
+ pageNo: 1,
116
+ pageSize,
117
+ },
118
+ pagination,
119
+ });
120
+ } else {
121
+ if (isIdeMockData) {
122
+ events?.onDataChange?.({
123
+ data: beforeDataChange(getIdeMockData(pageSize)),
124
+ });
125
+ }
126
+ }
127
+ }, [datasource?.name, methodName, pageSize, pagination, orderBy, orderType]);
128
+
129
+ // props 对象类型监听,需重新分页
130
+ useEffect(() => {
131
+ if (!isequal(paramRef.current?.params?.where, where)) {
132
+ dataRef.current = { total: 0, records: [] };
133
+ fetchData({
134
+ params: { pageNo: 1, where },
135
+ });
136
+ }
137
+ });
138
+
139
+ // 监听触底加载事件,这里面的 setLoading 用 setTimeout包裹起来,所以会先执行新的children渲染,再执行 loading
140
+ useEffect(() => {
141
+ if (shouldBottomLoad && hasNextPage()) {
142
+ fetchData({
143
+ params: { pageNo: (paramRef.current?.params?.pageNo || 1) + 1 },
144
+ });
145
+ }
146
+ }, [shouldBottomLoad]);
147
+
148
+ // 触底监控对象
149
+ const nodeRefCallback = useCallback((node) => {
150
+ if (node) {
151
+ observeRef.current?.disconnect();
152
+ observeRef.current = new IntersectionObserver((entries) => {
153
+ setEntry(entries?.[0]);
154
+ });
155
+ observeRef.current.observe(node);
156
+ }
157
+ }, []);
158
+
159
+ // 能否点击下一页
160
+ const hasNextPage = () => {
161
+ const { pageNo = 1, pageSize = 5 } = paramRef.current?.params || {};
162
+ const { total = 0 } = dataRef.current || {};
163
+ return pageNo * pageSize < total;
164
+ };
165
+
166
+ /**
167
+ * 列表视图拉取数据
168
+ * 方法仅依赖入参和paramRef的参数
169
+ */
170
+ const fetchData = async (param: {
171
+ dataSourceName?: string;
172
+ methodName?: string;
173
+ params?: any;
174
+ pagination?: any;
175
+ }) => {
176
+ if (loading) return;
177
+ setLoading(true);
178
+ // 合并参数
179
+ const fetchParam = {
180
+ ...paramRef.current,
181
+ ...param,
182
+ params: { ...paramRef.current.params, ...param?.params },
183
+ };
184
+ const { dataSourceName, methodName, params } = fetchParam;
185
+ const { orderBy, orderType, pageNo, pageSize, where } = params || {};
186
+ const tcbParams = {};
187
+ // tcb分页参数
188
+ if (!isNull(pageNo) && !isNull(pageSize)) {
189
+ tcbParams['pageNo'] = pageNo;
190
+ tcbParams['pageSize'] = pageSize;
191
+ }
192
+ // tcb排序参数
193
+ if (orderBy && ORDERTYPE.includes(orderType)) {
194
+ tcbParams['orderBy'] = orderBy;
195
+ tcbParams['orderType'] = orderType;
196
+ }
197
+ // tcb过滤参数
198
+ const whereEffected = [].concat(getWhereList(where));
199
+ whereEffected.length > 0 && (tcbParams['where'] = whereEffected);
200
+ // tcb结果和事件
201
+ const data = await appCloud?.callDataSource({
202
+ dataSourceName,
203
+ methodName,
204
+ params: tcbParams,
205
+ });
206
+ paramRef.current = fetchParam;
207
+ onEnvets(data);
208
+ };
209
+
210
+ /**
211
+ * 根据fetchData方法返回值,回调给外部事件
212
+ * datasource 是对象类型,所以总能拿到最新的值
213
+ */
214
+ const onEnvets = (data) => {
215
+ const fetchRecords = [].concat(data?.records || []);
216
+ const total = data?.total || fetchRecords.length;
217
+ if (
218
+ ['loadMoreButton', 'bottomLoad'].includes(paramRef.current.pagination)
219
+ ) {
220
+ dataRef.current = {
221
+ total,
222
+ records: [...dataRef.current.records, ...fetchRecords],
223
+ };
224
+ } else {
225
+ dataRef.current = { total, records: fetchRecords };
226
+ }
227
+ events?.onDataChange?.({
228
+ data: beforeDataChange(dataRef.current.records || []),
229
+ });
230
+ if (JSON.stringify(data) === '{}') {
231
+ events?.queryFail?.({ datasource });
232
+ } else {
233
+ if (total === 0) {
234
+ events?.queryEmpty?.({ datasource, data: beforeDataChange([]) });
235
+ }
236
+ events?.querySuccess?.({
237
+ datasource,
238
+ data: beforeDataChange(dataRef.current.records),
239
+ });
240
+ }
241
+ setPageNo(paramRef.current?.params?.pageNo || 1);
242
+ window.setTimeout(() => setLoading(false));
243
+ };
244
+
245
+ /**
246
+ * 分页,加载更多
247
+ */
248
+ const renderLoadMore = () => {
249
+ let disabled = !hasNextPage();
250
+ if (isIdeMockData) {
251
+ disabled = false;
252
+ }
253
+ return (
254
+ !disabled &&
255
+ (loading ? (
256
+ LoadingSymbol
257
+ ) : (
258
+ <div
259
+ className={`${BLOCK_NAME}__more-text`}
260
+ onClick={() => fetchData({ params: { pageNo: pageNo + 1 } })}
261
+ >
262
+ 加载更多
263
+ </div>
264
+ ))
265
+ );
266
+ };
267
+
268
+ /**
269
+ * 分页,底部刷新
270
+ */
271
+ const renderBottomLoad = () => {
272
+ return (
273
+ <div ref={nodeRefCallback} className={`${BLOCK_NAME}__bottom-load`}>
274
+ {loading ? LoadingSymbol : !hasNextPage() && LoadEnd}
275
+ </div>
276
+ );
277
+ };
278
+
279
+ /**
280
+ * 分页,分页器,含ideMockData的判断
281
+ */
282
+ const renderPagination = () => {
283
+ const preDisabeld = pageNo <= 1;
284
+ const nextDisabeld = !hasNextPage();
285
+ const total = dataRef.current?.total || 0;
286
+ return (
287
+ <div className={`${BLOCK_NAME}__more-pagination`}>
288
+ <div
289
+ className={classNames(
290
+ `${BLOCK_NAME}__pagination-pre`,
291
+ preDisabeld ? '' : 'active'
292
+ )}
293
+ onClick={() =>
294
+ !preDisabeld && fetchData({ params: { pageNo: pageNo - 1 } })
295
+ }
296
+ >
297
+ 上一页
298
+ </div>
299
+ <div className={classNames(`${BLOCK_NAME}__pagination-text`)}>
300
+ <span className="active">
301
+ {isIdeMockData ? 1 : total ? pageNo : 0}
302
+ </span>
303
+ /{isIdeMockData ? 1 : Math.ceil(total / pageSize)}
304
+ </div>
305
+ <div
306
+ className={classNames(
307
+ `${BLOCK_NAME}__pagination-next`,
308
+ nextDisabeld ? '' : 'active'
309
+ )}
310
+ onClick={() =>
311
+ !nextDisabeld && fetchData({ params: { pageNo: pageNo + 1 } })
312
+ }
313
+ >
314
+ 下一页
315
+ </div>
316
+ </div>
317
+ );
318
+ };
319
+
320
+ /**
321
+ * 加载中状态组件
322
+ */
323
+ const LoadingSymbol = (
324
+ <div className={`${BLOCK_NAME}__more-symbol`}>
325
+ <div className={`${BLOCK_NAME}__symbol-item`}></div>
326
+ <div className={`${BLOCK_NAME}__symbol-item`}></div>
327
+ <div className={`${BLOCK_NAME}__symbol-item`}></div>
328
+ </div>
329
+ );
330
+
331
+ /**
332
+ * 加载到底状态组件
333
+ */
334
+ const LoadEnd = <div></div>;
335
+
336
+ return (
337
+ <div
338
+ // eslint-disable-next-line react/jsx-props-no-spreading
339
+ {...rest}
340
+ className={classNames('weda-ui', `${BLOCK_NAME}__containor`, className)}
341
+ >
342
+ {children && (
343
+ <div className={template === 'cardList' ? `${BLOCK_NAME}-card` : ''}>
344
+ {children}
345
+ </div>
346
+ )}
347
+ <div className={classNames(`${BLOCK_NAME}__more`)}>
348
+ {pagination === 'bottomLoad' && renderBottomLoad()}
349
+ {pagination === 'loadMoreButton' && renderLoadMore()}
350
+ {pagination === 'pagination' && renderPagination()}
351
+ </div>
352
+ </div>
353
+ );
354
+ }
@@ -0,0 +1,98 @@
1
+ import React from 'react';
2
+
3
+ /**
4
+ * 数据容器公共属性
5
+ */
6
+ export interface IDataContainer {
7
+ /**
8
+ * 数据模型
9
+ */
10
+ datasource?: {
11
+ name?: string;
12
+ extra?: {
13
+ viewId?: string;
14
+ methodName?: string;
15
+ };
16
+ };
17
+ /**
18
+ * 数据筛选
19
+ */
20
+ where?: {
21
+ groupLogic?: null | 'or' | 'and';
22
+ logicData?: {
23
+ keyType?: 'field' | 'var-font';
24
+ key: string;
25
+ rel: 'eq' | 'neq' | 'lt' | 'gt' | 'gte' | 'lte' | 'in' | 'nin' | 'search';
26
+ value: any;
27
+ valueType?: 'const' | 'var-font' | 'relative-amount' | 'field';
28
+ expression?: string | boolean;
29
+ logic?: null | 'or' | 'and' | string;
30
+ extra?: {
31
+ type?: 'string' | 'number' | 'boolean' | 'object' | 'array' | string;
32
+ format?: string | null;
33
+ isExpression?: boolean;
34
+ };
35
+ }[];
36
+ }[];
37
+ /**
38
+ * 容器事件
39
+ */
40
+ events?: {
41
+ queryEmpty?: any;
42
+ querySuccess?: any;
43
+ queryFail?: any;
44
+ onDataChange?: (param: any) => any;
45
+ };
46
+ /**
47
+ * 类
48
+ */
49
+ className?: string;
50
+ /**
51
+ * app.cloud 对象依赖,默认会从 window.app 取值
52
+ */
53
+ appCloud?: { callDataSource?: any; isInIde?: any };
54
+ /**
55
+ * 子元素
56
+ */
57
+ children?: React.ReactNode | undefined;
58
+ /**
59
+ * 其他属性
60
+ */
61
+ [key: string]: any;
62
+ }
63
+
64
+ /**
65
+ * 数据容器-列表视图
66
+ */
67
+ export interface IListView extends IDataContainer {
68
+ /**
69
+ * 数据字段
70
+ */
71
+ orderBy?: string;
72
+ /**
73
+ * 数据类型
74
+ */
75
+ orderType?: 'desc' | 'asc';
76
+ /**
77
+ * 模板
78
+ */
79
+ template?:
80
+ | 'simpleList'
81
+ | 'detailList'
82
+ | 'imageTextList'
83
+ | 'cardList'
84
+ | 'none';
85
+ /**
86
+ * 显示行数
87
+ */
88
+ pageSize?: number;
89
+ /**
90
+ * 分页类型,加载更多|底部刷新|分页器
91
+ */
92
+ pagination?: 'loadMoreButton' | 'bottomLoad' | 'pagination' | 'none';
93
+
94
+ /**
95
+ * 调用 onDataChange 之前的数据转换,如列表视图需要接受 array,而数据视图需要接受 object
96
+ */
97
+ beforeDataChange?: (param: any) => any;
98
+ }