@pisell/materials 1.0.449 → 1.0.451

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 (530) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +2 -2
  6. package/build/lowcode/preview.js +150 -142
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +28 -28
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +23 -23
  11. package/es/components/collapse/index.d.ts +11 -2
  12. package/es/components/collapse/index.js +28 -22
  13. package/es/components/colorPicker/index.d.ts +4 -0
  14. package/es/components/colorPicker/index.js +6 -0
  15. package/es/components/dataSourceComponents/dataSourceForm/formItem.d.ts +3 -0
  16. package/es/components/dataSourceComponents/dataSourceForm/formItem.js +46 -0
  17. package/es/components/dataSourceComponents/dataSourceForm/group/index.d.ts +20 -0
  18. package/es/components/dataSourceComponents/dataSourceForm/group/index.js +65 -0
  19. package/es/components/dataSourceComponents/dataSourceForm/group/index.less +42 -0
  20. package/es/components/dataSourceComponents/dataSourceForm/index.d.ts +3 -0
  21. package/es/components/dataSourceComponents/dataSourceForm/index.js +75 -0
  22. package/es/components/dataSourceComponents/dataSourceForm/index.less +24 -0
  23. package/es/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingContext.d.ts +10 -0
  24. package/es/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingContext.js +6 -0
  25. package/es/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingProvider.d.ts +8 -0
  26. package/es/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingProvider.js +24 -0
  27. package/es/components/dataSourceComponents/dataSourceForm/provider/hooks/useFormSetting.d.ts +5 -0
  28. package/es/components/dataSourceComponents/dataSourceForm/provider/hooks/useFormSetting.js +11 -0
  29. package/es/components/dataSourceComponents/dataSourceForm/serve.d.ts +147 -0
  30. package/es/components/dataSourceComponents/dataSourceForm/serve.js +253 -0
  31. package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.d.ts +36 -0
  32. package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.js +217 -0
  33. package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.less +4 -0
  34. package/es/components/dataSourceComponents/dataSourceForm/type.d.ts +16 -0
  35. package/es/components/dataSourceComponents/dataSourceForm/type.js +1 -0
  36. package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +36 -0
  37. package/es/components/dataSourceComponents/dataSourceForm/utils.js +188 -0
  38. package/es/components/dataSourceComponents/dataSourceTable/hooks/useColumns.d.ts +11 -0
  39. package/es/components/dataSourceComponents/dataSourceTable/hooks/useColumns.js +56 -0
  40. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDesignMode.d.ts +2 -0
  41. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDesignMode.js +39 -0
  42. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +10 -0
  43. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.js +35 -0
  44. package/es/components/dataSourceComponents/dataSourceTable/hooks/useFormat.d.ts +27 -0
  45. package/es/components/dataSourceComponents/dataSourceTable/hooks/useFormat.js +41 -0
  46. package/es/components/dataSourceComponents/dataSourceTable/hooks/usePagination.d.ts +16 -0
  47. package/es/components/dataSourceComponents/dataSourceTable/hooks/usePagination.js +14 -0
  48. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +19 -0
  49. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +51 -0
  50. package/es/components/dataSourceComponents/dataSourceTable/index.d.ts +4 -0
  51. package/es/components/dataSourceComponents/dataSourceTable/index.js +208 -0
  52. package/es/components/dataSourceComponents/dataSourceTable/provider/tableSetting/TableSettingContext.d.ts +7 -0
  53. package/es/components/dataSourceComponents/dataSourceTable/provider/tableSetting/TableSettingContext.js +4 -0
  54. package/es/components/dataSourceComponents/dataSourceTable/provider/tableSetting/TableSettingProvider.d.ts +8 -0
  55. package/es/components/dataSourceComponents/dataSourceTable/provider/tableSetting/TableSettingProvider.js +20 -0
  56. package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +15 -0
  57. package/es/components/dataSourceComponents/dataSourceTable/type.js +1 -0
  58. package/es/components/dataSourceComponents/fields/Checkbox/ReadPretty.d.ts +7 -0
  59. package/es/components/dataSourceComponents/fields/Checkbox/ReadPretty.js +14 -0
  60. package/es/components/dataSourceComponents/fields/Checkbox/WithMode.d.ts +7 -0
  61. package/es/components/dataSourceComponents/fields/Checkbox/WithMode.js +7 -0
  62. package/es/components/dataSourceComponents/fields/Checkbox/index.d.ts +6 -0
  63. package/es/components/dataSourceComponents/fields/Checkbox/index.js +6 -0
  64. package/es/components/dataSourceComponents/fields/Checkbox/type.d.ts +9 -0
  65. package/es/components/dataSourceComponents/fields/Checkbox/type.js +1 -0
  66. package/es/components/dataSourceComponents/fields/ColorPicker/ReadPretty.d.ts +4 -0
  67. package/es/components/dataSourceComponents/fields/ColorPicker/ReadPretty.js +9 -0
  68. package/es/components/dataSourceComponents/fields/ColorPicker/WithMode.d.ts +3 -0
  69. package/es/components/dataSourceComponents/fields/ColorPicker/WithMode.js +5 -0
  70. package/es/components/dataSourceComponents/fields/ColorPicker/index.d.ts +3 -0
  71. package/es/components/dataSourceComponents/fields/ColorPicker/index.js +4 -0
  72. package/es/components/dataSourceComponents/fields/ColorPicker/type.d.ts +5 -0
  73. package/es/components/dataSourceComponents/fields/ColorPicker/type.js +1 -0
  74. package/es/components/dataSourceComponents/fields/DatePicker/ReadPretty.d.ts +4 -0
  75. package/es/components/dataSourceComponents/fields/DatePicker/ReadPretty.js +7 -0
  76. package/es/components/dataSourceComponents/fields/DatePicker/WithMode.d.ts +4 -0
  77. package/es/components/dataSourceComponents/fields/DatePicker/WithMode.js +17 -0
  78. package/es/components/dataSourceComponents/fields/DatePicker/index.d.ts +3 -0
  79. package/es/components/dataSourceComponents/fields/DatePicker/index.js +4 -0
  80. package/es/components/dataSourceComponents/fields/DatePicker/type.d.ts +5 -0
  81. package/es/components/dataSourceComponents/fields/DatePicker/type.js +1 -0
  82. package/es/components/dataSourceComponents/fields/Input/ReadPretty.d.ts +4 -0
  83. package/es/components/dataSourceComponents/fields/Input/ReadPretty.js +5 -0
  84. package/es/components/dataSourceComponents/fields/Input/WithMode.d.ts +4 -0
  85. package/es/components/dataSourceComponents/fields/Input/WithMode.js +5 -0
  86. package/es/components/dataSourceComponents/fields/Input/index.d.ts +13 -0
  87. package/es/components/dataSourceComponents/fields/Input/index.js +12 -0
  88. package/es/components/dataSourceComponents/fields/Input/type.d.ts +5 -0
  89. package/es/components/dataSourceComponents/fields/Input/type.js +1 -0
  90. package/es/components/dataSourceComponents/fields/Input.Json/ReadPretty.d.ts +4 -0
  91. package/es/components/dataSourceComponents/fields/Input.Json/ReadPretty.js +11 -0
  92. package/es/components/dataSourceComponents/fields/Input.Json/WithMode.d.ts +3 -0
  93. package/es/components/dataSourceComponents/fields/Input.Json/WithMode.js +5 -0
  94. package/es/components/dataSourceComponents/fields/Input.Json/index.d.ts +3 -0
  95. package/es/components/dataSourceComponents/fields/Input.Json/index.js +4 -0
  96. package/es/components/dataSourceComponents/fields/Input.Json/type.d.ts +5 -0
  97. package/es/components/dataSourceComponents/fields/Input.Json/type.js +1 -0
  98. package/es/components/dataSourceComponents/fields/Input.Password/ReadPretty.d.ts +4 -0
  99. package/es/components/dataSourceComponents/fields/Input.Password/ReadPretty.js +5 -0
  100. package/es/components/dataSourceComponents/fields/Input.Password/WithMode.d.ts +3 -0
  101. package/es/components/dataSourceComponents/fields/Input.Password/WithMode.js +5 -0
  102. package/es/components/dataSourceComponents/fields/Input.Password/index.d.ts +3 -0
  103. package/es/components/dataSourceComponents/fields/Input.Password/index.js +4 -0
  104. package/es/components/dataSourceComponents/fields/Input.Password/type.d.ts +5 -0
  105. package/es/components/dataSourceComponents/fields/Input.Password/type.js +1 -0
  106. package/es/components/dataSourceComponents/fields/Input.TextArea/ReadPretty.d.ts +4 -0
  107. package/es/components/dataSourceComponents/fields/Input.TextArea/ReadPretty.js +5 -0
  108. package/es/components/dataSourceComponents/fields/Input.TextArea/WithMode.d.ts +3 -0
  109. package/es/components/dataSourceComponents/fields/Input.TextArea/WithMode.js +5 -0
  110. package/es/components/dataSourceComponents/fields/Input.TextArea/index.d.ts +3 -0
  111. package/es/components/dataSourceComponents/fields/Input.TextArea/index.js +4 -0
  112. package/es/components/dataSourceComponents/fields/Input.TextArea/type.d.ts +5 -0
  113. package/es/components/dataSourceComponents/fields/Input.TextArea/type.js +1 -0
  114. package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.d.ts +4 -0
  115. package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.js +9 -0
  116. package/es/components/dataSourceComponents/fields/Input.Url/WithMode.d.ts +3 -0
  117. package/es/components/dataSourceComponents/fields/Input.Url/WithMode.js +5 -0
  118. package/es/components/dataSourceComponents/fields/Input.Url/index.d.ts +3 -0
  119. package/es/components/dataSourceComponents/fields/Input.Url/index.js +4 -0
  120. package/es/components/dataSourceComponents/fields/Input.Url/type.d.ts +5 -0
  121. package/es/components/dataSourceComponents/fields/Input.Url/type.js +1 -0
  122. package/es/components/dataSourceComponents/fields/InputNumber/ReadPretty.d.ts +4 -0
  123. package/es/components/dataSourceComponents/fields/InputNumber/ReadPretty.js +7 -0
  124. package/es/components/dataSourceComponents/fields/InputNumber/WithMode.d.ts +3 -0
  125. package/es/components/dataSourceComponents/fields/InputNumber/WithMode.js +5 -0
  126. package/es/components/dataSourceComponents/fields/InputNumber/index.d.ts +3 -0
  127. package/es/components/dataSourceComponents/fields/InputNumber/index.js +4 -0
  128. package/es/components/dataSourceComponents/fields/InputNumber/type.d.ts +5 -0
  129. package/es/components/dataSourceComponents/fields/InputNumber/type.js +1 -0
  130. package/es/components/dataSourceComponents/fields/Radio/ReadPretty.d.ts +7 -0
  131. package/es/components/dataSourceComponents/fields/Radio/ReadPretty.js +14 -0
  132. package/es/components/dataSourceComponents/fields/Radio/WithMode.d.ts +7 -0
  133. package/es/components/dataSourceComponents/fields/Radio/WithMode.js +7 -0
  134. package/es/components/dataSourceComponents/fields/Radio/index.d.ts +6 -0
  135. package/es/components/dataSourceComponents/fields/Radio/index.js +6 -0
  136. package/es/components/dataSourceComponents/fields/Radio/type.d.ts +8 -0
  137. package/es/components/dataSourceComponents/fields/Radio/type.js +1 -0
  138. package/es/components/dataSourceComponents/fields/Select/ReadPretty.d.ts +4 -0
  139. package/es/components/dataSourceComponents/fields/Select/ReadPretty.js +9 -0
  140. package/es/components/dataSourceComponents/fields/Select/WithMode.d.ts +4 -0
  141. package/es/components/dataSourceComponents/fields/Select/WithMode.js +5 -0
  142. package/es/components/dataSourceComponents/fields/Select/index.d.ts +3 -0
  143. package/es/components/dataSourceComponents/fields/Select/index.js +4 -0
  144. package/es/components/dataSourceComponents/fields/Select/type.d.ts +5 -0
  145. package/es/components/dataSourceComponents/fields/Select/type.js +1 -0
  146. package/es/components/dataSourceComponents/fields/TimePicker/ReadPretty.d.ts +4 -0
  147. package/es/components/dataSourceComponents/fields/TimePicker/ReadPretty.js +6 -0
  148. package/es/components/dataSourceComponents/fields/TimePicker/WithMode.d.ts +4 -0
  149. package/es/components/dataSourceComponents/fields/TimePicker/WithMode.js +5 -0
  150. package/es/components/dataSourceComponents/fields/TimePicker/index.d.ts +3 -0
  151. package/es/components/dataSourceComponents/fields/TimePicker/index.js +4 -0
  152. package/es/components/dataSourceComponents/fields/TimePicker/type.d.ts +5 -0
  153. package/es/components/dataSourceComponents/fields/TimePicker/type.js +1 -0
  154. package/es/components/dataSourceComponents/fields/index.d.ts +16 -0
  155. package/es/components/dataSourceComponents/fields/index.js +27 -0
  156. package/es/components/dataSourceComponents/hooks/useActions.d.ts +16 -0
  157. package/es/components/dataSourceComponents/hooks/useActions.js +302 -0
  158. package/es/components/dataSourceComponents/hooks/useCtxActions.d.ts +8 -0
  159. package/es/components/dataSourceComponents/hooks/useCtxActions.js +14 -0
  160. package/es/components/dataSourceComponents/hooks/useDataSource.d.ts +5 -0
  161. package/es/components/dataSourceComponents/hooks/useDataSource.js +11 -0
  162. package/es/components/dataSourceComponents/hooks/useParseActionsVariable.d.ts +6 -0
  163. package/es/components/dataSourceComponents/hooks/useParseActionsVariable.js +61 -0
  164. package/es/components/dataSourceComponents/hooks/useValueMap.d.ts +8 -0
  165. package/es/components/dataSourceComponents/hooks/useValueMap.js +22 -0
  166. package/es/components/dataSourceComponents/hooks/useVariables.d.ts +2 -0
  167. package/es/components/dataSourceComponents/hooks/useVariables.js +6 -0
  168. package/es/components/dataSourceComponents/provider/actions/ActionsContext.d.ts +6 -0
  169. package/es/components/dataSourceComponents/provider/actions/ActionsContext.js +3 -0
  170. package/es/components/dataSourceComponents/provider/actions/ActionsProvider.d.ts +9 -0
  171. package/es/components/dataSourceComponents/provider/actions/ActionsProvider.js +28 -0
  172. package/es/components/dataSourceComponents/provider/fields/DataSourceContext.d.ts +75 -0
  173. package/es/components/dataSourceComponents/provider/fields/DataSourceContext.js +6 -0
  174. package/es/components/dataSourceComponents/provider/fields/DataSourceProvider.d.ts +8 -0
  175. package/es/components/dataSourceComponents/provider/fields/DataSourceProvider.js +20 -0
  176. package/es/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +9 -0
  177. package/es/components/dataSourceComponents/provider/variables/VariablesContext.js +8 -0
  178. package/es/components/dataSourceComponents/provider/variables/VariablesProvider.d.ts +4 -0
  179. package/es/components/dataSourceComponents/provider/variables/VariablesProvider.js +82 -0
  180. package/es/components/form/index.d.ts +2 -8
  181. package/es/components/form/index.js +3 -1
  182. package/es/components/page/index.js +3 -2
  183. package/es/components/pisellAnchor/index.js +0 -1
  184. package/es/components/pisellStatistic/index.js +0 -1
  185. package/es/components/pisellUpload/index.js +0 -1
  186. package/es/components/pisellUploadCrop/index.js +0 -1
  187. package/es/components/pisellWalletCard/index.js +0 -2
  188. package/es/components/pisellWalletPassCard/index.js +4 -1
  189. package/es/components/productCard/components/Action/index.d.ts +4 -0
  190. package/es/components/productCard/components/{Actions → Action}/index.js +7 -6
  191. package/{lib/components/productCard/components/Actions → es/components/productCard/components/Action}/index.less +1 -1
  192. package/es/components/productCard/components/AmountFooter/index.d.ts +2 -2
  193. package/es/components/productCard/components/AmountFooter/index.js +13 -7
  194. package/es/components/productCard/components/AmountFooter/index.less +9 -0
  195. package/es/components/productCard/components/Header/index.d.ts +1 -1
  196. package/es/components/productCard/components/Header/index.js +17 -18
  197. package/es/components/productCard/components/Header/index.less +4 -0
  198. package/es/components/productCard/components/Note/index.d.ts +1 -1
  199. package/es/components/productCard/components/Note/index.js +11 -4
  200. package/es/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +1 -1
  201. package/es/components/productCard/components/Packages/components/collapsibleList/utils.js +14 -12
  202. package/es/components/productCard/components/Packages/components/options/index.less +1 -0
  203. package/es/components/productCard/components/Packages/index.d.ts +1 -1
  204. package/es/components/productCard/components/Packages/index.js +14 -5
  205. package/es/components/productCard/components/Sales/index.d.ts +1 -1
  206. package/es/components/productCard/components/Sales/index.js +23 -6
  207. package/es/components/productCard/components/Time/components/Like/index.d.ts +2 -2
  208. package/es/components/productCard/components/Time/components/Like/index.js +3 -3
  209. package/es/components/productCard/components/Time/index.d.ts +1 -1
  210. package/es/components/productCard/components/Time/index.js +28 -14
  211. package/es/components/productCard/components/Time/index.less +10 -0
  212. package/es/components/productCard/hooks/useOpenNote.d.ts +3 -0
  213. package/es/components/productCard/hooks/useOpenNote.js +58 -0
  214. package/es/components/productCard/index.js +76 -33
  215. package/es/components/productCard/index.less +8 -3
  216. package/es/components/productCard/locales.d.ts +24 -0
  217. package/es/components/productCard/locales.js +29 -0
  218. package/es/components/productCard/types.d.ts +6 -0
  219. package/es/components/productCard/utils.js +23 -5
  220. package/es/components/record-view/index.js +0 -3
  221. package/es/components/section-footers/index.js +0 -1
  222. package/es/components/select/index.d.ts +1 -1
  223. package/es/components/select/index.js +2 -1
  224. package/es/components/table/utils.d.ts +5 -6
  225. package/es/components/table/utils.js +7 -1
  226. package/es/components/tabs/index.js +0 -4
  227. package/es/hooks/useSetRequest.d.ts +2 -0
  228. package/es/hooks/useSetRequest.js +8 -0
  229. package/es/index.d.ts +13 -0
  230. package/es/index.js +16 -1
  231. package/es/utils/index.d.ts +1 -0
  232. package/es/utils/index.js +2 -1
  233. package/es/utils/mergeWith.d.ts +1 -0
  234. package/es/utils/mergeWith.js +31 -0
  235. package/lib/components/collapse/index.d.ts +11 -2
  236. package/lib/components/collapse/index.js +27 -21
  237. package/lib/components/colorPicker/index.d.ts +4 -0
  238. package/lib/components/{productCard/components/Holder → colorPicker}/index.js +9 -11
  239. package/lib/components/dataSourceComponents/dataSourceForm/formItem.d.ts +3 -0
  240. package/lib/components/dataSourceComponents/dataSourceForm/formItem.js +59 -0
  241. package/lib/components/dataSourceComponents/dataSourceForm/group/index.d.ts +20 -0
  242. package/lib/components/dataSourceComponents/dataSourceForm/group/index.js +80 -0
  243. package/lib/components/dataSourceComponents/dataSourceForm/group/index.less +42 -0
  244. package/lib/components/dataSourceComponents/dataSourceForm/index.d.ts +3 -0
  245. package/lib/components/dataSourceComponents/dataSourceForm/index.js +103 -0
  246. package/lib/components/dataSourceComponents/dataSourceForm/index.less +24 -0
  247. package/lib/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingContext.d.ts +10 -0
  248. package/lib/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingContext.js +35 -0
  249. package/lib/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingProvider.d.ts +8 -0
  250. package/lib/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingProvider.js +54 -0
  251. package/lib/components/dataSourceComponents/dataSourceForm/provider/hooks/useFormSetting.d.ts +5 -0
  252. package/lib/components/dataSourceComponents/dataSourceForm/provider/hooks/useFormSetting.js +41 -0
  253. package/lib/components/dataSourceComponents/dataSourceForm/serve.d.ts +147 -0
  254. package/lib/components/dataSourceComponents/dataSourceForm/serve.js +141 -0
  255. package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.d.ts +36 -0
  256. package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.js +157 -0
  257. package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.less +4 -0
  258. package/lib/components/dataSourceComponents/dataSourceForm/type.d.ts +16 -0
  259. package/lib/components/dataSourceComponents/dataSourceForm/type.js +17 -0
  260. package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +36 -0
  261. package/lib/components/dataSourceComponents/dataSourceForm/utils.js +177 -0
  262. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useColumns.d.ts +11 -0
  263. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useColumns.js +85 -0
  264. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDesignMode.d.ts +2 -0
  265. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDesignMode.js +55 -0
  266. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +10 -0
  267. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.js +45 -0
  268. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useFormat.d.ts +27 -0
  269. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useFormat.js +62 -0
  270. package/lib/components/dataSourceComponents/dataSourceTable/hooks/usePagination.d.ts +16 -0
  271. package/lib/components/dataSourceComponents/dataSourceTable/hooks/usePagination.js +37 -0
  272. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +19 -0
  273. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +56 -0
  274. package/lib/components/dataSourceComponents/dataSourceTable/index.d.ts +4 -0
  275. package/lib/components/dataSourceComponents/dataSourceTable/index.js +193 -0
  276. package/lib/components/dataSourceComponents/dataSourceTable/provider/tableSetting/TableSettingContext.d.ts +7 -0
  277. package/lib/components/dataSourceComponents/dataSourceTable/provider/tableSetting/TableSettingContext.js +33 -0
  278. package/lib/components/dataSourceComponents/dataSourceTable/provider/tableSetting/TableSettingProvider.d.ts +8 -0
  279. package/lib/components/dataSourceComponents/dataSourceTable/provider/tableSetting/TableSettingProvider.js +52 -0
  280. package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +15 -0
  281. package/lib/components/dataSourceComponents/dataSourceTable/type.js +17 -0
  282. package/lib/components/dataSourceComponents/fields/Checkbox/ReadPretty.d.ts +7 -0
  283. package/lib/components/dataSourceComponents/fields/Checkbox/ReadPretty.js +47 -0
  284. package/lib/components/dataSourceComponents/fields/Checkbox/WithMode.d.ts +7 -0
  285. package/lib/components/dataSourceComponents/fields/Checkbox/WithMode.js +41 -0
  286. package/lib/components/dataSourceComponents/fields/Checkbox/index.d.ts +6 -0
  287. package/lib/components/dataSourceComponents/fields/Checkbox/index.js +40 -0
  288. package/lib/components/dataSourceComponents/fields/Checkbox/type.d.ts +9 -0
  289. package/lib/components/dataSourceComponents/fields/Checkbox/type.js +17 -0
  290. package/lib/components/dataSourceComponents/fields/ColorPicker/ReadPretty.d.ts +4 -0
  291. package/lib/components/dataSourceComponents/fields/ColorPicker/ReadPretty.js +40 -0
  292. package/lib/components/dataSourceComponents/fields/ColorPicker/WithMode.d.ts +3 -0
  293. package/lib/components/dataSourceComponents/fields/ColorPicker/WithMode.js +39 -0
  294. package/lib/components/dataSourceComponents/fields/ColorPicker/index.d.ts +3 -0
  295. package/lib/components/dataSourceComponents/fields/ColorPicker/index.js +38 -0
  296. package/lib/components/dataSourceComponents/fields/ColorPicker/type.d.ts +5 -0
  297. package/lib/components/dataSourceComponents/fields/ColorPicker/type.js +17 -0
  298. package/lib/components/dataSourceComponents/fields/DatePicker/ReadPretty.d.ts +4 -0
  299. package/lib/components/dataSourceComponents/fields/DatePicker/ReadPretty.js +41 -0
  300. package/lib/components/dataSourceComponents/fields/DatePicker/WithMode.d.ts +4 -0
  301. package/lib/components/dataSourceComponents/fields/DatePicker/WithMode.js +50 -0
  302. package/lib/components/dataSourceComponents/fields/DatePicker/index.d.ts +3 -0
  303. package/lib/components/dataSourceComponents/fields/DatePicker/index.js +38 -0
  304. package/lib/components/dataSourceComponents/fields/DatePicker/type.d.ts +5 -0
  305. package/lib/components/dataSourceComponents/fields/DatePicker/type.js +17 -0
  306. package/lib/components/dataSourceComponents/fields/Input/ReadPretty.d.ts +4 -0
  307. package/lib/components/dataSourceComponents/fields/Input/ReadPretty.js +39 -0
  308. package/lib/components/dataSourceComponents/fields/Input/WithMode.d.ts +4 -0
  309. package/lib/components/dataSourceComponents/fields/Input/WithMode.js +39 -0
  310. package/lib/components/dataSourceComponents/fields/Input/index.d.ts +13 -0
  311. package/lib/components/dataSourceComponents/fields/Input/index.js +46 -0
  312. package/lib/components/dataSourceComponents/fields/Input/type.d.ts +5 -0
  313. package/lib/components/dataSourceComponents/fields/Input/type.js +17 -0
  314. package/lib/components/dataSourceComponents/fields/Input.Json/ReadPretty.d.ts +4 -0
  315. package/lib/components/dataSourceComponents/fields/Input.Json/ReadPretty.js +45 -0
  316. package/lib/components/dataSourceComponents/fields/Input.Json/WithMode.d.ts +3 -0
  317. package/lib/components/dataSourceComponents/fields/Input.Json/WithMode.js +39 -0
  318. package/lib/components/dataSourceComponents/fields/Input.Json/index.d.ts +3 -0
  319. package/lib/components/dataSourceComponents/fields/Input.Json/index.js +38 -0
  320. package/lib/components/dataSourceComponents/fields/Input.Json/type.d.ts +5 -0
  321. package/lib/components/dataSourceComponents/fields/Input.Json/type.js +17 -0
  322. package/lib/components/dataSourceComponents/fields/Input.Password/ReadPretty.d.ts +4 -0
  323. package/lib/components/dataSourceComponents/fields/Input.Password/ReadPretty.js +39 -0
  324. package/lib/components/dataSourceComponents/fields/Input.Password/WithMode.d.ts +3 -0
  325. package/lib/components/dataSourceComponents/fields/Input.Password/WithMode.js +39 -0
  326. package/lib/components/dataSourceComponents/fields/Input.Password/index.d.ts +3 -0
  327. package/lib/components/dataSourceComponents/fields/Input.Password/index.js +38 -0
  328. package/lib/components/dataSourceComponents/fields/Input.Password/type.d.ts +5 -0
  329. package/lib/components/dataSourceComponents/fields/Input.Password/type.js +17 -0
  330. package/lib/components/dataSourceComponents/fields/Input.TextArea/ReadPretty.d.ts +4 -0
  331. package/lib/components/dataSourceComponents/fields/Input.TextArea/ReadPretty.js +39 -0
  332. package/lib/components/dataSourceComponents/fields/Input.TextArea/WithMode.d.ts +3 -0
  333. package/lib/components/dataSourceComponents/fields/Input.TextArea/WithMode.js +39 -0
  334. package/lib/components/dataSourceComponents/fields/Input.TextArea/index.d.ts +3 -0
  335. package/lib/components/dataSourceComponents/fields/Input.TextArea/index.js +38 -0
  336. package/lib/components/dataSourceComponents/fields/Input.TextArea/type.d.ts +5 -0
  337. package/lib/components/dataSourceComponents/fields/Input.TextArea/type.js +17 -0
  338. package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.d.ts +4 -0
  339. package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.js +41 -0
  340. package/lib/components/dataSourceComponents/fields/Input.Url/WithMode.d.ts +3 -0
  341. package/lib/components/dataSourceComponents/fields/Input.Url/WithMode.js +39 -0
  342. package/lib/components/dataSourceComponents/fields/Input.Url/index.d.ts +3 -0
  343. package/lib/components/dataSourceComponents/fields/Input.Url/index.js +38 -0
  344. package/lib/components/dataSourceComponents/fields/Input.Url/type.d.ts +5 -0
  345. package/lib/components/dataSourceComponents/fields/Input.Url/type.js +17 -0
  346. package/lib/components/dataSourceComponents/fields/InputNumber/ReadPretty.d.ts +4 -0
  347. package/lib/components/dataSourceComponents/fields/InputNumber/ReadPretty.js +40 -0
  348. package/lib/components/dataSourceComponents/fields/InputNumber/WithMode.d.ts +3 -0
  349. package/lib/components/dataSourceComponents/fields/InputNumber/WithMode.js +42 -0
  350. package/lib/components/dataSourceComponents/fields/InputNumber/index.d.ts +3 -0
  351. package/lib/components/dataSourceComponents/fields/InputNumber/index.js +38 -0
  352. package/lib/components/dataSourceComponents/fields/InputNumber/type.d.ts +5 -0
  353. package/lib/components/dataSourceComponents/fields/InputNumber/type.js +17 -0
  354. package/lib/components/dataSourceComponents/fields/Radio/ReadPretty.d.ts +7 -0
  355. package/lib/components/dataSourceComponents/fields/Radio/ReadPretty.js +47 -0
  356. package/lib/components/dataSourceComponents/fields/Radio/WithMode.d.ts +7 -0
  357. package/lib/components/dataSourceComponents/fields/Radio/WithMode.js +41 -0
  358. package/lib/components/dataSourceComponents/fields/Radio/index.d.ts +6 -0
  359. package/lib/components/dataSourceComponents/fields/Radio/index.js +40 -0
  360. package/lib/components/dataSourceComponents/fields/Radio/type.d.ts +8 -0
  361. package/lib/components/dataSourceComponents/fields/Radio/type.js +17 -0
  362. package/lib/components/dataSourceComponents/fields/Select/ReadPretty.d.ts +4 -0
  363. package/lib/components/dataSourceComponents/fields/Select/ReadPretty.js +42 -0
  364. package/lib/components/dataSourceComponents/fields/Select/WithMode.d.ts +4 -0
  365. package/lib/components/dataSourceComponents/fields/Select/WithMode.js +39 -0
  366. package/lib/components/dataSourceComponents/fields/Select/index.d.ts +3 -0
  367. package/lib/components/dataSourceComponents/fields/Select/index.js +38 -0
  368. package/lib/components/dataSourceComponents/fields/Select/type.d.ts +5 -0
  369. package/lib/components/dataSourceComponents/fields/Select/type.js +17 -0
  370. package/lib/components/dataSourceComponents/fields/TimePicker/ReadPretty.d.ts +4 -0
  371. package/lib/components/dataSourceComponents/fields/TimePicker/ReadPretty.js +40 -0
  372. package/lib/components/dataSourceComponents/fields/TimePicker/WithMode.d.ts +4 -0
  373. package/lib/components/dataSourceComponents/fields/TimePicker/WithMode.js +39 -0
  374. package/lib/components/dataSourceComponents/fields/TimePicker/index.d.ts +3 -0
  375. package/lib/components/dataSourceComponents/fields/TimePicker/index.js +38 -0
  376. package/lib/components/dataSourceComponents/fields/TimePicker/type.d.ts +5 -0
  377. package/lib/components/dataSourceComponents/fields/TimePicker/type.js +17 -0
  378. package/lib/components/dataSourceComponents/fields/index.d.ts +16 -0
  379. package/lib/components/dataSourceComponents/fields/index.js +64 -0
  380. package/lib/components/dataSourceComponents/hooks/useActions.d.ts +16 -0
  381. package/lib/components/dataSourceComponents/hooks/useActions.js +184 -0
  382. package/lib/components/dataSourceComponents/hooks/useCtxActions.d.ts +8 -0
  383. package/lib/components/dataSourceComponents/hooks/useCtxActions.js +41 -0
  384. package/lib/components/dataSourceComponents/hooks/useDataSource.d.ts +5 -0
  385. package/lib/components/dataSourceComponents/hooks/useDataSource.js +41 -0
  386. package/lib/components/dataSourceComponents/hooks/useParseActionsVariable.d.ts +6 -0
  387. package/lib/components/dataSourceComponents/hooks/useParseActionsVariable.js +73 -0
  388. package/lib/components/dataSourceComponents/hooks/useValueMap.d.ts +8 -0
  389. package/lib/components/dataSourceComponents/hooks/useValueMap.js +39 -0
  390. package/lib/components/dataSourceComponents/hooks/useVariables.d.ts +2 -0
  391. package/lib/components/dataSourceComponents/hooks/useVariables.js +40 -0
  392. package/lib/components/dataSourceComponents/provider/actions/ActionsContext.d.ts +6 -0
  393. package/lib/components/dataSourceComponents/provider/actions/ActionsContext.js +27 -0
  394. package/lib/components/dataSourceComponents/provider/actions/ActionsProvider.d.ts +9 -0
  395. package/lib/components/dataSourceComponents/provider/actions/ActionsProvider.js +46 -0
  396. package/lib/components/dataSourceComponents/provider/fields/DataSourceContext.d.ts +75 -0
  397. package/lib/components/dataSourceComponents/provider/fields/DataSourceContext.js +35 -0
  398. package/lib/components/dataSourceComponents/provider/fields/DataSourceProvider.d.ts +8 -0
  399. package/lib/components/dataSourceComponents/provider/fields/DataSourceProvider.js +46 -0
  400. package/lib/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +9 -0
  401. package/lib/components/dataSourceComponents/provider/variables/VariablesContext.js +39 -0
  402. package/lib/components/dataSourceComponents/provider/variables/VariablesProvider.d.ts +4 -0
  403. package/lib/components/dataSourceComponents/provider/variables/VariablesProvider.js +104 -0
  404. package/lib/components/form/index.d.ts +2 -8
  405. package/lib/components/form/index.js +3 -2
  406. package/lib/components/page/index.js +7 -3
  407. package/lib/components/pisellAnchor/index.js +0 -5
  408. package/lib/components/pisellStatistic/index.js +0 -5
  409. package/lib/components/pisellUpload/index.js +0 -5
  410. package/lib/components/pisellUploadCrop/index.js +0 -5
  411. package/lib/components/pisellWalletCard/index.js +0 -10
  412. package/lib/components/pisellWalletPassCard/index.js +3 -0
  413. package/lib/components/productCard/components/Action/index.d.ts +4 -0
  414. package/lib/components/productCard/components/{Actions → Action}/index.js +11 -10
  415. package/{es/components/productCard/components/Actions → lib/components/productCard/components/Action}/index.less +1 -1
  416. package/lib/components/productCard/components/AmountFooter/index.d.ts +2 -2
  417. package/lib/components/productCard/components/AmountFooter/index.js +8 -8
  418. package/lib/components/productCard/components/AmountFooter/index.less +9 -0
  419. package/lib/components/productCard/components/Header/index.d.ts +1 -1
  420. package/lib/components/productCard/components/Header/index.js +8 -8
  421. package/lib/components/productCard/components/Header/index.less +4 -0
  422. package/lib/components/productCard/components/Note/index.d.ts +1 -1
  423. package/lib/components/productCard/components/Note/index.js +14 -2
  424. package/lib/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +1 -1
  425. package/lib/components/productCard/components/Packages/components/collapsibleList/utils.js +7 -3
  426. package/lib/components/productCard/components/Packages/components/options/index.less +1 -0
  427. package/lib/components/productCard/components/Packages/index.d.ts +1 -1
  428. package/lib/components/productCard/components/Packages/index.js +7 -3
  429. package/lib/components/productCard/components/Sales/index.d.ts +1 -1
  430. package/lib/components/productCard/components/Sales/index.js +13 -3
  431. package/lib/components/productCard/components/Time/components/Like/index.d.ts +2 -2
  432. package/lib/components/productCard/components/Time/components/Like/index.js +3 -3
  433. package/lib/components/productCard/components/Time/index.d.ts +1 -1
  434. package/lib/components/productCard/components/Time/index.js +17 -10
  435. package/lib/components/productCard/components/Time/index.less +10 -0
  436. package/lib/components/productCard/hooks/useOpenNote.d.ts +3 -0
  437. package/lib/components/productCard/hooks/useOpenNote.js +79 -0
  438. package/lib/components/productCard/index.js +96 -43
  439. package/lib/components/productCard/index.less +8 -3
  440. package/lib/components/productCard/locales.d.ts +24 -0
  441. package/lib/components/productCard/locales.js +47 -0
  442. package/lib/components/productCard/types.d.ts +6 -0
  443. package/lib/components/productCard/utils.js +18 -3
  444. package/lib/components/record-view/index.js +0 -15
  445. package/lib/components/section-footers/index.js +0 -5
  446. package/lib/components/select/index.d.ts +1 -1
  447. package/lib/components/select/index.js +2 -1
  448. package/lib/components/table/utils.d.ts +5 -6
  449. package/lib/components/table/utils.js +7 -1
  450. package/lib/components/tabs/index.js +0 -20
  451. package/lib/hooks/useSetRequest.d.ts +2 -0
  452. package/lib/hooks/useSetRequest.js +42 -0
  453. package/lib/index.d.ts +13 -0
  454. package/lib/index.js +39 -0
  455. package/lib/utils/index.d.ts +1 -0
  456. package/lib/utils/index.js +4 -1
  457. package/lib/utils/mergeWith.d.ts +1 -0
  458. package/lib/utils/mergeWith.js +56 -0
  459. package/lowcode/_utils/defaultSchema.ts +430 -0
  460. package/lowcode/color-picker/__screenshots__/input-1.png +0 -0
  461. package/lowcode/color-picker/meta.ts +298 -0
  462. package/lowcode/color-picker/snippets.ts +9 -0
  463. package/lowcode/data-source-form/__screenshots__/form-1.png +0 -0
  464. package/lowcode/data-source-form/constants.ts +39 -0
  465. package/lowcode/data-source-form/meta.ts +797 -0
  466. package/lowcode/data-source-form/snippets.ts +130 -0
  467. package/lowcode/data-source-form/utils.ts +343 -0
  468. package/lowcode/data-source-table/__screenshots__/table-1.png +0 -0
  469. package/lowcode/data-source-table/meta.ts +2697 -0
  470. package/lowcode/data-source-table/snippets.ts +84 -0
  471. package/lowcode/data-source-table/utils.tsx +140 -0
  472. package/lowcode/form/meta.ts +118 -22
  473. package/lowcode/form/snippets.ts +2 -481
  474. package/lowcode/form-group/meta.ts +346 -0
  475. package/lowcode/form-group/snippets.ts +16 -0
  476. package/lowcode/form-item-checkbox/meta.ts +88 -0
  477. package/lowcode/form-item-checkbox/snippets.ts +35 -0
  478. package/lowcode/form-item-checkbox.group/__screenshots__/checkbox-group-1.png +0 -0
  479. package/lowcode/form-item-checkbox.group/meta.ts +159 -0
  480. package/lowcode/form-item-color-picker/__screenshots__/input-1.png +0 -0
  481. package/lowcode/form-item-color-picker/meta.ts +301 -0
  482. package/lowcode/form-item-color-picker/snippets.ts +9 -0
  483. package/lowcode/form-item-date-picker/__screenshots__/date-picker-1.png +0 -0
  484. package/lowcode/form-item-date-picker/__screenshots__/date-picker-2.png +0 -0
  485. package/lowcode/form-item-date-picker/__screenshots__/date-picker-3.png +0 -0
  486. package/lowcode/form-item-date-picker/__screenshots__/date-picker-4.png +0 -0
  487. package/lowcode/form-item-date-picker/__screenshots__/date-picker-5.png +0 -0
  488. package/lowcode/form-item-date-picker/meta.ts +290 -0
  489. package/lowcode/form-item-date-picker/snippets.ts +50 -0
  490. package/lowcode/form-item-input/__screenshots__/input-1.png +0 -0
  491. package/lowcode/form-item-input/meta.ts +227 -0
  492. package/lowcode/form-item-input/snippets.ts +12 -0
  493. package/lowcode/form-item-input-number/__screenshots__/input-number-1.png +0 -0
  494. package/lowcode/form-item-input-number/meta.ts +228 -0
  495. package/lowcode/form-item-input-number/snippets.ts +12 -0
  496. package/lowcode/form-item-input.json/meta.ts +213 -0
  497. package/lowcode/form-item-input.json/snippets.ts +16 -0
  498. package/lowcode/form-item-input.password/__screenshots__/input-password-1.png +0 -0
  499. package/lowcode/form-item-input.password/meta.ts +198 -0
  500. package/lowcode/form-item-input.password/snippets.ts +12 -0
  501. package/lowcode/form-item-input.text-area/__screenshots__/input-text-area-1.png +0 -0
  502. package/lowcode/form-item-input.text-area/meta.ts +213 -0
  503. package/lowcode/form-item-input.text-area/snippets.ts +16 -0
  504. package/lowcode/form-item-input.url/meta.ts +213 -0
  505. package/lowcode/form-item-input.url/snippets.ts +15 -0
  506. package/lowcode/form-item-radio/__screenshots__/radio-1.png +0 -0
  507. package/lowcode/form-item-radio/meta.ts +72 -0
  508. package/lowcode/form-item-radio/snippets.ts +36 -0
  509. package/lowcode/form-item-radio.group/__screenshots__/radio-group-1.png +0 -0
  510. package/lowcode/form-item-radio.group/meta.ts +221 -0
  511. package/lowcode/form-item-select/__screenshots__/select-1.png +0 -0
  512. package/lowcode/form-item-select/meta.ts +463 -0
  513. package/lowcode/form-item-select/snippets.ts +28 -0
  514. package/lowcode/form-item-time-picker/__screenshots__/time-picker-1.png +0 -0
  515. package/lowcode/form-item-time-picker/meta.ts +235 -0
  516. package/lowcode/form-item-time-picker/snippets.ts +10 -0
  517. package/lowcode/form.item/meta.ts +104 -25
  518. package/lowcode/pisell-text.amount/meta.ts +1 -1
  519. package/lowcode/product-card/snippets.ts +10 -2
  520. package/lowcode/submit-button/meta.ts +1002 -0
  521. package/lowcode/submit-button/snippets.ts +15 -0
  522. package/lowcode/timeline/meta.ts +1 -2
  523. package/package.json +2 -2
  524. package/es/components/productCard/components/Actions/index.d.ts +0 -4
  525. package/es/components/productCard/components/Holder/index.d.ts +0 -4
  526. package/es/components/productCard/components/Holder/index.js +0 -11
  527. package/es/components/productCard/components/Holder/index.less +0 -11
  528. package/lib/components/productCard/components/Actions/index.d.ts +0 -4
  529. package/lib/components/productCard/components/Holder/index.d.ts +0 -4
  530. package/lib/components/productCard/components/Holder/index.less +0 -11
@@ -0,0 +1,2697 @@
1
+ import snippets from './snippets';
2
+ import button from '../button/meta';
3
+ import { columns2Options, fields2Columns } from './utils';
4
+ import {
5
+ fields2ChildrenSchemas,
6
+ getVariable,
7
+ getAllVariables,
8
+ clearVariables,
9
+ setBatchVariables,
10
+ createSubmitButton,
11
+ } from '../data-source-form/utils';
12
+
13
+ const getI18n = (
14
+ item:
15
+ | {
16
+ type: string;
17
+ key: string;
18
+ en: string;
19
+ 'zh-CN': string;
20
+ 'zh-HK': string;
21
+ }
22
+ | string
23
+ ) => {
24
+ if (typeof item === 'string') {
25
+ return item;
26
+ }
27
+ if (item.type === 'i18n') {
28
+ return item['zh-CN'] || item['zh-HK'] || item['en'];
29
+ }
30
+ };
31
+
32
+ const getFormContent = (target: any, mode: 'add' | 'edit' | 'view') => {
33
+ const fields = getVariable(target, 'currentFields');
34
+ let childrenSchemas = fields2ChildrenSchemas(fields, mode);
35
+ const titleMap = {
36
+ add: '表单(添加)',
37
+ edit: '编辑',
38
+ view: '详情'
39
+ };
40
+ const title = titleMap[mode];
41
+
42
+ if (['add', 'edit'].includes(mode)) {
43
+ childrenSchemas = childrenSchemas.concat(
44
+ createSubmitButton({
45
+ afterSubmitType: 'close'
46
+ })
47
+ )
48
+ }
49
+
50
+ return {
51
+ type: 'JSSlot',
52
+ params: [],
53
+ value: [
54
+ {
55
+ componentName: 'DataSourceForm',
56
+ title,
57
+ props: {
58
+ _variables: getAllVariables(target),
59
+ dataSource: target.node.getProps().getPropValue('dataSource'),
60
+ showTitle: false,
61
+ showDescription: false,
62
+ groupInfoPosition: 'top',
63
+ layout: 'vertical',
64
+ size: 'large',
65
+ mode,
66
+ currentValue: mode !== 'add' ? '{{currentRecord}}' : undefined,
67
+ },
68
+ children: childrenSchemas,
69
+ },
70
+ ],
71
+ };
72
+ };
73
+
74
+ export default {
75
+ snippets,
76
+ componentName: 'DataSourceTable',
77
+ title: '表格',
78
+ category: '数据展示',
79
+ group: '无代码组件',
80
+ docUrl: '',
81
+ screenshot: '',
82
+ devMode: 'proCode',
83
+ npm: {
84
+ package: '@pisell/materials',
85
+ version: '1.0.1',
86
+ exportName: 'DataSourceTable',
87
+ main: 'src/index.tsx',
88
+ destructuring: true,
89
+ subName: '',
90
+ },
91
+ generalProps: [
92
+ {
93
+ type: 'group',
94
+ title: {
95
+ type: 'i18n',
96
+ 'en-US': 'Data',
97
+ 'zh-CN': '数据',
98
+ },
99
+ display: 'accordion',
100
+ items: [
101
+ {
102
+ name: 'dataSource',
103
+ title: {
104
+ type: 'i18n',
105
+ 'en-US': 'Source',
106
+ 'zh-CN': '数据源',
107
+ },
108
+ display: 'block',
109
+ extraProps: {
110
+ setValue(target: any, value: any) {
111
+ // 如果value为空,则清空表格
112
+ if (!value.item) {
113
+ target.getProps().setPropValue('columns', []);
114
+ clearVariables(target);
115
+ return target.getProps().setPropValue('dataSource', '');
116
+ }
117
+
118
+ // 如果重新选择选择数据源,则清空表格
119
+ if (value.isSelect) {
120
+ target.getProps().setPropValue('columns', []);
121
+ }
122
+
123
+ const columns = fields2Columns(value.item.fields);
124
+
125
+ target.getProps().setPropValue('columns', columns);
126
+
127
+ setBatchVariables(target, [
128
+ {
129
+ label: 'currentFields',
130
+ value: value.item.fields,
131
+ },
132
+ {
133
+ label: 'dataSourceVariables',
134
+ value: [
135
+ {
136
+ label: '当前数据表',
137
+ value: value.value,
138
+ item: value.item,
139
+ },
140
+ ],
141
+ },
142
+ {
143
+ label: 'dataSourceTitle',
144
+ value: value.title,
145
+ },
146
+ {
147
+ label: 'currentValueVariables',
148
+ value: [
149
+ {
150
+ label: '当前行数据',
151
+ value: '{{currentRecord}}',
152
+ },
153
+ ],
154
+ },
155
+ ]);
156
+
157
+ return target.getProps().setPropValue('dataSource', value.item);
158
+ },
159
+ },
160
+ setter: {
161
+ componentName: 'PisellDataSourceSetter',
162
+ },
163
+ },
164
+ {
165
+ title: '字段',
166
+ name: '_fields',
167
+ display: 'entry',
168
+ type: 'group',
169
+ items: [
170
+ {
171
+ title: {
172
+ type: 'i18n',
173
+ 'en-US': 'Fields',
174
+ 'zh-CN': '字段',
175
+ },
176
+ name: '_fields',
177
+ propType: 'object',
178
+ display: 'block',
179
+ setter: {
180
+ componentName: 'PisellFieldSetter',
181
+ props: (target: any) => {
182
+ const columns = target.node
183
+ .getProps()
184
+ .getPropValue('columns');
185
+ const allFields = getVariable(target, 'currentFields');
186
+ const options = columns2Options(columns, allFields);
187
+ return {
188
+ options,
189
+ };
190
+ },
191
+ },
192
+ extraProps: {
193
+ setValue(target: any, value: any) {
194
+ const { operate } = value;
195
+ const { mode, field } = operate;
196
+ const fieldDetail = getVariable(target, 'currentFields').find((f: any) => f.name === field);
197
+ const columns =
198
+ target.node.getProps().getPropValue('columns') || [];
199
+
200
+ // 如果是隐藏操作
201
+ if (mode === 'hidden') {
202
+ // 过滤掉要隐藏的列
203
+ const filteredColumns = columns.filter((col: any) => {
204
+ return col.dataIndex !== field;
205
+ });
206
+ target.node.setPropValue('columns', filteredColumns);
207
+ } else if (mode === 'show') {
208
+ const newColumn = fields2Columns([fieldDetail]);
209
+ const newColumns = [...columns, ...newColumn];
210
+
211
+ target.node.setPropValue('columns', newColumns);
212
+ }
213
+ return {};
214
+ },
215
+ },
216
+ },
217
+ ],
218
+ },
219
+ ],
220
+ },
221
+ {
222
+ name: 'showDetailButton',
223
+ title: { label: '详情按钮' },
224
+ propType: 'bool',
225
+ setter: 'BoolSetter',
226
+ extraProps: {
227
+ setValue(target: any, value: any) {
228
+ if (value) {
229
+ target.node.setPropValue('detailContent', getFormContent(target, 'view'));
230
+ } else {
231
+ target.node.setPropValue('detailContent', null);
232
+ }
233
+ return target.node.setPropValue('showDetailButton', value);
234
+ },
235
+ },
236
+ },
237
+ {
238
+ condition(target) {
239
+ return false;
240
+ },
241
+ name: 'detailContent',
242
+ title: { label: '详情内容' },
243
+ propType: 'func',
244
+ setter: 'SlotSetter',
245
+ },
246
+ {
247
+ name: 'showEditButton',
248
+ title: { label: '编辑按钮' },
249
+ propType: 'bool',
250
+ setter: 'BoolSetter',
251
+ extraProps: {
252
+ setValue(target: any, value: any) {
253
+ if (value) {
254
+ target.node.setPropValue('editContent', getFormContent(target, 'edit'));
255
+ } else {
256
+ target.node.setPropValue('editContent', null);
257
+ }
258
+ return target.node.setPropValue('showEditButton', value);
259
+ },
260
+ },
261
+ },
262
+ {
263
+ condition(target) {
264
+ return false;
265
+ },
266
+ name: 'editContent',
267
+ title: { label: '编辑内容' },
268
+ propType: 'func',
269
+ setter: 'SlotSetter',
270
+ },
271
+ {
272
+ name: 'showAddButton',
273
+ title: { label: '新增按钮' },
274
+ propType: 'bool',
275
+ setter: 'BoolSetter',
276
+ extraProps: {
277
+ setValue(target: any, value: any) {
278
+ if (value) {
279
+ target.node.setPropValue('addContent', getFormContent(target, 'add'));
280
+ } else {
281
+ target.node.setPropValue('addContent', null);
282
+ }
283
+ return target.node.setPropValue('showAddButton', value);
284
+ },
285
+ },
286
+ },
287
+ {
288
+ condition(target) {
289
+ return false;
290
+ },
291
+ name: 'addContent',
292
+ title: { label: '新增内容' },
293
+ propType: 'func',
294
+ setter: 'SlotSetter',
295
+ },
296
+ {
297
+ name: 'showDeleteButton',
298
+ title: { label: '删除按钮' },
299
+ propType: 'bool',
300
+ setter: 'BoolSetter',
301
+ defaultValue: false,
302
+ },
303
+ ],
304
+ props: [
305
+ {
306
+ title: '数据源',
307
+ display: 'block',
308
+ type: 'group',
309
+ items: [
310
+ {
311
+ name: 'dataSource',
312
+ title: { label: '表格数据', tip: 'dataSource | 表格数据' },
313
+ propType: 'object',
314
+ setter: 'JsonSetter',
315
+ supportVariable: true,
316
+ },
317
+ {
318
+ name: 'loading',
319
+ title: { label: '加载中', tip: 'loading | 是否加载中' },
320
+ propType: 'bool',
321
+ setter: 'BoolSetter',
322
+ defaultValue: false,
323
+ supportVariable: true,
324
+ },
325
+ {
326
+ name: 'rowKey',
327
+ title: {
328
+ label: '行Key',
329
+ tip: 'rowKey | 表格行 key 的取值,可以是字符串或一个函数',
330
+ },
331
+ propType: { type: 'oneOfType', value: ['string', 'func'] },
332
+ setter: [
333
+ 'StringSetter',
334
+ {
335
+ componentName: 'FunctionSetter',
336
+ props: {
337
+ template:
338
+ 'getRowKey(record,index,${extParams}){\n// 通过函数获取表格行 key\nreturn record.id;\n}',
339
+ },
340
+ },
341
+ 'VariableSetter',
342
+ ],
343
+ defaultValue: 'id',
344
+ },
345
+ {
346
+ name: 'currentSettingKey',
347
+ title: {
348
+ label: 'currentSettingKey',
349
+ tip: 'currentSettingKey | 当前本地配置的key 用此hash是否改变用来判断是否清空本地配置 不填默认使用columns数据生成hash',
350
+ },
351
+ propType: 'string',
352
+ setter: 'StringSetter',
353
+ },
354
+ {
355
+ name: 'currentComponentId',
356
+ title: {
357
+ label: 'currentComponentId',
358
+ tip: 'currentComponentId | 当前本地配置的唯一值 不填默认使用currentSettingKey',
359
+ },
360
+ propType: 'string',
361
+ setter: 'StringSetter',
362
+ },
363
+ ],
364
+ },
365
+ {
366
+ name: 'columns',
367
+ title: { label: '表格列', tip: '表格列的配置描述,具体项见下表' },
368
+ setter: {
369
+ componentName: 'ArraySetter',
370
+ props: {
371
+ itemSetter: {
372
+ componentName: 'ObjectSetter',
373
+ props: {
374
+ config: {
375
+ items: [
376
+ {
377
+ name: 'title',
378
+ title: { label: '列标题', tip: 'title | 列标题' },
379
+ propType: { type: 'oneOfType', value: ['string', 'func'] },
380
+ setter: [
381
+ 'PisellI18nSetter',
382
+ {
383
+ componentName: 'SlotSetter',
384
+ title: '列标题插槽',
385
+ initialValue: {
386
+ type: 'JSSlot',
387
+ params: ['options'],
388
+ value: [],
389
+ },
390
+ },
391
+ ],
392
+ },
393
+ {
394
+ name: 'dataIndex',
395
+ title: { label: '数据字段', tip: 'dataIndex | 数据字段' },
396
+ setter: [
397
+ 'StringSetter',
398
+ {
399
+ componentName: 'ArraySetter',
400
+ props: {
401
+ itemSetter: {
402
+ componentName: 'StringSetter',
403
+ },
404
+ },
405
+ },
406
+ ],
407
+ isRequired: true,
408
+ },
409
+ {
410
+ name: 'key',
411
+ title: { label: 'React key', tip: 'key | React需要的key' },
412
+ propType: 'string',
413
+ setter: 'StringSetter',
414
+ isRequired: true,
415
+ },
416
+ {
417
+ name: 'align',
418
+ title: { label: '对齐方式', tip: 'align | 对齐方式' },
419
+ propType: {
420
+ type: 'oneOf',
421
+ value: ['left', 'right', 'center'],
422
+ },
423
+ defaultValue: 'left',
424
+ setter: [
425
+ {
426
+ componentName: 'RadioGroupSetter',
427
+ props: {
428
+ options: [
429
+ {
430
+ title: 'left',
431
+ value: 'left',
432
+ },
433
+ {
434
+ title: 'right',
435
+ value: 'right',
436
+ },
437
+ {
438
+ title: 'center',
439
+ value: 'center',
440
+ },
441
+ ],
442
+ },
443
+ },
444
+ 'VariableSetter',
445
+ ],
446
+ },
447
+ {
448
+ name: 'fixed',
449
+ title: { label: '列是否固定', tip: 'fixed | 列是否固定' },
450
+ description:
451
+ '(IE 下无效)列是否固定,可选 true (等效于 left) left right',
452
+ defaultValue: '',
453
+ propType: {
454
+ type: 'oneOf',
455
+ value: ['', 'left', 'right'],
456
+ },
457
+ setter: [
458
+ {
459
+ componentName: 'RadioGroupSetter',
460
+ props: {
461
+ options: [
462
+ {
463
+ title: '不固定',
464
+ value: '',
465
+ },
466
+ {
467
+ title: '固定在左侧',
468
+ value: 'left',
469
+ },
470
+ {
471
+ title: '固定在右侧',
472
+ value: 'right',
473
+ },
474
+ ],
475
+ },
476
+ },
477
+ 'VariableSetter',
478
+ ],
479
+ },
480
+ {
481
+ name: 'className',
482
+ title: {
483
+ label: '列样式类名',
484
+ tip: 'className | 列样式类名',
485
+ },
486
+ propType: 'string',
487
+ setter: 'StringSetter',
488
+ },
489
+ {
490
+ name: 'width',
491
+ title: { label: '宽度', tip: 'width | 宽度' },
492
+ propType: {
493
+ type: 'oneOfType',
494
+ value: ['number', 'string'],
495
+ },
496
+ setter: ['NumberSetter', 'StringSetter', 'VariableSetter'],
497
+ },
498
+ {
499
+ name: 'sorter',
500
+ title: {
501
+ label: '排序规则',
502
+ tip: 'sorter | 排序函数,本地排序使用一个函数,需要服务端排序可设为 true',
503
+ },
504
+ propType: { type: 'oneOfType', value: ['bool', 'func'] },
505
+ setter: ['BoolSetter', 'FunctionSetter', 'VariableSetter'],
506
+ },
507
+ {
508
+ name: 'defaultFilters',
509
+ title: {
510
+ label: '默认筛选',
511
+ tip: 'defaultFilters | 是否开启默认筛选',
512
+ },
513
+ propType: 'bool',
514
+ setter: 'BoolSetter',
515
+ },
516
+ {
517
+ name: 'hidden',
518
+ title: {
519
+ label: '是否隐藏',
520
+ tip: 'hidden | 是否隐藏当前列',
521
+ },
522
+ propType: 'bool',
523
+ setter: 'BoolSetter',
524
+ },
525
+ {
526
+ name: 'filters',
527
+ title: {
528
+ label: '筛选菜单项',
529
+ tip: 'filters | 表头的筛选菜单项',
530
+ },
531
+ propType: 'object',
532
+ setter: 'JsonSetter',
533
+ },
534
+ {
535
+ name: 'other',
536
+ title: {
537
+ label: '其他拓展属性',
538
+ tip: '其他拓展属性',
539
+ },
540
+ propType: 'object',
541
+ setter: 'JsonSetter',
542
+ },
543
+ {
544
+ name: 'field_type',
545
+ title: { label: '字段类型', tip: '所筛选的字段类型' },
546
+ propType: 'string',
547
+ setter: {
548
+ componentName: 'SelectSetter',
549
+ mode: 'single',
550
+ defaultValue: 'text',
551
+ props: {
552
+ options: [
553
+ {
554
+ title: '文本',
555
+ value: 'text',
556
+ },
557
+ {
558
+ title: '单选',
559
+ value: 'select',
560
+ },
561
+ {
562
+ title: '数字',
563
+ value: 'number',
564
+ },
565
+ {
566
+ title: '日期',
567
+ value: 'date',
568
+ },
569
+ {
570
+ title: '链接',
571
+ value: 'link',
572
+ },
573
+ ],
574
+ },
575
+ },
576
+ },
577
+ {
578
+ name: 'render',
579
+ title: {
580
+ label: '自定义渲染',
581
+ tip: 'render | 插槽内的物料表达式可通过this.record获取当前行数据,this.index获取索引',
582
+ },
583
+ propType: 'func',
584
+ setter: [
585
+ {
586
+ componentName: 'SlotSetter',
587
+ title: '单元格插槽',
588
+ initialValue: {
589
+ type: 'JSSlot',
590
+ params: ['text', 'record', 'index'],
591
+ value: [],
592
+ },
593
+ },
594
+ 'VariableSetter',
595
+ ],
596
+ },
597
+ {
598
+ name: 'action',
599
+ title: { label: 'Action', tip: 'Action' },
600
+ propType: 'string',
601
+ setter: 'StringSetter',
602
+ },
603
+ {
604
+ name: 'contentClassName',
605
+ title: {
606
+ label: '内容样式类名',
607
+ tip: '内容样式类名',
608
+ },
609
+ propType: 'string',
610
+ setter: 'StringSetter',
611
+ },
612
+ ],
613
+ },
614
+ },
615
+ initialValue: { title: '标题', width: 250, dataIndex: '' },
616
+ },
617
+ },
618
+ },
619
+ },
620
+ {
621
+ title: '视图',
622
+ display: 'block',
623
+ type: 'group',
624
+ items: [
625
+ {
626
+ name: 'view.defaultViewMode',
627
+ title: {
628
+ label: '默认视图',
629
+ tip: 'view.defaultViewMode | 组件默认展示视图',
630
+ },
631
+ propType: 'string',
632
+ setter: {
633
+ componentName: 'RadioGroupSetter',
634
+ props: {
635
+ options: [
636
+ {
637
+ title: 'Grid',
638
+ value: 'grid',
639
+ },
640
+ {
641
+ title: 'Gallery',
642
+ value: 'gallery',
643
+ },
644
+ {
645
+ title: 'Kanban',
646
+ value: 'kanban',
647
+ },
648
+ ],
649
+ },
650
+ },
651
+ },
652
+ {
653
+ name: 'view.multiple',
654
+ title: {
655
+ label: '开启多视图',
656
+ tip: 'view.multiple | 开启多视图后可以进行不同组件类型切换',
657
+ },
658
+ propType: 'bool',
659
+ setter: 'BoolSetter',
660
+ defaultValue: false,
661
+ },
662
+ {
663
+ name: 'view.modeList',
664
+ title: {
665
+ label: '多视图',
666
+ tip: 'view.modeList | 组件多视图选项',
667
+ },
668
+ condition(target) {
669
+ return !!target.getProps().getPropValue('view.multiple');
670
+ },
671
+ setter: {
672
+ componentName: 'SelectSetter',
673
+ props: {
674
+ mode: 'multiple',
675
+ options: [
676
+ {
677
+ title: 'Grid',
678
+ value: 'grid',
679
+ },
680
+ {
681
+ title: 'Gallery',
682
+ value: 'gallery',
683
+ },
684
+ {
685
+ title: 'Kanban',
686
+ value: 'kanban',
687
+ },
688
+ ],
689
+ },
690
+ },
691
+ },
692
+ ],
693
+ },
694
+ {
695
+ title: 'Gallery',
696
+ display: 'entry',
697
+ type: 'group',
698
+ items: [
699
+ {
700
+ name: 'gallery.cardMinWidth',
701
+ title: {
702
+ label: '卡片最小宽度',
703
+ tip: '卡片最小宽度,屏幕尺寸改变时卡片宽度始终保持在最大最小之间|gallery.cardMinWidth',
704
+ },
705
+ setter: 'NumberSetter',
706
+ defaultValue: 260,
707
+ },
708
+ {
709
+ name: 'gallery.cardMaxWidth',
710
+ title: {
711
+ label: '卡片最大宽度',
712
+ tip: '卡片最大宽度,屏幕尺寸改变时卡片宽度始终保持在最大最小之间|gallery.cardMaxWidth',
713
+ },
714
+ setter: 'NumberSetter',
715
+ defaultValue: 340,
716
+ },
717
+ {
718
+ name: 'gallery.horizontalGutter',
719
+ title: {
720
+ label: '水平间隔',
721
+ tip: '水平间隔|gallery.horizontalGutter',
722
+ },
723
+ setter: 'NumberSetter',
724
+ defaultValue: 32,
725
+ },
726
+ {
727
+ name: 'gallery.verticalGutter',
728
+ title: { label: '垂直间隔', tip: '垂直间隔|gallery.verticalGutter' },
729
+ setter: 'NumberSetter',
730
+ defaultValue: 32,
731
+ },
732
+ {
733
+ name: 'gallery.fixedHeight',
734
+ title: { label: '高度固定', tip: '高度固定|gallery.fixedHeight' },
735
+ setter: 'BoolSetter',
736
+ },
737
+ {
738
+ name: 'gallery.cardHeight',
739
+ title: { label: '卡片高度', tip: '卡片高度|gallery.cardHeight' },
740
+ setter: 'NumberSetter',
741
+ condition: {
742
+ type: 'JSFunction',
743
+ value:
744
+ 'target => !!target.getProps().getPropValue("gallery.fixedHeight")',
745
+ },
746
+ },
747
+ {
748
+ name: 'gallery.fixedHeader',
749
+ title: {
750
+ label: '固定顶部',
751
+ tip: '是否固定顶部|gallery.fixedHeader',
752
+ },
753
+ setter: 'BoolSetter',
754
+ condition: {
755
+ type: 'JSFunction',
756
+ value:
757
+ 'target => !!target.getProps().getPropValue("gallery.fixedHeight")',
758
+ },
759
+ },
760
+ {
761
+ name: 'gallery.fixedFooter',
762
+ title: {
763
+ label: '固定底部',
764
+ tip: '是否固定底部|gallery.fixedFooter',
765
+ },
766
+ setter: 'BoolSetter',
767
+ condition: {
768
+ type: 'JSFunction',
769
+ value:
770
+ 'target => !!target.getProps().getPropValue("gallery.fixedHeight")',
771
+ },
772
+ },
773
+ {
774
+ name: 'gallery.footer.render',
775
+ title: {
776
+ label: '底部渲染函数',
777
+ tip: '底部渲染函数 |gallery.footer.render',
778
+ },
779
+ propType: 'func',
780
+ setter: [
781
+ {
782
+ componentName: 'SlotSetter',
783
+ title: '底部函数插槽',
784
+ initialValue: {
785
+ type: 'JSSlot',
786
+ params: ['record', 'index'],
787
+ value: [],
788
+ },
789
+ },
790
+ {
791
+ componentName: 'FunctionSetter',
792
+ props: {
793
+ template: 'footer(){\n// 自定义渲染底部\nreturn `Footer`;\n}',
794
+ },
795
+ },
796
+ 'VariableSetter',
797
+ ],
798
+ },
799
+ {
800
+ name: 'gallery.footer.height',
801
+ title: { label: '底部高度', tip: '底部高度|gallery.footer.height' },
802
+ setter: 'NumberSetter',
803
+ condition: {
804
+ type: 'JSFunction',
805
+ value:
806
+ 'target => !!target.getProps().getPropValue("gallery.footer.render")',
807
+ },
808
+ },
809
+ {
810
+ name: 'gallery.onItem',
811
+ title: { label: '卡片点击事件', tip: '卡片点击事件|gallery.onItem' },
812
+ setter: {
813
+ componentName: 'FunctionSetter',
814
+ props: {
815
+ template:
816
+ "onItem(record,index){\n// 卡片点击事件\nconsole.log(record,index,'record,index');\n}",
817
+ },
818
+ },
819
+ },
820
+ {
821
+ title: '头部区域',
822
+ display: 'block',
823
+ type: 'group',
824
+ items: [
825
+ {
826
+ name: 'gallery.cover.show',
827
+ title: { label: '封面开启', tip: '封面开启|gallery.cover.show' },
828
+ setter: 'BoolSetter',
829
+ defaultValue: true,
830
+ },
831
+ {
832
+ name: 'gallery.cover.fields',
833
+ title: {
834
+ label: '封面内容',
835
+ tip: 'gallery.cover.fields | 封面内容字段',
836
+ },
837
+ setter: {
838
+ componentName: 'SelectSetter',
839
+ props: (target) => {
840
+ const columns =
841
+ target.parent.parent.parent.getPropValue('columns');
842
+ return {
843
+ mode: 'multiple',
844
+ options:
845
+ columns?.map?.((item) => ({
846
+ title:
847
+ typeof item.title === 'string'
848
+ ? item.title
849
+ : item.key,
850
+ value: item.key,
851
+ })) || [],
852
+ };
853
+ },
854
+ },
855
+ condition: {
856
+ type: 'JSFunction',
857
+ value:
858
+ 'target => !!target.getProps().getPropValue("gallery.cover.show")',
859
+ },
860
+ },
861
+ {
862
+ name: 'gallery.cover.height',
863
+ title: {
864
+ label: '封面高度',
865
+ tip: 'gallery.cover.height | 封面高度',
866
+ },
867
+ propType: 'number',
868
+ setter: 'NumberSetter',
869
+ defaultValue: 230,
870
+ condition: {
871
+ type: 'JSFunction',
872
+ value:
873
+ 'target => !!target.getProps().getPropValue("gallery.cover.show")',
874
+ },
875
+ },
876
+ {
877
+ name: 'gallery.cover.objectFit',
878
+ title: {
879
+ label: '封面效果',
880
+ tip: 'gallery.cover.objectFit | 封面效果',
881
+ },
882
+ propType: 'string',
883
+ setter: {
884
+ componentName: 'RadioGroupSetter',
885
+ props: {
886
+ options: [
887
+ {
888
+ title: '适应',
889
+ value: 'fill',
890
+ },
891
+ {
892
+ title: '裁剪',
893
+ value: 'cover',
894
+ },
895
+ ],
896
+ },
897
+ initialValue: 'fill',
898
+ },
899
+ condition: {
900
+ type: 'JSFunction',
901
+ value:
902
+ 'target => !!target.getProps().getPropValue("gallery.cover.show")',
903
+ },
904
+ },
905
+ {
906
+ name: 'gallery.title.field',
907
+ title: {
908
+ label: '标题内容',
909
+ tip: 'gallery.title.field | 标题内容',
910
+ },
911
+ propType: 'string',
912
+ setter: {
913
+ componentName: 'SelectSetter',
914
+ props: (target) => {
915
+ const columns =
916
+ target.parent.parent.parent.getPropValue('columns');
917
+ return {
918
+ mode: 'single',
919
+ options:
920
+ columns?.map?.((item) => ({
921
+ title:
922
+ typeof item.title === 'string'
923
+ ? item.title
924
+ : item.key,
925
+ value: item.key,
926
+ })) || [],
927
+ };
928
+ },
929
+ },
930
+ },
931
+ {
932
+ name: 'gallery.title.line',
933
+ title: {
934
+ label: '标题行数',
935
+ tip: 'gallery.title.line | 标题行数',
936
+ },
937
+ propType: 'number',
938
+ setter: 'NumberSetter',
939
+ },
940
+ {
941
+ name: 'gallery.header.slot',
942
+ title: {
943
+ label: '开启插槽',
944
+ tip: 'gallery.header.slot | 开启插槽',
945
+ },
946
+ propType: 'func',
947
+ setter: [
948
+ {
949
+ componentName: 'SlotSetter',
950
+ title: '函数插槽',
951
+ initialValue: {
952
+ type: 'JSSlot',
953
+ params: ['record', 'index'],
954
+ value: [],
955
+ },
956
+ },
957
+ 'VariableSetter',
958
+ ],
959
+ },
960
+ {
961
+ name: 'gallery.header.fields.show',
962
+ title: {
963
+ label: '其他字段',
964
+ tip: 'gallery.header.fields.show | 其他字段',
965
+ },
966
+ propType: 'bool',
967
+ setter: 'BoolSetter',
968
+ defaultValue: false,
969
+ },
970
+ {
971
+ name: 'gallery.header.fields.list',
972
+ title: {
973
+ label: '其他字段',
974
+ tip: 'gallery.header.fields.list | 选择字段渲染在上方',
975
+ },
976
+ condition: {
977
+ type: 'JSFunction',
978
+ value:
979
+ 'target => !!target.getProps().getPropValue("gallery.header.fields.show")',
980
+ },
981
+ setter: {
982
+ componentName: 'SelectSetter',
983
+ props: (target) => {
984
+ const columns =
985
+ target.parent.parent.parent.getPropValue('columns');
986
+ return {
987
+ mode: 'multiple',
988
+ options:
989
+ columns?.map?.((item) => ({
990
+ title:
991
+ typeof item.title === 'string'
992
+ ? item.title
993
+ : item.key,
994
+ value: item.key,
995
+ })) || [],
996
+ };
997
+ },
998
+ },
999
+ },
1000
+ ],
1001
+ },
1002
+ {
1003
+ title: '内容区域',
1004
+ display: 'block',
1005
+ type: 'group',
1006
+ items: [
1007
+ {
1008
+ name: 'gallery.content.fields',
1009
+ title: '',
1010
+ setter: {
1011
+ componentName: 'ArraySetter',
1012
+ props: {
1013
+ itemSetter: {
1014
+ componentName: 'ObjectSetter',
1015
+ props: {
1016
+ config: {
1017
+ items: [
1018
+ {
1019
+ name: 'columnKey',
1020
+ title: { label: '渲染字段', tip: '渲染字段' },
1021
+ isRequired: true,
1022
+ setter: {
1023
+ componentName: 'SelectSetter',
1024
+ props: (target) => {
1025
+ const columns =
1026
+ target.parent.parent.parent.getPropValue(
1027
+ 'columns'
1028
+ );
1029
+ const fieldsKey = target.parent.parent.parent
1030
+ .getPropValue('gallery.content.fields')
1031
+ .map((item) => item?.columnKey)
1032
+ .filter(Boolean);
1033
+ return {
1034
+ mode: 'single',
1035
+ options:
1036
+ columns?.map?.((item) => ({
1037
+ title:
1038
+ typeof item.title === 'string'
1039
+ ? item.title
1040
+ : item.key,
1041
+ value: item.key,
1042
+ disabled: fieldsKey.includes(item.key),
1043
+ })) || [],
1044
+ };
1045
+ },
1046
+ },
1047
+ },
1048
+ {
1049
+ name: 'show',
1050
+ title: { label: '是否展示', tip: '是否展示' },
1051
+ propType: 'bool',
1052
+ setter: 'BoolSetter',
1053
+ isRequired: true,
1054
+ },
1055
+ ],
1056
+ },
1057
+ },
1058
+ initialValue: {
1059
+ columnKey: '',
1060
+ show: true,
1061
+ },
1062
+ },
1063
+ },
1064
+ initialValue: (target) => {
1065
+ const columns =
1066
+ target.parent.parent.parent.getPropValue('columns');
1067
+ return (
1068
+ columns?.map?.((item) => ({
1069
+ columnKey: item.key,
1070
+ show: true,
1071
+ })) || []
1072
+ );
1073
+ },
1074
+ },
1075
+ },
1076
+ ],
1077
+ },
1078
+ ],
1079
+ },
1080
+ {
1081
+ title: '外观',
1082
+ display: 'block',
1083
+ type: 'group',
1084
+ items: [
1085
+ {
1086
+ name: 'showHeader',
1087
+ title: { label: '显示表头', tip: 'showHeader | 是否显示表头' },
1088
+ propType: 'bool',
1089
+ setter: 'BoolSetter',
1090
+ defaultValue: true,
1091
+ },
1092
+ {
1093
+ name: 'bordered',
1094
+ title: {
1095
+ label: '显示边框',
1096
+ tip: 'bordered | 是否展示外边框和列边框',
1097
+ },
1098
+ propType: 'bool',
1099
+ setter: 'BoolSetter',
1100
+ defaultValue: true,
1101
+ },
1102
+ {
1103
+ name: 'size',
1104
+ title: { label: '表格大小', tip: 'size | 表格大小' },
1105
+ propType: {
1106
+ type: 'oneOf',
1107
+ value: ['default', 'middle', 'small'],
1108
+ },
1109
+ setter: [
1110
+ {
1111
+ componentName: 'RadioGroupSetter',
1112
+ props: {
1113
+ options: [
1114
+ {
1115
+ title: '默认',
1116
+ value: 'default',
1117
+ },
1118
+ {
1119
+ title: '中',
1120
+ value: 'middle',
1121
+ },
1122
+ {
1123
+ title: '小',
1124
+ value: 'small',
1125
+ },
1126
+ ],
1127
+ },
1128
+ },
1129
+ 'VariableSetter',
1130
+ ],
1131
+ defaultValue: 'default',
1132
+ },
1133
+ {
1134
+ name: 'tableLayout',
1135
+ title: { label: '表格布局', tip: 'tableLayout | 表格布局' },
1136
+ defaultValue: '',
1137
+ propType: {
1138
+ type: 'oneOf',
1139
+ value: ['', 'auto', 'fixed'],
1140
+ },
1141
+ setter: [
1142
+ {
1143
+ componentName: 'RadioGroupSetter',
1144
+ props: {
1145
+ options: [
1146
+ {
1147
+ title: '默认',
1148
+ value: '',
1149
+ },
1150
+ {
1151
+ title: '自动',
1152
+ value: 'auto',
1153
+ },
1154
+ {
1155
+ title: '固定',
1156
+ value: 'fixed',
1157
+ },
1158
+ ],
1159
+ },
1160
+ },
1161
+ 'VariableSetter',
1162
+ ],
1163
+ },
1164
+ {
1165
+ name: 'virtual',
1166
+ title: {
1167
+ label: '虚拟列表',
1168
+ tip: 'virtual | 支持虚拟列表,开启后不支持 components.body 自定义',
1169
+ },
1170
+ propType: 'bool',
1171
+ setter: 'BoolSetter',
1172
+ defaultValue: true,
1173
+ },
1174
+ ],
1175
+ },
1176
+ {
1177
+ title: '分页',
1178
+ display: 'block',
1179
+ type: 'group',
1180
+ items: [
1181
+ {
1182
+ name: 'pagination',
1183
+ title: { label: '显示分页', tip: 'pagination | 显示分页' },
1184
+ propType: 'object',
1185
+ setter: 'BoolSetter',
1186
+ extraProps: {
1187
+ setValue: (target, value) => {
1188
+ if (value) {
1189
+ target.parent.setPropValue('pagination', {
1190
+ pageSize: 10,
1191
+ });
1192
+ }
1193
+ },
1194
+ },
1195
+ },
1196
+ {
1197
+ name: 'pagination.pageSize',
1198
+ title: { label: '每页条数', tip: 'pagination.pageSize | 每页条数' },
1199
+ propType: 'number',
1200
+ setter: 'NumberSetter',
1201
+ condition: {
1202
+ type: 'JSFunction',
1203
+ value: 'target => !!target.getProps().getPropValue("pagination")',
1204
+ },
1205
+ },
1206
+ {
1207
+ name: 'pagination.total',
1208
+ title: { label: '数据总数', tip: 'pagination.total | 数据总数' },
1209
+ propType: 'number',
1210
+ setter: 'NumberSetter',
1211
+ condition: {
1212
+ type: 'JSFunction',
1213
+ value: 'target => !!target.getProps().getPropValue("pagination")',
1214
+ },
1215
+ },
1216
+ {
1217
+ name: 'pagination.defaultCurrent',
1218
+ title: {
1219
+ label: '默认当前页',
1220
+ tip: 'pagination.defaultCurrent | 默认的当前页数',
1221
+ },
1222
+ propType: 'number',
1223
+ setter: 'NumberSetter',
1224
+ condition: {
1225
+ type: 'JSFunction',
1226
+ value: 'target => !!target.getProps().getPropValue("pagination")',
1227
+ },
1228
+ },
1229
+ {
1230
+ name: 'pagination.current',
1231
+ title: { label: '当前页数', tip: 'pagination.current | 当前页数' },
1232
+ propType: 'number',
1233
+ setter: 'NumberSetter',
1234
+ condition: {
1235
+ type: 'JSFunction',
1236
+ value: 'target => !!target.getProps().getPropValue("pagination")',
1237
+ },
1238
+ },
1239
+ {
1240
+ name: 'pagination.showPagination',
1241
+ title: {
1242
+ label: '始终显示分页',
1243
+ tip: 'pagination.showPagination | 当前数据总数大于10 则始终显示分页器',
1244
+ },
1245
+ propType: 'bool',
1246
+ setter: 'BoolSetter',
1247
+ defaultValue: false,
1248
+ condition: {
1249
+ type: 'JSFunction',
1250
+ value: 'target => !!target.getProps().getPropValue("pagination")',
1251
+ },
1252
+ },
1253
+ {
1254
+ name: 'pagination.showTotal',
1255
+ title: {
1256
+ label: '显示总数',
1257
+ tip: 'pagination.showTotal | 用于显示数据总量和当前数据顺序',
1258
+ },
1259
+ propType: 'func',
1260
+ setter: [
1261
+ {
1262
+ componentName: 'FunctionSetter',
1263
+ props: {
1264
+ template:
1265
+ 'showTotal(total,range,${extParams}){\n// 用于格式化显示表格数据总量\nreturn `共 ${total} 条`;\n}',
1266
+ },
1267
+ },
1268
+ 'VariableSetter',
1269
+ ],
1270
+ condition: {
1271
+ type: 'JSFunction',
1272
+ value: 'target => !!target.getProps().getPropValue("pagination")',
1273
+ },
1274
+ },
1275
+ {
1276
+ name: 'pagination.showSizeChanger',
1277
+ title: {
1278
+ label: '页数切换',
1279
+ tip: 'pagination.showSizeChanger | 是否展示 pageSize 切换器',
1280
+ },
1281
+ propType: 'bool',
1282
+ setter: 'BoolSetter',
1283
+ defaultValue: false,
1284
+ condition: {
1285
+ type: 'JSFunction',
1286
+ value: 'target => !!target.getProps().getPropValue("pagination")',
1287
+ },
1288
+ },
1289
+ {
1290
+ name: 'pagination.localPagination',
1291
+ title: {
1292
+ label: '前端分页',
1293
+ tip: 'pagination.localPagination | 是否前端分页开启后表头搜索和分页前端处理',
1294
+ },
1295
+ propType: 'bool',
1296
+ setter: 'BoolSetter',
1297
+ defaultValue: false,
1298
+ condition: {
1299
+ type: 'JSFunction',
1300
+ value: 'target => !!target.getProps().getPropValue("pagination")',
1301
+ },
1302
+ },
1303
+ {
1304
+ name: 'pagination.showQuickJumper',
1305
+ title: {
1306
+ label: '快速跳转',
1307
+ tip: 'pagination.showQuickJumper | 是否可以快速跳转至某页',
1308
+ },
1309
+ propType: 'bool',
1310
+ setter: 'BoolSetter',
1311
+ defaultValue: false,
1312
+ condition: {
1313
+ type: 'JSFunction',
1314
+ value: 'target => !!target.getProps().getPropValue("pagination")',
1315
+ },
1316
+ },
1317
+ {
1318
+ name: 'pagination.simple',
1319
+ title: { label: '简单分页', tip: 'pagination.simple | 简单分页' },
1320
+ propType: 'bool',
1321
+ setter: 'BoolSetter',
1322
+ defaultValue: false,
1323
+ condition: {
1324
+ type: 'JSFunction',
1325
+ value: 'target => !!target.getProps().getPropValue("pagination")',
1326
+ },
1327
+ },
1328
+ {
1329
+ name: 'pagination.size',
1330
+ title: { label: '分页尺寸', tip: 'pagination.size | 分页尺寸' },
1331
+ propType: {
1332
+ type: 'oneOf',
1333
+ value: ['default', 'small'],
1334
+ },
1335
+ setter: [
1336
+ {
1337
+ componentName: 'RadioGroupSetter',
1338
+ props: {
1339
+ options: [
1340
+ {
1341
+ title: '默认',
1342
+ value: 'default',
1343
+ },
1344
+ {
1345
+ title: '小',
1346
+ value: 'small',
1347
+ },
1348
+ ],
1349
+ },
1350
+ },
1351
+ 'VariableSetter',
1352
+ ],
1353
+ defaultValue: 'default',
1354
+ condition: {
1355
+ type: 'JSFunction',
1356
+ value: 'target => !!target.getProps().getPropValue("pagination")',
1357
+ },
1358
+ },
1359
+ {
1360
+ name: 'pagination.position',
1361
+ title: { label: '分页位置', tip: 'pagination.position | 分页位置' },
1362
+ setter: {
1363
+ componentName: 'ArraySetter',
1364
+ props: {
1365
+ itemSetter: {
1366
+ componentName: 'SelectSetter',
1367
+ props: {
1368
+ options: [
1369
+ {
1370
+ title: '上左',
1371
+ value: 'topLeft',
1372
+ },
1373
+ {
1374
+ title: '上中',
1375
+ value: 'topCenter',
1376
+ },
1377
+ {
1378
+ title: '上右',
1379
+ value: 'topRight',
1380
+ },
1381
+ {
1382
+ title: '下左',
1383
+ value: 'bottomLeft',
1384
+ },
1385
+ {
1386
+ title: '下中',
1387
+ value: 'bottomCenter',
1388
+ },
1389
+ {
1390
+ title: '下右',
1391
+ value: 'bottomRight',
1392
+ },
1393
+ ],
1394
+ },
1395
+ initialValue: 'bottomRight',
1396
+ },
1397
+ },
1398
+ },
1399
+ condition: {
1400
+ type: 'JSFunction',
1401
+ value: 'target => !!target.getProps().getPropValue("pagination")',
1402
+ },
1403
+ },
1404
+ ],
1405
+ },
1406
+ {
1407
+ title: '滚动',
1408
+ display: 'block',
1409
+ type: 'group',
1410
+ items: [
1411
+ {
1412
+ name: 'scroll.autoCalc',
1413
+ title: {
1414
+ label: '自动计算',
1415
+ tip: 'scroll.autoCalc | 是否自动计算scroll x y',
1416
+ },
1417
+ propType: 'bool',
1418
+ setter: 'BoolSetter',
1419
+ defaultValue: false,
1420
+ },
1421
+ {
1422
+ name: 'scroll.scrollToFirstRowOnChange',
1423
+ title: {
1424
+ label: '自动滚动',
1425
+ tip: 'scroll.scrollToFirstRowOnChange | 是否自动滚动到表格顶部',
1426
+ },
1427
+ propType: 'bool',
1428
+ setter: 'BoolSetter',
1429
+ defaultValue: true,
1430
+ },
1431
+ {
1432
+ name: 'scroll.x',
1433
+ title: {
1434
+ label: '横向滚动',
1435
+ tip: 'scroll.x | 设置横向滚动,也可用于指定滚动区域的宽,可以设置为像素值,百分比,true 和 max-content',
1436
+ },
1437
+ propType: { type: 'oneOfType', value: ['number', 'bool'] },
1438
+ setter: ['NumberSetter', 'BoolSetter', 'VariableSetter'],
1439
+ },
1440
+ {
1441
+ name: 'scroll.y',
1442
+ title: {
1443
+ label: '纵向滚动',
1444
+ tip: 'scroll.y | 设置纵向滚动,也可用于指定滚动区域的高,可以设置为像素值',
1445
+ },
1446
+ propType: 'number',
1447
+ setter: ['NumberSetter', 'VariableSetter'],
1448
+ },
1449
+ ],
1450
+ },
1451
+ {
1452
+ title: '行选择器',
1453
+ display: 'block',
1454
+ type: 'group',
1455
+ items: [
1456
+ {
1457
+ name: 'rowSelection',
1458
+ title: { label: '行选择', tip: 'rowSelection | 行选择' },
1459
+ propType: 'object',
1460
+ setter: 'BoolSetter',
1461
+ extraProps: {
1462
+ setValue: (target, value) => {
1463
+ if (value) {
1464
+ target.parent.setPropValue('rowSelection', {
1465
+ type: 'radio',
1466
+ columnWidth: 48,
1467
+ });
1468
+ }
1469
+ },
1470
+ },
1471
+ },
1472
+ {
1473
+ name: 'rowSelection.type',
1474
+ title: { label: '行选择类型', tip: 'rowSelection.type | 多选/单选' },
1475
+ propType: {
1476
+ type: 'oneOf',
1477
+ value: ['checkbox', 'radio'],
1478
+ },
1479
+ setter: [
1480
+ {
1481
+ componentName: 'RadioGroupSetter',
1482
+ props: {
1483
+ options: [
1484
+ {
1485
+ title: '多选',
1486
+ value: 'checkbox',
1487
+ },
1488
+ {
1489
+ title: '单选',
1490
+ value: 'radio',
1491
+ },
1492
+ ],
1493
+ },
1494
+ },
1495
+ 'VariableSetter',
1496
+ ],
1497
+ condition: {
1498
+ type: 'JSFunction',
1499
+ value: 'target => !!target.getProps().getPropValue("rowSelection")',
1500
+ },
1501
+ },
1502
+ {
1503
+ name: 'rowSelection.fixed',
1504
+ title: {
1505
+ label: '固定左边',
1506
+ tip: 'rowSelection.fixed | 把选择框列固定在左边',
1507
+ },
1508
+ propType: 'bool',
1509
+ setter: 'BoolSetter',
1510
+ condition: {
1511
+ type: 'JSFunction',
1512
+ value: 'target => !!target.getProps().getPropValue("rowSelection")',
1513
+ },
1514
+ },
1515
+ {
1516
+ name: 'rowSelection.columnWidth',
1517
+ title: {
1518
+ label: '自定义列表选择框宽度',
1519
+ tip: 'rowSelection.columnWidth | 自定义列表选择框宽度',
1520
+ },
1521
+ propType: {
1522
+ type: 'oneOfType',
1523
+ value: ['number', 'string'],
1524
+ },
1525
+ setter: ['NumberSetter', 'StringSetter', 'VariableSetter'],
1526
+ condition: {
1527
+ type: 'JSFunction',
1528
+ value: 'target => !!target.getProps().getPropValue("rowSelection")',
1529
+ },
1530
+ },
1531
+ {
1532
+ name: 'rowSelection.selectedRowKeys',
1533
+ title: {
1534
+ label: '选中行Key',
1535
+ tip: 'rowSelection.selectedRowKeys | 指定选中项的 key 数组',
1536
+ },
1537
+ propType: 'object',
1538
+ setter: 'JsonSetter',
1539
+ condition: {
1540
+ type: 'JSFunction',
1541
+ value: 'target => !!target.getProps().getPropValue("rowSelection")',
1542
+ },
1543
+ },
1544
+ {
1545
+ name: 'rowSelection.preserveSelectedRowKeys',
1546
+ title: {
1547
+ label: '保留选项',
1548
+ tip: 'rowSelection.preserveSelectedRowKeys | 当数据被删除时仍然保留选项',
1549
+ },
1550
+ propType: 'bool',
1551
+ setter: 'BoolSetter',
1552
+ condition: {
1553
+ type: 'JSFunction',
1554
+ value: 'target => !!target.getProps().getPropValue("rowSelection")',
1555
+ },
1556
+ },
1557
+ {
1558
+ name: 'rowSelection.getCheckboxProps',
1559
+ title: {
1560
+ label: '默认属性',
1561
+ tip: 'rowSelection.getCheckboxProps | 选择框的默认属性配置',
1562
+ },
1563
+ propType: 'func',
1564
+ setter: [
1565
+ {
1566
+ componentName: 'FunctionSetter',
1567
+ props: {
1568
+ template:
1569
+ 'getCheckboxProps(record,${extParams}){\n// 选择框的默认属性配置\nreturn { disabled: false };\n}',
1570
+ },
1571
+ },
1572
+ 'VariableSetter',
1573
+ ],
1574
+ condition: {
1575
+ type: 'JSFunction',
1576
+ value: 'target => !!target.getProps().getPropValue("rowSelection")',
1577
+ },
1578
+ },
1579
+ ],
1580
+ },
1581
+ {
1582
+ title: '行展开',
1583
+ display: 'block',
1584
+ type: 'group',
1585
+ items: [
1586
+ {
1587
+ name: 'expandable.expandedRowRender',
1588
+ title: {
1589
+ label: '展开行渲染',
1590
+ tip: 'expandable.expandedRowRender | 额外的展开行',
1591
+ },
1592
+ propType: 'func',
1593
+ setter: [
1594
+ {
1595
+ componentName: 'SlotSetter',
1596
+ title: '展开行插槽',
1597
+ initialValue: {
1598
+ type: 'JSSlot',
1599
+ params: ['record', 'index', 'indent', 'expanded'],
1600
+ value: [],
1601
+ },
1602
+ },
1603
+ {
1604
+ componentName: 'FunctionSetter',
1605
+ props: {
1606
+ template:
1607
+ 'expandedRowRender(record,index,indent,expanded,${extParams}){\n// 展开行渲染\nreturn `${record.id}`}',
1608
+ },
1609
+ },
1610
+ 'VariableSetter',
1611
+ ],
1612
+ },
1613
+ {
1614
+ name: 'expandable.rowExpandable',
1615
+ title: {
1616
+ label: '是否可展开',
1617
+ tip: 'expandable.rowExpandable | 行是否可展开',
1618
+ },
1619
+ propType: 'func',
1620
+ setter: [
1621
+ {
1622
+ componentName: 'FunctionSetter',
1623
+ props: {
1624
+ template:
1625
+ 'rowExpandable(record,${extParams}){\n// 行是否可展开\nreturn true;\n}',
1626
+ },
1627
+ },
1628
+ 'VariableSetter',
1629
+ ],
1630
+ },
1631
+ ],
1632
+ },
1633
+ {
1634
+ title: '扩展',
1635
+ display: 'block',
1636
+ type: 'group',
1637
+ items: [
1638
+ {
1639
+ name: 'title',
1640
+ title: { label: '表格标题', tip: 'title | 表格标题' },
1641
+ propType: 'func',
1642
+ setter: [
1643
+ {
1644
+ componentName: 'SlotSetter',
1645
+ title: '表格标题插槽',
1646
+ initialValue: {
1647
+ type: 'JSSlot',
1648
+ params: ['currentPageData'],
1649
+ value: [],
1650
+ },
1651
+ },
1652
+ {
1653
+ componentName: 'FunctionSetter',
1654
+ props: {
1655
+ template:
1656
+ 'renderTitle(currentPageData,${extParams}){\n// 自定义渲染表格顶部\nreturn "表格顶部";\n}',
1657
+ },
1658
+ },
1659
+ 'VariableSetter',
1660
+ ],
1661
+ },
1662
+ {
1663
+ name: 'summary',
1664
+ title: { label: '统计栏' },
1665
+ propType: 'func',
1666
+ setter: [
1667
+ {
1668
+ componentName: 'SlotSetter',
1669
+ title: '统计栏插槽',
1670
+ initialValue: {
1671
+ type: 'JSSlot',
1672
+ params: ['currentPageData'],
1673
+ value: [],
1674
+ },
1675
+ },
1676
+ ],
1677
+ },
1678
+ {
1679
+ name: 'onHeaderRow',
1680
+ title: { label: '头部行属性', tip: 'onHeaderRow | 设置头部行属性' },
1681
+ propType: 'func',
1682
+ setter: [
1683
+ {
1684
+ componentName: 'FunctionSetter',
1685
+ props: {
1686
+ template:
1687
+ 'onHeaderRow(columns,index,${extParams}){\n// 设置头部行属性\nreturn {onClick:()=>{}};\n}',
1688
+ },
1689
+ },
1690
+ 'VariableSetter',
1691
+ ],
1692
+ },
1693
+ {
1694
+ name: 'onRow',
1695
+ title: { label: '行属性', tip: 'onRow | 设置行属性' },
1696
+ propType: 'func',
1697
+ setter: [
1698
+ {
1699
+ componentName: 'FunctionSetter',
1700
+ props: {
1701
+ template:
1702
+ 'onRow(record,index,${extParams}){\n// 设置行属性\nreturn {onClick:event=>{}};\n}',
1703
+ },
1704
+ },
1705
+ 'VariableSetter',
1706
+ ],
1707
+ },
1708
+ {
1709
+ name: 'rowClassName',
1710
+ title: { label: '行类名', tip: 'rowClassName | 表格行的类名' },
1711
+ propType: 'func',
1712
+ setter: [
1713
+ {
1714
+ componentName: 'FunctionSetter',
1715
+ props: {
1716
+ template:
1717
+ 'rowClassName(record,index,${extParams}){\n// 表格行的类名\nreturn `className-${record.type}`;\n}',
1718
+ },
1719
+ },
1720
+ 'VariableSetter',
1721
+ ],
1722
+ },
1723
+ {
1724
+ name: 'dragSort',
1725
+ title: {
1726
+ label: '拖拽排序',
1727
+ tip: 'dragSort | 开启拖拽排序',
1728
+ },
1729
+ propType: 'bool',
1730
+ setter: 'BoolSetter',
1731
+ defaultValue: false,
1732
+ },
1733
+ ],
1734
+ },
1735
+ {
1736
+ title: { label: '列配置', tip: '表格的列配置' },
1737
+ display: 'block',
1738
+ type: 'group',
1739
+ items: [
1740
+ {
1741
+ name: 'columnSetting.show',
1742
+ title: {
1743
+ label: '开启列配置',
1744
+ tip: 'columnSetting.show | 是否开启字段隐藏展示及顺序调整按钮',
1745
+ },
1746
+ propType: 'bool',
1747
+ setter: 'BoolSetter',
1748
+ defaultValue: false,
1749
+ },
1750
+ {
1751
+ name: 'columnSetting.storageMode',
1752
+ condition: {
1753
+ type: 'JSFunction',
1754
+ value:
1755
+ 'target => !!target.getProps().getPropValue("columnSetting.show")',
1756
+ },
1757
+ title: {
1758
+ label: '存储模式',
1759
+ tip: 'columnSetting.storageMode | 列配置存储模式 关闭时刷新页面还原',
1760
+ },
1761
+ propType: 'string',
1762
+ setter: {
1763
+ componentName: 'SelectSetter',
1764
+ mode: 'single',
1765
+ defaultValue: 'localStorage',
1766
+ props: {
1767
+ options: [
1768
+ {
1769
+ title: '关闭',
1770
+ value: '',
1771
+ },
1772
+ {
1773
+ title: '本地localStorage',
1774
+ value: 'localStorage',
1775
+ },
1776
+ ],
1777
+ },
1778
+ },
1779
+ },
1780
+ ],
1781
+ },
1782
+ {
1783
+ title: { label: '分组配置', tip: '表格的分组配置' },
1784
+ display: 'block',
1785
+ type: 'group',
1786
+ items: [
1787
+ {
1788
+ name: 'dataSourceGroup.show',
1789
+ title: {
1790
+ label: '开启分组功能',
1791
+ tip: 'dataSourceGroup.show | 是否开启针对字段分组功能',
1792
+ },
1793
+ propType: 'bool',
1794
+ setter: 'BoolSetter',
1795
+ defaultValue: false,
1796
+ },
1797
+ {
1798
+ name: 'dataSourceGroup.storageMode',
1799
+ condition: {
1800
+ type: 'JSFunction',
1801
+ value:
1802
+ 'target => !!target.getProps().getPropValue("dataSourceGroup.show")',
1803
+ },
1804
+ title: {
1805
+ label: '存储模式',
1806
+ tip: 'dataSourceGroup.storageMode | 分组信息存储模式 关闭时刷新页面还原',
1807
+ },
1808
+ propType: 'string',
1809
+ setter: {
1810
+ componentName: 'SelectSetter',
1811
+ mode: 'single',
1812
+ defaultValue: 'localStorage',
1813
+ props: {
1814
+ options: [
1815
+ {
1816
+ title: '关闭',
1817
+ value: '',
1818
+ },
1819
+ {
1820
+ title: '本地localStorage',
1821
+ value: 'localStorage',
1822
+ },
1823
+ ],
1824
+ },
1825
+ },
1826
+ },
1827
+ {
1828
+ name: 'dataSourceGroup.list',
1829
+ condition: {
1830
+ type: 'JSFunction',
1831
+ value:
1832
+ 'target => !!target.getProps().getPropValue("dataSourceGroup.show")',
1833
+ },
1834
+ setter: {
1835
+ componentName: 'ArraySetter',
1836
+ props: {
1837
+ itemSetter: {
1838
+ componentName: 'ObjectSetter',
1839
+ props: {
1840
+ config: {
1841
+ items: [
1842
+ {
1843
+ name: 'isCustom',
1844
+ title: {
1845
+ label: '开启定制字段',
1846
+ tip: '开启定制字段,可自定义排序名和排序的key,关闭时可选择column中的title和dataIndex',
1847
+ },
1848
+ setter: 'BoolSetter',
1849
+ defaultValue: false,
1850
+ },
1851
+ {
1852
+ name: 'isHidden',
1853
+ title: {
1854
+ label: '是否隐藏',
1855
+ tip: '开启时,当前项展示, 关闭时,当前项隐藏',
1856
+ },
1857
+ propType: 'bool',
1858
+ setter: 'BoolSetter',
1859
+ defaultValue: false,
1860
+ },
1861
+ {
1862
+ name: 'columnKey',
1863
+ title: {
1864
+ label: '选择字段',
1865
+ tip: '选择column中的title和dataIndex字段进行排序',
1866
+ },
1867
+ isRequired: true,
1868
+ condition(target) {
1869
+ return !target.parent.getPropValue('isCustom');
1870
+ },
1871
+ setter: [
1872
+ {
1873
+ componentName: 'SelectSetter',
1874
+ mode: 'single',
1875
+ props: (target) => {
1876
+ const fieldsKey = target.parent.parent.parent
1877
+ .getPropValue('dataSourceGroup.list')
1878
+ .map((item) => item?.columnKey)
1879
+ .filter(Boolean);
1880
+ return {
1881
+ options:
1882
+ target.parent.parent.parent
1883
+ .getPropValue('columns')
1884
+ ?.map?.((item) => ({
1885
+ title: getI18n(item.title) || item.key,
1886
+ value: item.key,
1887
+ disabled: fieldsKey.includes(item.key),
1888
+ })) || [],
1889
+ };
1890
+ },
1891
+ },
1892
+ 'StringSetter',
1893
+ ],
1894
+ },
1895
+ {
1896
+ name: 'label',
1897
+ title: { label: '筛选项', tip: '筛选项' },
1898
+ propType: 'string',
1899
+ setter: 'PisellI18nSetter',
1900
+ condition(target) {
1901
+ return target.parent.getPropValue('isCustom');
1902
+ },
1903
+ },
1904
+ {
1905
+ name: 'name',
1906
+ title: { label: '字段', tip: '所筛选的字段' },
1907
+ setter: [
1908
+ 'StringSetter',
1909
+ {
1910
+ componentName: 'ArraySetter',
1911
+ props: {
1912
+ itemSetter: {
1913
+ componentName: 'StringSetter',
1914
+ },
1915
+ },
1916
+ },
1917
+ ],
1918
+ condition(target) {
1919
+ return target.parent.getPropValue('isCustom');
1920
+ },
1921
+ },
1922
+ ],
1923
+ },
1924
+ },
1925
+ initialValue: {
1926
+ label: '标题',
1927
+ name: '',
1928
+ columnKey: '',
1929
+ isCustom: false,
1930
+ isHidden: false,
1931
+ },
1932
+ },
1933
+ },
1934
+ },
1935
+ },
1936
+ ],
1937
+ },
1938
+ {
1939
+ title: { label: '筛选项', tip: '表格的筛选项' },
1940
+ display: 'block',
1941
+ type: 'group',
1942
+ items: [
1943
+ {
1944
+ name: 'filter.show',
1945
+ title: { label: '开启筛选', tip: '开启筛选' },
1946
+ propType: 'object',
1947
+ setter: 'BoolSetter',
1948
+ defaultValue: false,
1949
+ },
1950
+ {
1951
+ name: 'filter.sortButtonShow',
1952
+ title: { label: '开启筛选排序按钮', tip: '开启筛选排序按钮' },
1953
+ propType: 'object',
1954
+ setter: 'BoolSetter',
1955
+ defaultValue: false,
1956
+ },
1957
+ {
1958
+ name: 'filter.storageMode',
1959
+ condition: {
1960
+ type: 'JSFunction',
1961
+ value: 'target => !!target.getProps().getPropValue("filter.show")',
1962
+ },
1963
+ title: {
1964
+ label: '存储模式',
1965
+ tip: 'filter.storageMode | 筛选信息存储模式 关闭时刷新页面还原',
1966
+ },
1967
+ propType: 'string',
1968
+ setter: {
1969
+ componentName: 'SelectSetter',
1970
+ mode: 'single',
1971
+ defaultValue: 'localStorage',
1972
+ props: {
1973
+ options: [
1974
+ {
1975
+ title: '关闭',
1976
+ value: '',
1977
+ },
1978
+ {
1979
+ title: '本地localStorage',
1980
+ value: 'localStorage',
1981
+ },
1982
+ ],
1983
+ },
1984
+ },
1985
+ },
1986
+ {
1987
+ name: 'filter.quickFilterMaxLength',
1988
+ condition: {
1989
+ type: 'JSFunction',
1990
+ value: 'target => !!target.getProps().getPropValue("filter.show")',
1991
+ },
1992
+ title: { label: '快速筛选项', tip: '外层快速筛选项最大数量控制' },
1993
+ propType: 'number',
1994
+ setter: 'NumberSetter',
1995
+ defaultValue: 3,
1996
+ },
1997
+ {
1998
+ name: 'filter.list',
1999
+ condition: {
2000
+ type: 'JSFunction',
2001
+ value: 'target => !!target.getProps().getPropValue("filter.show")',
2002
+ },
2003
+ setter: {
2004
+ componentName: 'ArraySetter',
2005
+ props: {
2006
+ itemSetter: {
2007
+ componentName: 'ObjectSetter',
2008
+ props: {
2009
+ config: {
2010
+ items: [
2011
+ {
2012
+ name: 'isCustom',
2013
+ title: {
2014
+ label: '开启定制字段',
2015
+ tip: '开启定制字段,可自定义排序名和排序的key,关闭时可选择column中的title和dataIndex',
2016
+ },
2017
+ setter: 'BoolSetter',
2018
+ defaultValue: false,
2019
+ },
2020
+ {
2021
+ name: 'columnKey',
2022
+ title: {
2023
+ label: '选择字段',
2024
+ tip: '选择column中的title和dataIndex字段进行排序',
2025
+ },
2026
+ isRequired: true,
2027
+ condition(target) {
2028
+ return !target.parent.getPropValue('isCustom');
2029
+ },
2030
+ setter: [
2031
+ {
2032
+ componentName: 'SelectSetter',
2033
+ mode: 'single',
2034
+ props: (target) => {
2035
+ console.log(
2036
+ target.parent.parent.parent,
2037
+ this,
2038
+ 'target.parent.parent.parent\n' +
2039
+ ' .getPropValue("columns")'
2040
+ );
2041
+ const fieldsKey =
2042
+ target.parent.parent.parent
2043
+ .getPropValue('filter.list')
2044
+ ?.map((item) => item?.columnKey)
2045
+ ?.filter(Boolean) || [];
2046
+ return {
2047
+ options:
2048
+ target.parent.parent.parent
2049
+ .getPropValue('columns')
2050
+ ?.map?.((item) => ({
2051
+ title: getI18n(item.title) || item.key,
2052
+ value: item.key,
2053
+ disabled: fieldsKey.includes(item.key),
2054
+ })) || [],
2055
+ };
2056
+ },
2057
+ },
2058
+ 'StringSetter',
2059
+ ],
2060
+ },
2061
+ {
2062
+ name: 'label',
2063
+ title: { label: '筛选项', tip: '筛选项' },
2064
+ propType: 'string',
2065
+ setter: 'PisellI18nSetter',
2066
+ condition(target) {
2067
+ return target.parent.getPropValue('isCustom');
2068
+ },
2069
+ },
2070
+ {
2071
+ name: 'name',
2072
+ title: { label: '字段', tip: '所筛选的字段' },
2073
+ setter: [
2074
+ 'StringSetter',
2075
+ {
2076
+ componentName: 'ArraySetter',
2077
+ props: {
2078
+ itemSetter: {
2079
+ componentName: 'StringSetter',
2080
+ },
2081
+ },
2082
+ },
2083
+ ],
2084
+ condition(target) {
2085
+ return target.parent.getPropValue('isCustom');
2086
+ },
2087
+ },
2088
+ {
2089
+ name: 'key',
2090
+ title: { label: 'key', tip: '唯一标识' },
2091
+ propType: 'string',
2092
+ setter: 'StringSetter',
2093
+ isRequired: true,
2094
+ },
2095
+ {
2096
+ name: 'type',
2097
+ title: { label: '字段类型', tip: '所筛选的字段类型' },
2098
+ propType: 'string',
2099
+ setter: {
2100
+ componentName: 'SelectSetter',
2101
+ mode: 'single',
2102
+ defaultValue: 'single',
2103
+ props: {
2104
+ options: [
2105
+ {
2106
+ title: '输入框',
2107
+ value: 'text',
2108
+ },
2109
+ {
2110
+ title: '搜索框',
2111
+ value: 'search',
2112
+ },
2113
+ {
2114
+ title: '数字输入框',
2115
+ value: 'number',
2116
+ },
2117
+ {
2118
+ title: '数字范围输入框',
2119
+ value: 'numberRange',
2120
+ },
2121
+ {
2122
+ title: '下拉选择框',
2123
+ value: 'select',
2124
+ },
2125
+ {
2126
+ title: '日期选择器',
2127
+ value: 'date',
2128
+ },
2129
+ {
2130
+ title: '日期范围选择器',
2131
+ value: 'rangePicker',
2132
+ },
2133
+ {
2134
+ title: '旧版日期范围选择器',
2135
+ value: 'oldRangePicker',
2136
+ },
2137
+ {
2138
+ title: '树选择',
2139
+ value: 'treeSelect',
2140
+ },
2141
+ ],
2142
+ },
2143
+ },
2144
+ },
2145
+ {
2146
+ name: 'sort',
2147
+ title: {
2148
+ label: '开启排序',
2149
+ tip: '开启字段排序可以对顺序及字段隐藏调整,关闭时筛选项只在最外层展示',
2150
+ },
2151
+ propType: 'bool',
2152
+ setter: 'BoolSetter',
2153
+ defaultValue: false,
2154
+ },
2155
+ {
2156
+ name: 'localFilter',
2157
+ title: {
2158
+ label: '开启本地筛选',
2159
+ tip: '开启本地筛选时,字段值改变会走本地前端搜索,关闭时是调用接口对数据更新。',
2160
+ },
2161
+ propType: 'bool',
2162
+ setter: 'BoolSetter',
2163
+ defaultValue: false,
2164
+ },
2165
+ {
2166
+ name: 'isHidden',
2167
+ title: {
2168
+ label: '是否隐藏',
2169
+ tip: '开启时,当前项展示, 关闭时,当前项隐藏',
2170
+ },
2171
+ propType: 'bool',
2172
+ setter: 'BoolSetter',
2173
+ defaultValue: false,
2174
+ },
2175
+ {
2176
+ name: 'other',
2177
+ title: {
2178
+ label: '其他拓展属性',
2179
+ tip: '其他拓展属性',
2180
+ },
2181
+ propType: 'object',
2182
+ setter: 'JsonSetter',
2183
+ },
2184
+ ],
2185
+ },
2186
+ },
2187
+ initialValue: {
2188
+ label: '标题',
2189
+ type: 'text',
2190
+ key: 'name',
2191
+ columnKey: '',
2192
+ isCustom: false,
2193
+ isHidden: false,
2194
+ },
2195
+ },
2196
+ },
2197
+ },
2198
+ },
2199
+ ],
2200
+ },
2201
+ {
2202
+ title: { label: '排序', tip: '表格的排序项' },
2203
+ display: 'block',
2204
+ type: 'group',
2205
+ items: [
2206
+ {
2207
+ name: 'sort.show',
2208
+ title: { label: '开启排序', tip: '开启排序' },
2209
+ propType: 'object',
2210
+ setter: 'BoolSetter',
2211
+ defaultValue: true,
2212
+ },
2213
+ {
2214
+ name: 'sort.storageMode',
2215
+ condition: {
2216
+ type: 'JSFunction',
2217
+ value: 'target => !!target.getProps().getPropValue("sort.show")',
2218
+ },
2219
+ title: {
2220
+ label: '存储模式',
2221
+ tip: 'filter.storageMode | 排序存储模式 关闭时刷新页面还原',
2222
+ },
2223
+ propType: 'string',
2224
+ setter: {
2225
+ componentName: 'SelectSetter',
2226
+ mode: 'single',
2227
+ defaultValue: 'localStorage',
2228
+ props: {
2229
+ options: [
2230
+ {
2231
+ title: '关闭',
2232
+ value: '',
2233
+ },
2234
+ {
2235
+ title: '本地localStorage',
2236
+ value: 'localStorage',
2237
+ },
2238
+ ],
2239
+ },
2240
+ },
2241
+ },
2242
+ {
2243
+ name: 'sort.list',
2244
+ condition: {
2245
+ type: 'JSFunction',
2246
+ value: 'target => !!target.getProps().getPropValue("sort.show")',
2247
+ },
2248
+ setter: {
2249
+ componentName: 'ArraySetter',
2250
+ props: {
2251
+ itemSetter: {
2252
+ componentName: 'ObjectSetter',
2253
+ props: {
2254
+ config: {
2255
+ items: [
2256
+ {
2257
+ name: 'isCustom',
2258
+ title: {
2259
+ label: '开启定制字段',
2260
+ tip: '开启定制字段,可自定义排序名和排序的key,关闭时可选择column中的title和dataIndex',
2261
+ },
2262
+ setter: 'BoolSetter',
2263
+ defaultValue: false,
2264
+ },
2265
+ {
2266
+ name: 'columnKey',
2267
+ title: {
2268
+ label: '选择字段',
2269
+ tip: '选择column中的title和dataIndex字段进行排序',
2270
+ },
2271
+ isRequired: true,
2272
+ condition(target) {
2273
+ return !target.parent.getPropValue('isCustom');
2274
+ },
2275
+ setter: [
2276
+ {
2277
+ componentName: 'SelectSetter',
2278
+ mode: 'single',
2279
+ props: (target) => {
2280
+ const fieldsKey = target.parent.parent.parent
2281
+ .getPropValue('sort.list')
2282
+ .map((item) => item?.columnKey)
2283
+ .filter(Boolean);
2284
+ return {
2285
+ options:
2286
+ target.parent.parent.parent
2287
+ .getPropValue('columns')
2288
+ ?.map?.((item) => ({
2289
+ title: getI18n(item.title) || item.key,
2290
+ value: item.key,
2291
+ disabled: fieldsKey.includes(item.key),
2292
+ })) || [],
2293
+ };
2294
+ },
2295
+ },
2296
+ 'StringSetter',
2297
+ ],
2298
+ },
2299
+ {
2300
+ name: 'localFilter',
2301
+ title: {
2302
+ label: '开启本地排序',
2303
+ tip: '开启本地排序时,排序改变会走本地前端排序,关闭时是调用接口对数据更新。',
2304
+ },
2305
+ propType: 'bool',
2306
+ setter: 'BoolSetter',
2307
+ defaultValue: true,
2308
+ },
2309
+ {
2310
+ name: 'label',
2311
+ title: { label: '排序项', tip: '排序项展示文案' },
2312
+ propType: 'string',
2313
+ setter: 'PisellI18nSetter',
2314
+ condition(target) {
2315
+ return target.parent.getPropValue('isCustom');
2316
+ },
2317
+ },
2318
+ {
2319
+ name: 'name',
2320
+ title: { label: '字段', tip: '所排序的字段' },
2321
+ setter: [
2322
+ {
2323
+ componentName: 'SelectSetter',
2324
+ mode: 'single',
2325
+ props: (target) => {
2326
+ return {
2327
+ options:
2328
+ target.parent.parent.parent
2329
+ .getPropValue('columns')
2330
+ ?.map?.((item) => ({
2331
+ title:
2332
+ typeof item.title === 'string'
2333
+ ? item.title
2334
+ : item.key,
2335
+ value: item.dataIndex,
2336
+ })) || [],
2337
+ };
2338
+ },
2339
+ },
2340
+ 'StringSetter',
2341
+ {
2342
+ componentName: 'ArraySetter',
2343
+ props: {
2344
+ itemSetter: {
2345
+ componentName: 'StringSetter',
2346
+ },
2347
+ },
2348
+ },
2349
+ ],
2350
+ condition(target) {
2351
+ return target.parent.getPropValue('isCustom');
2352
+ },
2353
+ },
2354
+ {
2355
+ name: 'isHidden',
2356
+ title: {
2357
+ label: '是否隐藏',
2358
+ tip: '开启时,当前项展示, 关闭时,当前项隐藏',
2359
+ },
2360
+ propType: 'bool',
2361
+ setter: 'BoolSetter',
2362
+ defaultValue: false,
2363
+ },
2364
+ {
2365
+ name: 'type',
2366
+ title: { label: '字段类型', tip: '所排序的字段类型' },
2367
+ propType: 'string',
2368
+ isRequired: true,
2369
+ setter: {
2370
+ componentName: 'SelectSetter',
2371
+ mode: 'single',
2372
+ defaultValue: 'single',
2373
+ props: {
2374
+ options: [
2375
+ {
2376
+ title: '日期排序',
2377
+ value: 'date',
2378
+ },
2379
+ {
2380
+ title: '数字排序',
2381
+ value: 'number',
2382
+ },
2383
+ {
2384
+ title: 'a-z排序',
2385
+ value: 'string',
2386
+ },
2387
+ ],
2388
+ },
2389
+ },
2390
+ },
2391
+ ],
2392
+ },
2393
+ },
2394
+ initialValue: {
2395
+ label: '标题',
2396
+ type: 'date',
2397
+ columnKey: '',
2398
+ isCustom: false,
2399
+ isHidden: false,
2400
+ },
2401
+ },
2402
+ },
2403
+ },
2404
+ },
2405
+ ],
2406
+ },
2407
+ {
2408
+ title: { label: '导入导出', tip: '表单的导入导出' },
2409
+ display: 'block',
2410
+ type: 'group',
2411
+ items: [
2412
+ {
2413
+ name: 'exportImport.show',
2414
+ title: { label: '开启导入导出', tip: '开启表单的导入导出' },
2415
+ propType: 'bool',
2416
+ setter: 'BoolSetter',
2417
+ defaultValue: false,
2418
+ },
2419
+ {
2420
+ name: 'exportImport.hiddenKeys',
2421
+ title: {
2422
+ label: '隐藏字段',
2423
+ tip: "比如:['import'] '导入(import)|导出(export)|导出文件(export_file)|导入日志(import_log)'",
2424
+ },
2425
+ setter: 'ObjectSetter',
2426
+ condition: {
2427
+ type: 'JSFunction',
2428
+ value:
2429
+ 'target => !!target.getProps().getPropValue("exportImport.show")',
2430
+ },
2431
+ },
2432
+ {
2433
+ name: 'exportImport.apiUrl',
2434
+ title: {
2435
+ label: '接口地址',
2436
+ tip: "接口地址 | [{export: '/shop/order/task'}]",
2437
+ },
2438
+ setter: 'ObjectSetter',
2439
+ condition: {
2440
+ type: 'JSFunction',
2441
+ value:
2442
+ 'target => !!target.getProps().getPropValue("exportImport.show")',
2443
+ },
2444
+ },
2445
+ // {
2446
+ // name: "exportImport.formId",
2447
+ // title: { label: "表单ID", tip: "表单ID" },
2448
+ // propType: "string",
2449
+ // setter: "StringSetter",
2450
+ // condition: {
2451
+ // type: "JSFunction",
2452
+ // value: 'target => !!target.getProps().getPropValue("exportImport.show")',
2453
+ // },
2454
+ // },
2455
+ // {
2456
+ // name: "exportImport.formCode",
2457
+ // title: { label: "表单Code", tip: "表单Code|表单的唯一标识" },
2458
+ // propType: "string",
2459
+ // setter: "StringSetter",
2460
+ // condition: {
2461
+ // type: "JSFunction",
2462
+ // value: 'target => !!target.getProps().getPropValue("exportImport.show")',
2463
+ // },
2464
+ // },
2465
+ {
2466
+ name: 'exportImport.otherParams',
2467
+ title: { label: '接口其他参数', tip: '接口其他参数' },
2468
+ setter: 'ObjectSetter',
2469
+ condition: {
2470
+ type: 'JSFunction',
2471
+ value:
2472
+ 'target => !!target.getProps().getPropValue("exportImport.show")',
2473
+ },
2474
+ },
2475
+ {
2476
+ name: 'exportImport.title',
2477
+ title: { label: '标题', tip: '打开弹窗的标题' },
2478
+ propType: 'string',
2479
+ setter: 'PisellI18nSetter',
2480
+ condition: {
2481
+ type: 'JSFunction',
2482
+ value:
2483
+ 'target => !!target.getProps().getPropValue("exportImport.show")',
2484
+ },
2485
+ },
2486
+ {
2487
+ name: 'exportImport.templateFileUrl',
2488
+ title: { label: '导入模版链接', tip: '导入模版链接' },
2489
+ propType: 'string',
2490
+ setter: 'StringSetter',
2491
+ condition: {
2492
+ type: 'JSFunction',
2493
+ value:
2494
+ 'target => !!target.getProps().getPropValue("exportImport.show")',
2495
+ },
2496
+ },
2497
+ {
2498
+ name: 'exportImport.selectLists',
2499
+ title: { label: '当前所选项', tip: '当前所选择的需要导出的哪些数据' },
2500
+ setter: 'ObjectSetter',
2501
+ condition: {
2502
+ type: 'JSFunction',
2503
+ value:
2504
+ 'target => !!target.getProps().getPropValue("exportImport.show")',
2505
+ },
2506
+ },
2507
+ ],
2508
+ },
2509
+ {
2510
+ name: 'buttons',
2511
+ title: { label: '标题按钮组', tip: '标题右侧按钮项' },
2512
+ setter: {
2513
+ componentName: 'ArraySetter',
2514
+ props: {
2515
+ itemSetter: {
2516
+ componentName: 'ObjectSetter',
2517
+ props: {
2518
+ config: {
2519
+ items: [
2520
+ {
2521
+ name: 'title',
2522
+ title: { label: '按钮名称', tip: '按钮名称' },
2523
+ propType: 'string',
2524
+ setter: 'PisellI18nSetter',
2525
+ isRequired: true,
2526
+ },
2527
+ ...button.configure.props,
2528
+ {
2529
+ name: 'onClick',
2530
+ title: { label: '点击事件', tip: '点击事件' },
2531
+ propType: 'func',
2532
+ },
2533
+ {
2534
+ name: 'action',
2535
+ title: { label: '功能', tip: '按钮的功能' },
2536
+ propType: 'string',
2537
+ setter: [
2538
+ {
2539
+ componentName: 'SelectSetter',
2540
+ mode: 'single',
2541
+ defaultValue: 'add',
2542
+ props: {
2543
+ options: [
2544
+ {
2545
+ title: 'Add',
2546
+ value: 'add',
2547
+ },
2548
+ {
2549
+ title: 'Reset',
2550
+ value: 'reset',
2551
+ },
2552
+ ],
2553
+ },
2554
+ },
2555
+ ],
2556
+ },
2557
+
2558
+ {
2559
+ name: 'other',
2560
+ title: {
2561
+ label: '其他拓展属性',
2562
+ tip: '其他拓展属性',
2563
+ },
2564
+ propType: 'object',
2565
+ setter: 'JsonSetter',
2566
+ },
2567
+ ],
2568
+ },
2569
+ },
2570
+ initialValue: { title: '按钮' },
2571
+ },
2572
+ },
2573
+ },
2574
+ },
2575
+ {
2576
+ name: 'actionButtons',
2577
+ title: { label: '表格按钮组', tip: '表格action右侧按钮项' },
2578
+ setter: {
2579
+ componentName: 'ArraySetter',
2580
+ props: {
2581
+ itemSetter: {
2582
+ componentName: 'ObjectSetter',
2583
+ props: {
2584
+ config: {
2585
+ items: [
2586
+ {
2587
+ name: 'title',
2588
+ title: { label: '按钮名称', tip: '按钮名称' },
2589
+ propType: 'string',
2590
+ setter: 'PisellI18nSetter',
2591
+ isRequired: true,
2592
+ },
2593
+ ...button.configure.props,
2594
+ {
2595
+ name: 'onClick',
2596
+ title: { label: '点击事件', tip: '点击事件' },
2597
+ propType: 'func',
2598
+ },
2599
+ {
2600
+ name: 'action',
2601
+ title: { label: '功能', tip: '按钮的功能' },
2602
+ propType: 'string',
2603
+ setter: [
2604
+ {
2605
+ componentName: 'SelectSetter',
2606
+ mode: 'single',
2607
+ defaultValue: 'add',
2608
+ props: {
2609
+ options: [
2610
+ {
2611
+ title: 'Add',
2612
+ value: 'add',
2613
+ },
2614
+ {
2615
+ title: 'Reset',
2616
+ value: 'reset',
2617
+ },
2618
+ ],
2619
+ },
2620
+ },
2621
+ ],
2622
+ },
2623
+
2624
+ {
2625
+ name: 'other',
2626
+ title: {
2627
+ label: '其他拓展属性',
2628
+ tip: '其他拓展属性',
2629
+ },
2630
+ propType: 'object',
2631
+ setter: 'JsonSetter',
2632
+ },
2633
+ ],
2634
+ },
2635
+ },
2636
+ initialValue: { title: '按钮' },
2637
+ },
2638
+ },
2639
+ },
2640
+ },
2641
+ ],
2642
+ configure: {
2643
+ supports: {
2644
+ style: true,
2645
+ events: [
2646
+ {
2647
+ name: 'onChange',
2648
+ template:
2649
+ "onChange(pagination,filters,sorter,extra,${extParams}){\n// 表格翻页事件\nconsole.log('onChange', pagination);}",
2650
+ },
2651
+ {
2652
+ name: 'onSortChange',
2653
+ template:
2654
+ "onSortChange(detail){\n// 表格拖拽排序事件\nconsole.log('detail', detail);}",
2655
+ },
2656
+ {
2657
+ name: 'onValuesChange',
2658
+ template: 'onValuesChange(changedValues, values){}',
2659
+ },
2660
+ {
2661
+ name: 'onDataSourceChange',
2662
+ template: 'onDataSourceChange(currentDataSource) {}',
2663
+ },
2664
+ {
2665
+ name: 'rowSelection.onChange',
2666
+ template:
2667
+ "onRowSelectionChange(selectedRowKeys,selectedRows,${extParams}){\n// 选中项发生变化时的回调\nconsole.log('onRowSelectionChange', selectedRowKeys, selectedRows);}",
2668
+ },
2669
+ {
2670
+ name: 'expandable.onExpand',
2671
+ template:
2672
+ "onExpandableExpand(expanded,record){\n// 点击展开图标时触发\nconsole.log('onRowSelectionChange', expanded, record);}",
2673
+ },
2674
+ {
2675
+ name: 'onExportChange',
2676
+ template:
2677
+ "onExportChange(expanded,record){\n// 点击展开图标时触发\nconsole.log('onExport', expanded, record);}",
2678
+ },
2679
+ {
2680
+ name: 'onImportChange',
2681
+ template:
2682
+ "onImportChange(expanded,record){\n// 点击展开图标时触发\nconsole.log('onExport', expanded, record);}",
2683
+ },
2684
+ {
2685
+ name: 'onExportFileChange',
2686
+ template:
2687
+ "onExportFileChange(expanded,record){\n// 点击展开图标时触发\nconsole.log('onExport', expanded, record);}",
2688
+ },
2689
+ {
2690
+ name: 'onImportLogChange',
2691
+ template:
2692
+ "onImportLogChange(expanded,record){\n// 点击展开图标时触发\nconsole.log('onExport', expanded, record);}",
2693
+ },
2694
+ ],
2695
+ },
2696
+ },
2697
+ };