@zat-design/sisyphus-react 4.0.0-beta.9 → 4.0.1

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 (433) hide show
  1. package/README.md +1 -1
  2. package/dist/index.esm.css +1 -1
  3. package/dist/less.esm.css +1 -1
  4. package/es/ProAction/index.js +14 -4
  5. package/es/ProConfigProvider/index.js +11 -2
  6. package/es/ProDownload/index.js +16 -5
  7. package/es/ProDownload/utils.js +8 -3
  8. package/es/ProDrawerForm/components/ProDrawer/index.js +14 -4
  9. package/es/ProDrawerForm/components/ProModal/index.js +14 -4
  10. package/es/ProDrawerForm/index.js +13 -3
  11. package/es/ProEditLabel/components/RenderProForm.js +5 -1
  12. package/es/ProEditLabel/index.js +16 -5
  13. package/es/ProEditTable/components/ActionButton/index.js +5 -1
  14. package/es/ProEditTable/components/RcTable/BaseTable.js +13 -3
  15. package/es/ProEditTable/components/RcTable/DraggableTable.js +7 -2
  16. package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +16 -7
  17. package/es/ProEditTable/components/RenderField/index.js +54 -29
  18. package/es/ProEditTable/components/RenderToolbar/index.js +10 -4
  19. package/es/ProEditTable/index.js +16 -10
  20. package/es/ProEditTable/propsType.d.ts +12 -6
  21. package/es/ProEditTable/style/index.less +22 -1
  22. package/es/ProEditTable/utils/config.js +8 -3
  23. package/es/ProEditTable/utils/index.js +14 -10
  24. package/es/ProEditTable/utils/tools.js +22 -10
  25. package/es/ProEditTable/utils/useEditTableError.js +6 -1
  26. package/es/ProEditTable/utils/useShouldUpdateForTable.js +16 -7
  27. package/es/ProEnum/components/Group.js +6 -1
  28. package/es/ProEnum/components/Tag.js +6 -1
  29. package/es/ProEnum/hooks/useEnum.d.ts +8 -0
  30. package/es/ProEnum/hooks/useEnum.js +76 -4
  31. package/es/ProEnum/hooks/useEnumRequest.js +8 -3
  32. package/es/ProEnum/hooks/useFrequentEnumRequest.js +8 -3
  33. package/es/ProEnum/index.js +25 -15
  34. package/es/ProEnum/utils/eventCenter.js +3 -1
  35. package/es/ProEnum/utils/frequentEnum.js +5 -1
  36. package/es/ProEnum/utils/index.js +2 -1
  37. package/es/ProForm/components/FormFooter/index.js +5 -1
  38. package/es/ProForm/components/base/Checkbox/index.js +7 -2
  39. package/es/ProForm/components/base/DatePicker/index.js +7 -2
  40. package/es/ProForm/components/base/DatePicker/useDateLimit.js +6 -1
  41. package/es/ProForm/components/base/Input/index.js +7 -2
  42. package/es/ProForm/components/base/InputNumber/index.js +13 -3
  43. package/es/ProForm/components/base/Radio/index.js +7 -2
  44. package/es/ProForm/components/base/RangePicker/index.d.ts +7 -1
  45. package/es/ProForm/components/base/RangePicker/index.js +50 -4
  46. package/es/ProForm/components/base/RangePicker/useDateRange.js +6 -1
  47. package/es/ProForm/components/base/Select/index.js +7 -2
  48. package/es/ProForm/components/base/Switch/index.js +7 -2
  49. package/es/ProForm/components/base/SwitchCheckbox/index.js +7 -2
  50. package/es/ProForm/components/base/TextArea/index.js +7 -2
  51. package/es/ProForm/components/base/TimePicker/index.js +7 -2
  52. package/es/ProForm/components/combination/Container/index.js +5 -1
  53. package/es/ProForm/components/combination/Container/style/index.less +5 -0
  54. package/es/ProForm/components/combination/FormList/components/ActionButton.js +10 -4
  55. package/es/ProForm/components/combination/FormList/components/Empty.js +3 -2
  56. package/es/ProForm/components/combination/FormList/components/LineFields.js +5 -1
  57. package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +10 -4
  58. package/es/ProForm/components/combination/FormList/index.js +41 -4
  59. package/es/ProForm/components/combination/FormList/style/index.less +1 -1
  60. package/es/ProForm/components/combination/FormList/utils.d.ts +6 -0
  61. package/es/ProForm/components/combination/FormList/utils.js +17 -0
  62. package/es/ProForm/components/combination/Group/component/ComRender.d.ts +3 -0
  63. package/es/ProForm/components/combination/Group/component/ComRender.js +70 -3
  64. package/es/ProForm/components/combination/Group/component/FlexibleGroup.d.ts +10 -0
  65. package/es/ProForm/components/combination/Group/component/FlexibleGroup.js +351 -0
  66. package/es/ProForm/components/combination/Group/hooks/index.d.ts +16 -1
  67. package/es/ProForm/components/combination/Group/hooks/index.js +107 -4
  68. package/es/ProForm/components/combination/Group/index.d.ts +3 -4
  69. package/es/ProForm/components/combination/Group/index.js +108 -24
  70. package/es/ProForm/components/combination/Group/propsType.d.ts +44 -1
  71. package/es/ProForm/components/combination/Group/style/index.less +425 -3
  72. package/es/ProForm/components/combination/Group/utils/index.d.ts +154 -0
  73. package/es/ProForm/components/combination/Group/utils/index.js +428 -0
  74. package/es/ProForm/components/combination/ProCascader/index.js +13 -3
  75. package/es/ProForm/components/combination/ProCascader/utils/index.js +7 -2
  76. package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +14 -4
  77. package/es/ProForm/components/combination/ProModalSelect/index.js +16 -5
  78. package/es/ProForm/components/combination/ProNumberRange/index.js +24 -12
  79. package/es/ProForm/components/combination/ProNumberRange/propsType.d.ts +4 -0
  80. package/es/ProForm/components/combination/ProNumberRange/style/index.less +14 -7
  81. package/es/ProForm/components/combination/ProRangeLimit/index.js +13 -3
  82. package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +6 -1
  83. package/es/ProForm/components/combination/ProTimeLimit/index.js +13 -3
  84. package/es/ProForm/components/render/ChangedWrapper.js +7 -2
  85. package/es/ProForm/components/render/ConfirmWrapper.js +10 -4
  86. package/es/ProForm/components/render/CustomComponentViewWrapper.d.ts +30 -0
  87. package/es/ProForm/components/render/CustomComponentViewWrapper.js +120 -0
  88. package/es/ProForm/components/render/Render.js +71 -16
  89. package/es/ProForm/components/render/RenderFields.js +7 -2
  90. package/es/ProForm/index.js +17 -4
  91. package/es/ProForm/propsType.d.ts +7 -0
  92. package/es/ProForm/style/index.less +11 -2
  93. package/es/ProForm/utils/index.js +7 -2
  94. package/es/ProForm/utils/rulesCreator.js +5 -1
  95. package/es/ProForm/utils/transformValue.js +5 -1
  96. package/es/ProForm/utils/useForm.js +15 -5
  97. package/es/ProForm/utils/useShouldUpdate.js +93 -35
  98. package/es/ProForm/utils/useWatch.js +6 -1
  99. package/es/ProForm/utils/valueType.js +11 -2
  100. package/es/ProIcon/index.js +13 -3
  101. package/es/ProIcon/utils/index.js +5 -1
  102. package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +28 -35
  103. package/es/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +6 -2
  104. package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +54 -35
  105. package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +3 -12
  106. package/es/ProLayout/components/Layout/Notice/style/index.less +4 -0
  107. package/es/ProLayout/components/ProCollapse/index.js +5 -1
  108. package/es/ProLayout/components/ProCollapse/style/index.less +9 -9
  109. package/es/ProLayout/components/ProFooter/index.js +6 -2
  110. package/es/ProLayout/components/ProHeader/index.js +14 -4
  111. package/es/ProLayout/components/TabsManager/components/TabContextMenu.d.ts +7 -0
  112. package/es/ProLayout/components/TabsManager/components/TabContextMenu.js +100 -0
  113. package/es/ProLayout/components/TabsManager/components/TabItem.d.ts +26 -0
  114. package/es/ProLayout/components/TabsManager/components/TabItem.js +61 -0
  115. package/es/ProLayout/components/TabsManager/components/TabsContext.d.ts +6 -0
  116. package/es/ProLayout/components/TabsManager/components/TabsContext.js +5 -0
  117. package/es/ProLayout/components/TabsManager/hooks/useActiveTab.d.ts +6 -0
  118. package/es/ProLayout/components/TabsManager/hooks/useActiveTab.js +14 -0
  119. package/es/ProLayout/components/TabsManager/hooks/useProLayoutTabs.d.ts +18 -0
  120. package/es/ProLayout/components/TabsManager/hooks/useProLayoutTabs.js +26 -0
  121. package/es/ProLayout/components/TabsManager/hooks/useTabsCache.d.ts +31 -0
  122. package/es/ProLayout/components/TabsManager/hooks/useTabsCache.js +96 -0
  123. package/es/ProLayout/components/TabsManager/hooks/useTabsState.d.ts +5 -0
  124. package/es/ProLayout/components/TabsManager/hooks/useTabsState.js +364 -0
  125. package/es/ProLayout/components/TabsManager/index.d.ts +8 -0
  126. package/es/ProLayout/components/TabsManager/index.js +180 -0
  127. package/es/ProLayout/components/TabsManager/propTypes.d.ts +74 -0
  128. package/es/ProLayout/components/TabsManager/propTypes.js +16 -0
  129. package/es/ProLayout/components/TabsManager/style/index.less +179 -0
  130. package/es/ProLayout/components/TabsManager/utils/index.d.ts +38 -0
  131. package/es/ProLayout/components/TabsManager/utils/index.js +106 -0
  132. package/es/ProLayout/index.d.ts +10 -4
  133. package/es/ProLayout/index.js +100 -16
  134. package/es/ProLayout/propTypes.d.ts +139 -1
  135. package/es/ProLayout/propTypes.js +37 -1
  136. package/es/ProLayout/utils/index.js +16 -7
  137. package/es/ProSelect/components/AdaptiveTooltip.js +6 -1
  138. package/es/ProSelect/index.js +13 -3
  139. package/es/ProSelect/utils/index.js +3 -1
  140. package/es/ProStep/components/Item/index.js +8 -2
  141. package/es/ProStep/components/Listener/index.js +10 -4
  142. package/es/ProStep/components/Step/index.js +11 -2
  143. package/es/ProStep/index.js +16 -5
  144. package/es/ProStep/utils/index.js +5 -1
  145. package/es/ProStepTab/index.js +19 -8
  146. package/es/ProTable/components/FormatColumn/index.js +7 -2
  147. package/es/ProTable/components/RcTable/components/BaseTable/index.js +7 -2
  148. package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +10 -4
  149. package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +5 -1
  150. package/es/ProTable/components/RcTable/components/DraggableTable/index.js +7 -2
  151. package/es/ProTable/components/RenderColumn/index.js +11 -2
  152. package/es/ProTable/components/RenderTabs/index.js +11 -2
  153. package/es/ProTable/components/TableResizable/index.js +13 -3
  154. package/es/ProTable/components/TooltipTitle/index.js +3 -5
  155. package/es/ProTable/hooks/useAntdTable.js +17 -6
  156. package/es/ProTable/index.js +16 -5
  157. package/es/ProTable/style/index.less +3 -0
  158. package/es/ProTable/utils/index.js +6 -1
  159. package/es/ProTabs/index.js +13 -3
  160. package/es/ProThemeTools/component/ProTools/index.js +11 -2
  161. package/es/ProThemeTools/context/ThemeContext.js +11 -2
  162. package/es/ProThemeTools/index.js +13 -3
  163. package/es/ProThemeTools/utils/index.js +5 -1
  164. package/es/ProTooltip/index.js +13 -3
  165. package/es/ProTree/components/CloseIcon.js +5 -1
  166. package/es/ProTree/components/List.js +7 -2
  167. package/es/ProTree/components/ProTree.js +16 -5
  168. package/es/ProTree/components/ProTreeSelect/index.js +122 -76
  169. package/es/ProTree/components/Tree.js +16 -5
  170. package/es/ProTree/index.js +5 -1
  171. package/es/ProTree/utils.js +8 -2
  172. package/es/ProTreeModal/components/Cascader.js +11 -2
  173. package/es/ProTreeModal/components/CloseIcon.js +5 -1
  174. package/es/ProTreeModal/components/List.js +6 -1
  175. package/es/ProTreeModal/components/SortableItem.js +5 -1
  176. package/es/ProTreeModal/components/Tree.js +13 -3
  177. package/es/ProTreeModal/components/Trigger.js +11 -2
  178. package/es/ProTreeModal/index.js +11 -2
  179. package/es/ProTreeModal/style/index.less +6 -0
  180. package/es/ProTreeModal/utils.js +8 -2
  181. package/es/ProUpload/components/ButtonRender.js +8 -3
  182. package/es/ProUpload/components/DragRender.d.ts +1 -0
  183. package/es/ProUpload/components/DragRender.js +10 -2
  184. package/es/ProUpload/components/DraggableUploadListItem.js +5 -1
  185. package/es/ProUpload/components/Example.js +11 -2
  186. package/es/ProUpload/components/ImageRender.js +14 -4
  187. package/es/ProUpload/index.js +17 -5
  188. package/es/ProUpload/propsType.d.ts +5 -0
  189. package/es/ProViewer/index.js +14 -4
  190. package/es/ProWaterMark/index.js +5 -1
  191. package/es/index.d.ts +1 -2
  192. package/es/index.js +1 -0
  193. package/es/locale/en_US.d.ts +9 -0
  194. package/es/locale/en_US.js +9 -0
  195. package/es/locale/zh_CN.d.ts +9 -0
  196. package/es/locale/zh_CN.js +9 -0
  197. package/es/style/theme/antd.less +11 -35
  198. package/es/utils/index.js +6 -1
  199. package/jest.config.js +3 -1
  200. package/lib/FormsProvider/index.js +2 -1
  201. package/lib/ProAction/index.js +20 -10
  202. package/lib/ProConfigProvider/index.js +29 -19
  203. package/lib/ProDownload/index.js +29 -17
  204. package/lib/ProDownload/utils.js +14 -12
  205. package/lib/ProDrawerForm/components/ProDrawer/index.js +27 -16
  206. package/lib/ProDrawerForm/components/ProModal/index.js +21 -10
  207. package/lib/ProDrawerForm/components/index.js +2 -2
  208. package/lib/ProDrawerForm/index.js +20 -9
  209. package/lib/ProEditLabel/components/RenderProForm.js +9 -6
  210. package/lib/ProEditLabel/index.js +30 -18
  211. package/lib/ProEditTable/components/ActionButton/index.js +14 -11
  212. package/lib/ProEditTable/components/RcTable/BaseTable.js +19 -9
  213. package/lib/ProEditTable/components/RcTable/DraggableTable.js +19 -13
  214. package/lib/ProEditTable/components/RcTable/index.js +2 -2
  215. package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +21 -11
  216. package/lib/ProEditTable/components/RenderField/index.js +76 -50
  217. package/lib/ProEditTable/components/RenderToolbar/index.js +18 -12
  218. package/lib/ProEditTable/components/index.js +2 -2
  219. package/lib/ProEditTable/index.js +33 -26
  220. package/lib/ProEditTable/propsType.d.ts +12 -6
  221. package/lib/ProEditTable/style/index.less +22 -1
  222. package/lib/ProEditTable/utils/config.js +20 -15
  223. package/lib/ProEditTable/utils/index.js +23 -19
  224. package/lib/ProEditTable/utils/tools.js +30 -21
  225. package/lib/ProEditTable/utils/useEditTableError.js +7 -3
  226. package/lib/ProEditTable/utils/useShouldUpdateForTable.js +17 -9
  227. package/lib/ProEnum/components/Group.js +8 -3
  228. package/lib/ProEnum/components/Tag.js +8 -3
  229. package/lib/ProEnum/hooks/useEnum.d.ts +8 -0
  230. package/lib/ProEnum/hooks/useEnum.js +76 -4
  231. package/lib/ProEnum/hooks/useEnumRequest.js +23 -18
  232. package/lib/ProEnum/hooks/useFrequentEnumRequest.js +12 -8
  233. package/lib/ProEnum/index.js +37 -26
  234. package/lib/ProEnum/utils/eventCenter.js +4 -3
  235. package/lib/ProEnum/utils/frequentEnum.js +6 -3
  236. package/lib/ProEnum/utils/index.js +3 -3
  237. package/lib/ProForm/components/Container.js +1 -1
  238. package/lib/ProForm/components/FormFooter/index.js +11 -6
  239. package/lib/ProForm/components/base/Checkbox/index.js +13 -7
  240. package/lib/ProForm/components/base/DatePicker/index.js +11 -6
  241. package/lib/ProForm/components/base/DatePicker/useDateLimit.js +7 -3
  242. package/lib/ProForm/components/base/Input/index.js +11 -6
  243. package/lib/ProForm/components/base/InputNumber/index.js +21 -10
  244. package/lib/ProForm/components/base/Radio/index.js +10 -5
  245. package/lib/ProForm/components/base/RangePicker/index.d.ts +7 -1
  246. package/lib/ProForm/components/base/RangePicker/index.js +55 -9
  247. package/lib/ProForm/components/base/RangePicker/useDateRange.js +7 -3
  248. package/lib/ProForm/components/base/Select/index.js +10 -5
  249. package/lib/ProForm/components/base/Switch/index.js +10 -5
  250. package/lib/ProForm/components/base/SwitchCheckbox/index.js +12 -6
  251. package/lib/ProForm/components/base/TextArea/index.js +10 -5
  252. package/lib/ProForm/components/base/TimePicker/index.js +10 -5
  253. package/lib/ProForm/components/combination/Container/index.js +11 -6
  254. package/lib/ProForm/components/combination/Container/style/index.less +5 -0
  255. package/lib/ProForm/components/combination/FormList/components/ActionButton.js +26 -19
  256. package/lib/ProForm/components/combination/FormList/components/BlockFields.js +3 -2
  257. package/lib/ProForm/components/combination/FormList/components/BlockTitle.js +1 -1
  258. package/lib/ProForm/components/combination/FormList/components/Empty.js +6 -5
  259. package/lib/ProForm/components/combination/FormList/components/LineFields.js +7 -3
  260. package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +20 -14
  261. package/lib/ProForm/components/combination/FormList/index.js +48 -10
  262. package/lib/ProForm/components/combination/FormList/style/index.less +1 -1
  263. package/lib/ProForm/components/combination/FormList/utils.d.ts +6 -0
  264. package/lib/ProForm/components/combination/FormList/utils.js +20 -2
  265. package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.js +1 -1
  266. package/lib/ProForm/components/combination/Group/component/ComRender.d.ts +3 -0
  267. package/lib/ProForm/components/combination/Group/component/ComRender.js +79 -11
  268. package/lib/ProForm/components/combination/Group/component/FlexibleGroup.d.ts +10 -0
  269. package/lib/ProForm/components/combination/Group/component/FlexibleGroup.js +360 -0
  270. package/lib/ProForm/components/combination/Group/hooks/index.d.ts +16 -1
  271. package/lib/ProForm/components/combination/Group/hooks/index.js +111 -9
  272. package/lib/ProForm/components/combination/Group/index.d.ts +3 -4
  273. package/lib/ProForm/components/combination/Group/index.js +111 -27
  274. package/lib/ProForm/components/combination/Group/propsType.d.ts +44 -1
  275. package/lib/ProForm/components/combination/Group/style/index.less +425 -3
  276. package/lib/ProForm/components/combination/Group/utils/index.d.ts +154 -0
  277. package/lib/ProForm/components/combination/Group/utils/index.js +444 -0
  278. package/lib/ProForm/components/combination/ProCascader/index.js +20 -10
  279. package/lib/ProForm/components/combination/ProCascader/utils/index.js +9 -5
  280. package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +25 -15
  281. package/lib/ProForm/components/combination/ProModalSelect/index.js +53 -41
  282. package/lib/ProForm/components/combination/ProNumberRange/index.js +28 -16
  283. package/lib/ProForm/components/combination/ProNumberRange/propsType.d.ts +4 -0
  284. package/lib/ProForm/components/combination/ProNumberRange/style/index.less +14 -7
  285. package/lib/ProForm/components/combination/ProRangeLimit/index.js +29 -18
  286. package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +8 -3
  287. package/lib/ProForm/components/combination/ProTimeLimit/index.js +26 -15
  288. package/lib/ProForm/components/index.js +2 -2
  289. package/lib/ProForm/components/render/ChangedWrapper.js +16 -10
  290. package/lib/ProForm/components/render/ConfirmWrapper.js +19 -13
  291. package/lib/ProForm/components/render/CustomComponentViewWrapper.d.ts +30 -0
  292. package/lib/ProForm/components/render/CustomComponentViewWrapper.js +127 -0
  293. package/lib/ProForm/components/render/Render.js +93 -37
  294. package/lib/ProForm/components/render/RenderFields.js +15 -9
  295. package/lib/ProForm/index.js +27 -13
  296. package/lib/ProForm/propsType.d.ts +7 -0
  297. package/lib/ProForm/style/index.less +11 -2
  298. package/lib/ProForm/utils/index.js +12 -8
  299. package/lib/ProForm/utils/rulesCreator.js +8 -4
  300. package/lib/ProForm/utils/transformValue.js +6 -3
  301. package/lib/ProForm/utils/useFieldProps.js +2 -1
  302. package/lib/ProForm/utils/useForm.js +21 -12
  303. package/lib/ProForm/utils/useRules.js +1 -1
  304. package/lib/ProForm/utils/useShouldUpdate.js +94 -37
  305. package/lib/ProForm/utils/useWatch.js +8 -3
  306. package/lib/ProForm/utils/valueType.js +15 -6
  307. package/lib/ProIcon/index.js +26 -16
  308. package/lib/ProIcon/utils/index.js +7 -4
  309. package/lib/ProLayout/components/Layout/Header/index.js +1 -1
  310. package/lib/ProLayout/components/Layout/Icon/Icon.js +2 -1
  311. package/lib/ProLayout/components/Layout/Icon/index.js +1 -1
  312. package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +31 -38
  313. package/lib/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +6 -2
  314. package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +55 -36
  315. package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +3 -12
  316. package/lib/ProLayout/components/Layout/Menu/SideMenu/index.js +1 -1
  317. package/lib/ProLayout/components/Layout/Menu/index.js +1 -1
  318. package/lib/ProLayout/components/Layout/Notice/index.js +1 -1
  319. package/lib/ProLayout/components/Layout/Notice/style/index.less +4 -0
  320. package/lib/ProLayout/components/Layout/index.js +2 -2
  321. package/lib/ProLayout/components/ProCollapse/index.js +10 -6
  322. package/lib/ProLayout/components/ProCollapse/style/index.less +9 -9
  323. package/lib/ProLayout/components/ProFooter/index.js +8 -4
  324. package/lib/ProLayout/components/ProHeader/components/Copy/index.js +1 -1
  325. package/lib/ProLayout/components/ProHeader/components/ProBackBtn/index.js +1 -1
  326. package/lib/ProLayout/components/ProHeader/components/index.js +2 -2
  327. package/lib/ProLayout/components/ProHeader/index.js +22 -12
  328. package/lib/ProLayout/components/TabsManager/components/TabContextMenu.d.ts +7 -0
  329. package/lib/ProLayout/components/TabsManager/components/TabContextMenu.js +106 -0
  330. package/lib/ProLayout/components/TabsManager/components/TabItem.d.ts +26 -0
  331. package/lib/ProLayout/components/TabsManager/components/TabItem.js +67 -0
  332. package/lib/ProLayout/components/TabsManager/components/TabsContext.d.ts +6 -0
  333. package/lib/ProLayout/components/TabsManager/components/TabsContext.js +11 -0
  334. package/lib/ProLayout/components/TabsManager/hooks/useActiveTab.d.ts +6 -0
  335. package/lib/ProLayout/components/TabsManager/hooks/useActiveTab.js +20 -0
  336. package/lib/ProLayout/components/TabsManager/hooks/useProLayoutTabs.d.ts +18 -0
  337. package/lib/ProLayout/components/TabsManager/hooks/useProLayoutTabs.js +31 -0
  338. package/lib/ProLayout/components/TabsManager/hooks/useTabsCache.d.ts +31 -0
  339. package/lib/ProLayout/components/TabsManager/hooks/useTabsCache.js +103 -0
  340. package/lib/ProLayout/components/TabsManager/hooks/useTabsState.d.ts +5 -0
  341. package/lib/ProLayout/components/TabsManager/hooks/useTabsState.js +370 -0
  342. package/lib/ProLayout/components/TabsManager/index.d.ts +8 -0
  343. package/lib/ProLayout/components/TabsManager/index.js +183 -0
  344. package/lib/ProLayout/components/TabsManager/propTypes.d.ts +74 -0
  345. package/lib/ProLayout/components/TabsManager/propTypes.js +22 -0
  346. package/lib/ProLayout/components/TabsManager/style/index.less +179 -0
  347. package/lib/ProLayout/components/TabsManager/utils/index.d.ts +38 -0
  348. package/lib/ProLayout/components/TabsManager/utils/index.js +119 -0
  349. package/lib/ProLayout/components/index.js +2 -2
  350. package/lib/ProLayout/index.d.ts +10 -4
  351. package/lib/ProLayout/index.js +115 -23
  352. package/lib/ProLayout/propTypes.d.ts +139 -1
  353. package/lib/ProLayout/propTypes.js +40 -1
  354. package/lib/ProLayout/utils/index.js +18 -13
  355. package/lib/ProSelect/components/AdaptiveTooltip.js +7 -3
  356. package/lib/ProSelect/index.js +23 -12
  357. package/lib/ProSelect/utils/index.js +8 -8
  358. package/lib/ProStep/components/Anchor/index.js +1 -1
  359. package/lib/ProStep/components/Item/index.js +15 -9
  360. package/lib/ProStep/components/Listener/index.js +15 -9
  361. package/lib/ProStep/components/Step/index.js +17 -7
  362. package/lib/ProStep/index.js +30 -19
  363. package/lib/ProStep/utils/index.js +6 -3
  364. package/lib/ProStepTab/index.js +33 -22
  365. package/lib/ProTable/components/FormatColumn/index.js +22 -16
  366. package/lib/ProTable/components/RcTable/components/BaseTable/index.js +9 -5
  367. package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +22 -16
  368. package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +8 -5
  369. package/lib/ProTable/components/RcTable/components/DraggableTable/index.js +11 -6
  370. package/lib/ProTable/components/RcTable/index.js +2 -2
  371. package/lib/ProTable/components/RenderColumn/index.js +17 -8
  372. package/lib/ProTable/components/RenderTabs/index.js +16 -7
  373. package/lib/ProTable/components/TableResizable/index.js +19 -9
  374. package/lib/ProTable/components/TooltipTitle/index.js +3 -6
  375. package/lib/ProTable/components/index.js +2 -2
  376. package/lib/ProTable/hooks/useAntdTable.js +42 -31
  377. package/lib/ProTable/index.js +41 -29
  378. package/lib/ProTable/style/index.less +3 -0
  379. package/lib/ProTable/utils/index.js +7 -3
  380. package/lib/ProTabs/components/index.js +2 -2
  381. package/lib/ProTabs/index.js +23 -12
  382. package/lib/ProThemeTools/component/ProTools/index.js +21 -11
  383. package/lib/ProThemeTools/component/index.js +2 -2
  384. package/lib/ProThemeTools/context/ThemeContext.js +20 -16
  385. package/lib/ProThemeTools/index.js +22 -12
  386. package/lib/ProThemeTools/utils/index.js +6 -3
  387. package/lib/ProTooltip/index.js +30 -20
  388. package/lib/ProTree/components/CloseIcon.js +6 -3
  389. package/lib/ProTree/components/List.js +10 -5
  390. package/lib/ProTree/components/ProTree.js +23 -12
  391. package/lib/ProTree/components/ProTreeSelect/index.js +141 -94
  392. package/lib/ProTree/components/SearchTitle.js +1 -1
  393. package/lib/ProTree/components/Tree.js +28 -16
  394. package/lib/ProTree/components/index.js +2 -2
  395. package/lib/ProTree/index.js +9 -5
  396. package/lib/ProTree/utils.js +16 -11
  397. package/lib/ProTreeModal/components/Cascader.js +14 -5
  398. package/lib/ProTreeModal/components/CloseIcon.js +6 -3
  399. package/lib/ProTreeModal/components/List.js +11 -7
  400. package/lib/ProTreeModal/components/SortableItem.js +10 -6
  401. package/lib/ProTreeModal/components/Tree.js +24 -13
  402. package/lib/ProTreeModal/components/Trigger.js +19 -9
  403. package/lib/ProTreeModal/components/index.js +2 -2
  404. package/lib/ProTreeModal/index.js +16 -6
  405. package/lib/ProTreeModal/style/index.less +6 -0
  406. package/lib/ProTreeModal/utils.js +17 -14
  407. package/lib/ProUpload/components/ButtonRender.js +14 -9
  408. package/lib/ProUpload/components/DragRender.d.ts +1 -0
  409. package/lib/ProUpload/components/DragRender.js +13 -5
  410. package/lib/ProUpload/components/DraggableUploadListItem.js +7 -3
  411. package/lib/ProUpload/components/Example.js +16 -6
  412. package/lib/ProUpload/components/FileItem.js +1 -1
  413. package/lib/ProUpload/components/ImageRender.js +20 -10
  414. package/lib/ProUpload/index.js +31 -18
  415. package/lib/ProUpload/propsType.d.ts +5 -0
  416. package/lib/ProViewer/index.js +22 -14
  417. package/lib/ProWaterMark/index.js +7 -3
  418. package/lib/index.d.ts +1 -2
  419. package/lib/index.js +4 -3
  420. package/lib/locale/en_US.d.ts +9 -0
  421. package/lib/locale/en_US.js +9 -0
  422. package/lib/locale/index.js +1 -1
  423. package/lib/locale/zh_CN.d.ts +9 -0
  424. package/lib/locale/zh_CN.js +9 -0
  425. package/lib/style/theme/antd.less +11 -35
  426. package/lib/utils/index.js +9 -4
  427. package/package.json +13 -16
  428. package/es/ProForm/components/combination/Group/utils.d.ts +0 -54
  429. package/es/ProForm/components/combination/Group/utils.js +0 -196
  430. package/es/assets/tip.svg +0 -1
  431. package/lib/ProForm/components/combination/Group/utils.d.ts +0 -54
  432. package/lib/ProForm/components/combination/Group/utils.js +0 -210
  433. package/lib/assets/tip.svg +0 -1
@@ -1,4 +1,8 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
1
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
5
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
2
6
  import { Space } from 'antd';
3
7
  import React from 'react';
4
8
  import { isEmpty, omit } from 'lodash';
@@ -7,19 +11,18 @@ import { insertSeparator } from "./utils";
7
11
  import { useTransformColumns } from "./hooks";
8
12
  import ProForm from "../../../../ProForm";
9
13
  import ComRender from "./component/ComRender";
14
+ import FlexibleGroup from "./component/FlexibleGroup";
10
15
 
11
16
  /**
12
- * 1. 外层过滤FormItem相关属性, 但是子元素上的 required [disabled] [show] rules [fieldProps] [component] 需要取到并
13
- * 2.
14
- *
15
- * render内部能力 show, component, value, onChange, disabled, clearNotShow, fieldProps
17
+ * 传统数组模式Group组件(保持向后兼容)
16
18
  */
17
19
  import { jsx as _jsx } from "react/jsx-runtime";
18
- var Group = props => {
20
+ var LegacyGroup = props => {
21
+ var _ref, _fieldProps;
19
22
  var children = props.children,
20
23
  className = props.className,
21
24
  _props$space = props.space,
22
- space = _props$space === void 0 ? {
25
+ propsSpace = _props$space === void 0 ? {
23
26
  size: 12
24
27
  } : _props$space,
25
28
  value = props.value,
@@ -28,8 +31,15 @@ var Group = props => {
28
31
  id = props.id,
29
32
  isParentView = props.isView,
30
33
  formDisabled = props.disabled,
31
- _props$split = props.split,
32
- split = _props$split === void 0 ? '/' : _props$split;
34
+ separator = props.separator,
35
+ split = props.split;
36
+
37
+ // 向后兼容处理:优先使用 separator,如果没有则使用 split,最后使用默认值
38
+ var finalSeparator = (_ref = separator !== null && separator !== void 0 ? separator : split) !== null && _ref !== void 0 ? _ref : '/';
39
+
40
+ // 支持从 fieldProps.space 获取 space 配置
41
+ var fieldPropsSpace = (_fieldProps = props.fieldProps) === null || _fieldProps === void 0 ? void 0 : _fieldProps.space;
42
+ var space = fieldPropsSpace || propsSpace;
33
43
  var contextProps = ProForm.useFieldProps() || {};
34
44
  var names = contextProps.names,
35
45
  name = contextProps.name,
@@ -62,6 +72,7 @@ var Group = props => {
62
72
  var columns = insertSeparator(columnsProps, space);
63
73
  var nextClassName = classnames({
64
74
  'pro-group': true,
75
+ 'pro-group-unflexible': true,
65
76
  'pro-group-diy-width': columns.some(item => {
66
77
  var _item$fieldProps;
67
78
  return item === null || item === void 0 || (_item$fieldProps = item.fieldProps) === null || _item$fieldProps === void 0 || (_item$fieldProps = _item$fieldProps.style) === null || _item$fieldProps === void 0 ? void 0 : _item$fieldProps.width;
@@ -75,26 +86,71 @@ var Group = props => {
75
86
  if (nextIsView && isEmpty(value)) {
76
87
  return (otherProps === null || otherProps === void 0 ? void 0 : otherProps.viewEmpty) || '-';
77
88
  }
89
+
90
+ // compact模式专用:为每个字段创建可见的Form.Item,并应用宽度样式
91
+ var renderCompactFormItems = () => {
92
+ var elements = [];
93
+ columns.forEach((column, index) => {
94
+ var _column$fieldProps;
95
+ // 检测是否有自定义宽度
96
+ var childWidth = column === null || column === void 0 || (_column$fieldProps = column.fieldProps) === null || _column$fieldProps === void 0 || (_column$fieldProps = _column$fieldProps.style) === null || _column$fieldProps === void 0 ? void 0 : _column$fieldProps.width;
97
+ var formItemStyle = childWidth ? {
98
+ width: childWidth
99
+ } : undefined;
100
+ var formItemClassName = childWidth ? 'pro-group-form-item pro-group-form-item-has-width' : 'pro-group-form-item';
101
+
102
+ // 创建新的 column 对象,避免直接修改原对象
103
+ var newColumn = _objectSpread({}, column);
104
+ newColumn.otherProps = otherProps;
105
+
106
+ // 如果子组件有自定义宽度,将子组件的宽度改为 100%,让它填充 Form.Item
107
+ if (childWidth) {
108
+ var _newColumn$fieldProps;
109
+ newColumn.fieldProps = _objectSpread(_objectSpread({}, newColumn.fieldProps), {}, {
110
+ style: _objectSpread(_objectSpread({}, (_newColumn$fieldProps = newColumn.fieldProps) === null || _newColumn$fieldProps === void 0 ? void 0 : _newColumn$fieldProps.style), {}, {
111
+ width: '100%'
112
+ })
113
+ });
114
+ }
115
+
116
+ // 自定义间隔移除对应参数
117
+ if (newColumn !== null && newColumn !== void 0 && newColumn.separator) {
118
+ delete newColumn.separator;
119
+ delete newColumn.otherProps;
120
+ }
121
+
122
+ // 传统模式 compact 模式:将 Form.Item 相关的 props 传递给 ComRender
123
+ // ComRender 内部会处理 Form.Item 的渲染,避免嵌套
124
+ var dependencies = names && names.length > 0 ? names.filter(n => n !== newColumn.name) : undefined;
125
+ var formElement = /*#__PURE__*/_jsx(ComRender, _objectSpread({
126
+ contextProps: contextProps,
127
+ isView: nextIsView,
128
+ formItemClassName: formItemClassName,
129
+ formItemStyle: formItemStyle,
130
+ dependencies: dependencies
131
+ }, newColumn), newColumn.name || index);
132
+ elements.push(formElement);
133
+
134
+ // 添加分隔符
135
+ if (newColumn !== null && newColumn !== void 0 && newColumn.separator && index < columns.length - 1) {
136
+ elements.push( /*#__PURE__*/_jsx("span", {
137
+ className: "pro-group-separator-compact",
138
+ children: newColumn.separator
139
+ }, `separator-${newColumn.name || index}`));
140
+ }
141
+ });
142
+ return /*#__PURE__*/_jsx("div", {
143
+ className: "ant-space ant-space-horizontal ant-space-compact pro-group-compact-container",
144
+ children: elements
145
+ });
146
+ };
78
147
  return /*#__PURE__*/_jsx("div", {
79
148
  className: nextClassName,
80
149
  id: id,
81
- children: (space.compact || space !== null && space !== void 0 && space.separator) && !nextIsView ? /*#__PURE__*/_jsx(Space.Compact, {
82
- children: columns.map((column, index) => {
83
- column.otherProps = otherProps;
84
- // 自定义间隔移除对应参数
85
- if (column !== null && column !== void 0 && column.separator) {
86
- delete column.separator;
87
- delete column.otherProps;
88
- }
89
- return /*#__PURE__*/_jsx(ComRender, _objectSpread({
90
- contextProps: contextProps,
91
- isView: nextIsView
92
- }, column), column.name || index);
93
- })
94
- }) : /*#__PURE__*/_jsx(Space, _objectSpread(_objectSpread({
150
+ children: (space.compact || space !== null && space !== void 0 && space.separator) && !nextIsView ? renderCompactFormItems() : /*#__PURE__*/_jsx(Space, _objectSpread(_objectSpread({
95
151
  align: "start"
96
152
  }, omit(space, ['separator', 'compact'])), {}, {
97
- split: nextIsView ? split : null,
153
+ separator: nextIsView ? finalSeparator : null,
98
154
  size: nextIsView ? 0 : space.size,
99
155
  children: columns.map((column, index) => {
100
156
  column.otherProps = otherProps;
@@ -110,4 +166,32 @@ var Group = props => {
110
166
  }))
111
167
  });
112
168
  };
169
+
170
+ /**
171
+ * Group组件 - 支持传统模式和灵活模式
172
+ * - 有names属性 → 传统数组模式(保持向后兼容)
173
+ * - 无names属性 → 新的灵活模式(子组件必须配置name)
174
+ */
175
+ var Group = props => {
176
+ var _ref2 = props,
177
+ children = _ref2.children,
178
+ names = _ref2.names,
179
+ otherProps = _ref2.otherProps;
180
+
181
+ // names可能在props.names或props.otherProps.names中(来自ProForm的传递)
182
+ var actualNames = names || (otherProps === null || otherProps === void 0 ? void 0 : otherProps.names);
183
+
184
+ // 模式检测:基于names属性判断使用哪种模式
185
+ // 传统模式:有names属性且为非空数组
186
+ // 灵活模式:无names属性或names为空,children中的子项必须配置name
187
+ var isLegacyMode = Array.isArray(actualNames) && actualNames.length > 0;
188
+ if (isLegacyMode) {
189
+ // 传统模式:使用names数组管理值,确保names被传递给LegacyGroup
190
+ return /*#__PURE__*/_jsx(LegacyGroup, _objectSpread(_objectSpread({}, props), {}, {
191
+ names: actualNames
192
+ }));
193
+ }
194
+ // 灵活模式:子组件独立管理name和rules
195
+ return /*#__PURE__*/_jsx(FlexibleGroup, _objectSpread({}, props));
196
+ };
113
197
  export default Group;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { FormItemProps, ModalFuncProps, SpaceProps } from 'antd';
3
+ import type { RuleObject } from 'antd/es/form';
3
4
  import { FormInstance } from 'antd/es/form/Form';
4
5
  import { NamePath } from 'antd/lib/form/interface';
5
6
  import type { ColumnTypeMap, FunctionArgs, ProFormValueType, ReactiveFunction, ViewType } from '../../render/propsType';
@@ -18,7 +19,9 @@ export interface SpaceType extends SpaceProps {
18
19
  size?: number;
19
20
  }
20
21
  export interface GroupType {
21
- children?: GroupColumnType[];
22
+ children?: GroupColumnType[] | FlexibleGroupColumnType[];
23
+ /** 传统模式:字段名称数组(与children索引对应) */
24
+ names?: NamePath[];
22
25
  space?: SpaceType;
23
26
  className?: string;
24
27
  id?: string;
@@ -28,6 +31,10 @@ export interface GroupType {
28
31
  onChange?: (value: any[] | null, options?: any[]) => void;
29
32
  otherProps?: any;
30
33
  /** 分隔符 */
34
+ separator?: string | React.ReactNode;
35
+ /**
36
+ * @deprecated 已弃用,请使用 separator 替代
37
+ */
31
38
  split?: string | React.ReactNode;
32
39
  }
33
40
  export type GroupColumnType<Values = any> = {
@@ -54,6 +61,42 @@ export type GroupColumnType<Values = any> = {
54
61
  getValueProps?: (value: any) => Record<string, unknown>;
55
62
  desensitization?: [number, number] | ReactiveFunction<Values, [number, number]>;
56
63
  } & ColumnTypeMap & FormItemProps;
64
+ /**
65
+ * 灵活模式子组件类型定义(新模式)
66
+ */
67
+ export interface FlexibleGroupColumnType<Values = any> extends Omit<GroupColumnType<Values>, 'names' | 'tooltip' | 'rules'> {
68
+ /** 字段名称,新模式下必须 */
69
+ name: NamePath;
70
+ /** 字段标签 */
71
+ label?: React.ReactNode;
72
+ /** 校验规则,支持函数化 */
73
+ rules?: RuleObject[] | ReactiveFunction<Values, RuleObject[]>;
74
+ /** 是否必填 */
75
+ required?: boolean;
76
+ /** 字段依赖 */
77
+ dependencies?: NamePath[];
78
+ /** 提示信息 */
79
+ tooltip?: string | {
80
+ title: string;
81
+ icon?: React.ReactNode;
82
+ };
83
+ /** 额外信息 */
84
+ extra?: React.ReactNode;
85
+ /** 前置内容 */
86
+ before?: React.ReactNode;
87
+ /** 后置内容 */
88
+ after?: React.ReactNode;
89
+ /** 确认操作 */
90
+ confirm?: boolean | ModalFuncProps | FunctionArgs<Values, boolean | ModalFuncProps>;
91
+ /** 显示控制,支持函数化 */
92
+ show?: boolean | ReactiveFunction<Values, boolean>;
93
+ /** 禁用状态,支持函数化 */
94
+ disabled?: boolean | ReactiveFunction<Values, boolean>;
95
+ /** 自定义组件,支持函数化 */
96
+ component?: React.ReactNode | ReactiveFunction<Values, React.ReactNode>;
97
+ /** 字段属性,支持函数化 */
98
+ fieldProps?: any | ReactiveFunction<Values, any>;
99
+ }
57
100
  /**
58
101
  * 兼容旧命名导出
59
102
  */
@@ -1,6 +1,9 @@
1
1
  .pro-group {
2
2
  display: flex;
3
3
  width: unset !important;
4
+
5
+
6
+
4
7
  &.pro-group-view {
5
8
  .@{ant-prefix}-space {
6
9
  .@{ant-prefix}-space-item {
@@ -38,7 +41,7 @@
38
41
 
39
42
  .@{ant-prefix}-space-compact {
40
43
  flex: auto;
41
- align-items: center;
44
+ align-items: flex-start; // 改为顶部对齐,避免错误信息影响对齐
42
45
  width: 100%;
43
46
 
44
47
  .@{ant-prefix}-form-item {
@@ -46,12 +49,23 @@
46
49
  }
47
50
 
48
51
  .group-separator {
52
+ height: 32px; // 明确设置高度与输入框一致
49
53
  padding: 0 12px;
54
+ color: #999;
55
+ font-size: 14px;
56
+ line-height: 30px; // 调整行高匹配32px输入框高度
50
57
  background-color: #fff;
58
+ border: 1px solid #d9d9d9; // 使用标准的1px边框
59
+ outline: none;
60
+
61
+ // 移除默认button样式
62
+ box-shadow: none;
51
63
  cursor: default;
52
- margin-inline-end: -2px;
53
- margin-inline-start: -1px;
64
+ margin-inline-start: -2px;
65
+ border-radius: 0;
66
+
54
67
  }
68
+
55
69
  .pro-modal-select {
56
70
  margin-left: -1px;
57
71
  }
@@ -70,4 +84,412 @@
70
84
  border-color: #ff4d4f;
71
85
  }
72
86
  }
87
+
88
+ // 针对灵活模式的样式优化
89
+ &.pro-group-flexible {
90
+ // Space.Compact的样式优化
91
+ .@{ant-prefix}-space-compact {
92
+ display: flex;
93
+ align-items: flex-start;
94
+ width: 100%;
95
+
96
+ // Form.Item在compact模式下的样式
97
+ .@{ant-prefix}-form-item {
98
+ flex: 1;
99
+ margin-right: 0;
100
+ margin-bottom: 0;
101
+
102
+ // 第一个元素后面的所有元素都左移1px以实现紧密连接
103
+ &:not(:first-child) {
104
+ margin-left: -1px;
105
+ }
106
+
107
+ // 确保输入框完全贴合
108
+ .@{ant-prefix}-input,
109
+ .@{ant-prefix}-select .@{ant-prefix}-select-selector,
110
+ .@{ant-prefix}-input-number,
111
+ .@{ant-prefix}-input-number-input {
112
+ // 重置z-index确保正确的层级关系
113
+ position: relative;
114
+ // 重置圆角
115
+ border-radius: 0;
116
+ }
117
+
118
+ // 第一个表单项:左边保持圆角
119
+ &:first-child {
120
+ .@{ant-prefix}-input,
121
+ .@{ant-prefix}-select .@{ant-prefix}-select-selector,
122
+ .@{ant-prefix}-input-number,
123
+ .@{ant-prefix}-input-number-input {
124
+ border-top-left-radius: 8px;
125
+ border-bottom-left-radius: 8px;
126
+ }
127
+ }
128
+
129
+ // 最后一个表单项:右边保持圆角
130
+ &:last-child {
131
+ .@{ant-prefix}-input,
132
+ .@{ant-prefix}-select .@{ant-prefix}-select-selector,
133
+ .@{ant-prefix}-input-number,
134
+ .@{ant-prefix}-input-number-input {
135
+ border-top-right-radius: 8px;
136
+ border-bottom-right-radius: 8px;
137
+ }
138
+ }
139
+
140
+ // 中间元素和最后元素:去掉左边框避免重复
141
+ &:not(:first-child) {
142
+ .@{ant-prefix}-input-number-input {
143
+ border-left: 0;
144
+ }
145
+
146
+ // 聚焦时恢复左边框
147
+ .@{ant-prefix}-input:focus,
148
+ .@{ant-prefix}-select:focus .@{ant-prefix}-select-selector,
149
+ .@{ant-prefix}-input-number:focus,
150
+ .@{ant-prefix}-input-number:focus .@{ant-prefix}-input-number-input {
151
+ margin-left: -1px;
152
+ border-left-width: 1px;
153
+ }
154
+ }
155
+
156
+ // 错误状态:确保边框变红(优先级要高于上面的 border-left-width: 0)
157
+ &.@{ant-prefix}-form-item-has-error {
158
+ .@{ant-prefix}-input,
159
+ .@{ant-prefix}-select .@{ant-prefix}-select-selector,
160
+ .@{ant-prefix}-input-number,
161
+ .@{ant-prefix}-input-number-input {
162
+ border-color: #ff4d4f !important;
163
+ }
164
+
165
+ // 错误状态下,中间元素也需要恢复左边框并设置为红色
166
+ &:not(:first-child) {
167
+ .@{ant-prefix}-input,
168
+ .@{ant-prefix}-select .@{ant-prefix}-select-selector,
169
+ .@{ant-prefix}-input-number {
170
+ border-left-color: #ff4d4f !important;
171
+ border-left-width: 1px !important;
172
+ }
173
+
174
+ .@{ant-prefix}-input-number-input {
175
+ border-left: 0 !important;
176
+ }
177
+ }
178
+
179
+ // 聚焦时保持红色边框
180
+ .@{ant-prefix}-input:focus,
181
+ .@{ant-prefix}-select:focus .@{ant-prefix}-select-selector,
182
+ .@{ant-prefix}-input-number:focus,
183
+ .@{ant-prefix}-input-number:focus .@{ant-prefix}-input-number-input {
184
+ border-color: #ff4d4f !important;
185
+ }
186
+
187
+ // Select 组件的错误状态处理
188
+ .@{ant-prefix}-select.@{ant-prefix}-select-status-error .@{ant-prefix}-select-selector {
189
+ border-color: #ff4d4f !important;
190
+ }
191
+ }
192
+ }
193
+
194
+ // 分隔符样式 - 确保与输入框完美对齐
195
+ .pro-group-separator {
196
+ position: relative;
197
+ display: inline-flex;
198
+ flex: none;
199
+ align-items: center;
200
+ height: 32px;
201
+ margin-right: -1px;
202
+ margin-left: -1px;
203
+ padding: 0 8px;
204
+ color: #666;
205
+ font-size: 14px;
206
+ line-height: 32px;
207
+ background-color: #fafafa;
208
+ border-top: 1px solid #d9d9d9;
209
+ border-right: 0;
210
+ border-bottom: 1px solid #d9d9d9;
211
+ border-left: 0;
212
+ user-select: none;
213
+ }
214
+
215
+ .@{ant-prefix}-form-item-has-error + .pro-group-separator-compact {
216
+ border-color: red;
217
+ }
218
+
219
+ // compact模式分隔符样式
220
+ .pro-group-separator-compact {
221
+ display: inline-flex;
222
+ flex: none;
223
+ align-items: center;
224
+ justify-items: center;
225
+ height: 32px;
226
+ padding: 0 12px;
227
+ color: #666;
228
+ line-height: 32px;
229
+ border: 1px solid #d9d9d9;
230
+ user-select: none;
231
+ margin-inline-start: -2px;
232
+ }
233
+ }
234
+
235
+ // Space模式分隔符样式
236
+ .pro-group-separator-space {
237
+ display: flex;
238
+ flex-shrink: 0;
239
+ align-items: center;
240
+ padding: 0 8px;
241
+ color: #999;
242
+ font-size: 14px;
243
+ user-select: none;
244
+ }
245
+
246
+ // 错误提示样式
247
+ .pro-group-error-tip {
248
+ padding: 8px;
249
+ color: #ff4d4f;
250
+ border: 1px dashed #ff4d4f;
251
+ }
252
+
253
+ // compact模式容器
254
+ .pro-group-compact-container {
255
+ width: 100%;
256
+ }
257
+
258
+ // Form.Item无边距样式
259
+ .pro-group-form-item {
260
+ flex: 1;
261
+ margin-left: 0 !important;
262
+ &.@{ant-prefix}-form-item-has-error{
263
+ margin-left: -1px !important;
264
+ }
265
+ }
266
+
267
+ // 当有自定义宽度时,只有设置了宽度的 Form.Item 不使用 flex:1
268
+ // 没有设置宽度的 Form.Item 保持 flex: 1,自动占据剩余空间
269
+ &.pro-group-diy-width {
270
+ // 覆盖 Space.Compact 内设置了宽度的 Form.Item
271
+ .@{ant-prefix}-space-compact {
272
+ .@{ant-prefix}-form-item.pro-group-form-item-has-width {
273
+ flex: none;
274
+ }
275
+ }
276
+
277
+ // 覆盖 compact 容器内设置了宽度的 Form.Item
278
+ .pro-group-compact-container {
279
+ .@{ant-prefix}-form-item.pro-group-form-item-has-width {
280
+ flex: none;
281
+ }
282
+ }
283
+
284
+ // 覆盖直接使用 pro-group-form-item 类且设置了宽度的 Form.Item
285
+ .pro-group-form-item.pro-group-form-item-has-width {
286
+ flex: none;
287
+ }
288
+ }
289
+ }
290
+
291
+ // 传统模式也需要相同的样式规则(不在 pro-group-flexible 下)
292
+ &:not(.pro-group-flexible) {
293
+ // compact模式容器
294
+ .pro-group-compact-container {
295
+ display: flex;
296
+ align-items: flex-start;
297
+ width: 100%;
298
+
299
+ // Form.Item在compact模式下的样式
300
+ .@{ant-prefix}-form-item {
301
+ flex: 1;
302
+ margin-right: 0;
303
+ margin-bottom: 0;
304
+
305
+ // 第一个元素后面的所有元素都左移1px以实现紧密连接
306
+ &:not(:first-child) {
307
+ margin-left: -1px;
308
+ }
309
+
310
+ // 确保输入框完全贴合
311
+ .@{ant-prefix}-input,
312
+ .@{ant-prefix}-select .@{ant-prefix}-select-selector,
313
+ .@{ant-prefix}-input-number,
314
+ .@{ant-prefix}-input-number-input {
315
+ // 重置z-index确保正确的层级关系
316
+ position: relative;
317
+ // 重置圆角
318
+ border-radius: 0;
319
+ }
320
+
321
+ // 第一个表单项:左边保持圆角
322
+ &:first-child {
323
+ .@{ant-prefix}-input,
324
+ .@{ant-prefix}-select .@{ant-prefix}-select-selector,
325
+ .@{ant-prefix}-input-number,
326
+ .@{ant-prefix}-input-number-input {
327
+ border-top-left-radius: 8px;
328
+ border-bottom-left-radius: 8px;
329
+ }
330
+ }
331
+
332
+ // 最后一个表单项:右边保持圆角
333
+ &:last-child {
334
+ .@{ant-prefix}-input,
335
+ .@{ant-prefix}-select .@{ant-prefix}-select-selector,
336
+ .@{ant-prefix}-input-number,
337
+ .@{ant-prefix}-input-number-input {
338
+ border-top-right-radius: 8px;
339
+ border-bottom-right-radius: 8px;
340
+ }
341
+ }
342
+
343
+ // 中间元素和最后元素:去掉左边框避免重复
344
+ &:not(:first-child) {
345
+ // 聚焦时恢复左边框
346
+ .@{ant-prefix}-input:focus,
347
+ .@{ant-prefix}-select:focus .@{ant-prefix}-select-selector,
348
+ .@{ant-prefix}-input-number:focus,
349
+ .@{ant-prefix}-input-number:focus .@{ant-prefix}-input-number-input {
350
+ margin-left: -1px;
351
+ border-left-width: 1px;
352
+ }
353
+ }
354
+ }
355
+
356
+ // compact模式分隔符样式
357
+ .pro-group-separator-compact {
358
+ display: inline-flex;
359
+ flex: none;
360
+ align-items: center;
361
+ justify-items: center;
362
+ height: 32px;
363
+ padding: 0 12px;
364
+ color: #666;
365
+ line-height: 32px;
366
+ border: 1px solid #d9d9d9;
367
+ user-select: none;
368
+ margin-inline-start: -1px;
369
+ }
370
+
371
+ // 错误状态的分隔符
372
+ .@{ant-prefix}-form-item-has-error + .pro-group-separator-compact {
373
+ border-color: #ff4d4f;
374
+ }
375
+ }
376
+
377
+ // Form.Item无边距样式(传统模式)
378
+ .pro-group-form-item {
379
+ flex: 1;
380
+ // margin: 0 !important;
381
+ }
382
+
383
+ // 当有自定义宽度时,只有设置了宽度的 Form.Item 不使用 flex:1
384
+ &.pro-group-diy-width {
385
+ // 覆盖 Space.Compact 内设置了宽度的 Form.Item
386
+ .@{ant-prefix}-space-compact {
387
+ .@{ant-prefix}-form-item.pro-group-form-item-has-width {
388
+ flex: none;
389
+ }
390
+ }
391
+
392
+ // 覆盖 compact 容器内设置了宽度的 Form.Item
393
+ .pro-group-compact-container {
394
+ .@{ant-prefix}-form-item.pro-group-form-item-has-width {
395
+ flex: none;
396
+ }
397
+ }
398
+
399
+ // 覆盖直接使用 pro-group-form-item 类且设置了宽度的 Form.Item
400
+ .pro-group-form-item.pro-group-form-item-has-width {
401
+ flex: none;
402
+ }
403
+ }
404
+ }
73
405
  }
406
+
407
+
408
+ .@{ant-prefix}-form-item-has-error{
409
+ &:not(.pro-group-flexible) {
410
+ // 错误状态:确保边框变红(优先级要高于上面的 border-left-width: 0)
411
+ .@{ant-prefix}-input,
412
+ .@{ant-prefix}-select .@{ant-prefix}-select-selector,
413
+ .@{ant-prefix}-input-number,
414
+ .@{ant-prefix}-input-number-input {
415
+ border-color: #ff4d4f !important;
416
+ }
417
+
418
+ // 错误状态下,中间元素也需要恢复左边框并设置为红色
419
+ &:not(:first-child) {
420
+ .@{ant-prefix}-input,
421
+ .@{ant-prefix}-select .@{ant-prefix}-select-selector,
422
+ .@{ant-prefix}-input-number {
423
+ border-left-color: #ff4d4f !important;
424
+ border-left-width: 1px !important;
425
+ }
426
+
427
+ .@{ant-prefix}-input-number-input {
428
+ border-left: 1px solid #ff4d4f !important;
429
+ }
430
+ }
431
+
432
+ // 聚焦时保持红色边框
433
+ .@{ant-prefix}-input:focus,
434
+ .@{ant-prefix}-select:focus .@{ant-prefix}-select-selector,
435
+ .@{ant-prefix}-input-number:focus,
436
+ .@{ant-prefix}-input-number:focus .@{ant-prefix}-input-number-input {
437
+ border-color: #ff4d4f !important;
438
+ }
439
+
440
+ // Select 组件的错误状态处理
441
+ .@{ant-prefix}-select.@{ant-prefix}-select-status-error .@{ant-prefix}-select-selector {
442
+ border-color: #ff4d4f !important;
443
+ }
444
+ }
445
+ }
446
+
447
+ // compact模式容器, 修复antd6定制模式下,Group组件内嵌套Form.Item时,表单样式问题
448
+ .pro-group-compact-container {
449
+ .@{ant-prefix}-select {
450
+ border-radius: 0;
451
+ border-radius: 0;
452
+ }
453
+
454
+ > .pro-group-form-item:not(:first-child) {
455
+ .@{ant-prefix}-input,
456
+ .@{ant-prefix}-select,
457
+ .@{ant-prefix}-input-number {
458
+ margin-left: -1px;
459
+ }
460
+ }
461
+ .pro-group-separator-compact{
462
+ margin-left: -1px;
463
+ }
464
+
465
+
466
+ /* 1. 处理第一个子元素:左上、左下圆角 */
467
+ > .pro-group-form-item:first-child{
468
+ .pro-select .@{ant-prefix}-select,
469
+ .@{ant-prefix}-select,
470
+ .@{ant-prefix}-input-number {
471
+ border-top-left-radius: 8px;
472
+ border-bottom-left-radius: 8px;
473
+ }
474
+ }
475
+
476
+ /* 2. 处理最后一个子元素:右上、右下圆角 */
477
+ > .pro-group-form-item:last-child {
478
+ .pro-select .@{ant-prefix}-select,
479
+ .@{ant-prefix}-select,
480
+ .@{ant-prefix}-input-number {
481
+ border-top-right-radius: 8px;
482
+ border-bottom-right-radius: 8px;
483
+ }
484
+ }
485
+ }
486
+ .@{ant-prefix}-form-item-has-error {
487
+ .pro-group-compact-container{
488
+ .@{ant-prefix}-select {
489
+ border-color: var(--zaui-danger);
490
+ }
491
+ }
492
+
493
+ }
494
+ // compact模式容器 结束
495
+