@zat-design/sisyphus-react 3.0.13 → 3.0.16-beta.2

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 (334) hide show
  1. package/dist/index.esm.css +2726 -1876
  2. package/es/ProDownload/DownloadHelper.js +2 -0
  3. package/es/ProDrawerForm/components/ProDrawer/index.js +5 -3
  4. package/es/ProDrawerForm/components/ProModal/index.js +15 -5
  5. package/es/ProDrawerForm/index.js +1 -1
  6. package/es/ProDrawerForm/propsType.d.ts +4 -0
  7. package/es/ProDrawerForm/style/index.less +88 -55
  8. package/es/ProEditLabel/components/RenderProForm.d.ts +4 -0
  9. package/es/ProEditLabel/components/RenderProForm.js +70 -0
  10. package/es/ProEditLabel/index.js +104 -141
  11. package/es/ProEditLabel/propsType.d.ts +7 -4
  12. package/es/ProEditLabel/style/index.less +33 -2
  13. package/es/ProEditLabel/utils/index.d.ts +5 -7
  14. package/es/ProEditLabel/utils/index.js +11 -27
  15. package/es/ProEditTable/components/ActionButton/index.d.ts +2 -1
  16. package/es/ProEditTable/components/ActionButton/index.js +20 -4
  17. package/es/ProEditTable/components/RenderField/index.d.ts +2 -1
  18. package/es/ProEditTable/components/RenderField/index.js +1 -2
  19. package/es/ProEditTable/components/RenderToolbar/index.d.ts +2 -1
  20. package/es/ProEditTable/components/Summary/index.d.ts +2 -1
  21. package/es/ProEditTable/propsType.d.ts +5 -0
  22. package/es/ProEditTable/style/index.less +16 -13
  23. package/es/ProEditTable/utils/config.d.ts +2 -1
  24. package/es/ProEditTable/utils/config.js +25 -14
  25. package/es/ProEditTable/utils/index.js +5 -3
  26. package/es/ProEnum/getEnumLabel.d.ts +2 -1
  27. package/es/ProEnum/index.d.ts +3 -2
  28. package/es/ProEnum/useEnumRequest.js +6 -11
  29. package/es/ProForm/components/base/DatePicker/index.js +1 -1
  30. package/es/ProForm/components/base/FormList/components/ActionButton.js +4 -5
  31. package/es/ProForm/components/base/FormList/index.d.ts +1 -0
  32. package/es/ProForm/components/base/FormList/index.js +10 -5
  33. package/es/ProForm/components/base/FormList/style/index.less +3 -0
  34. package/es/ProForm/components/base/Input/index.d.ts +2 -1
  35. package/es/ProForm/components/base/InputNumber/index.js +24 -0
  36. package/es/ProForm/components/base/RangePicker/index.js +2 -2
  37. package/es/ProForm/components/combination/ProAddressBar/index.d.ts +1 -1
  38. package/es/ProForm/components/combination/ProAddressBar/index.js +2 -1
  39. package/es/ProForm/components/combination/ProCombination/index.js +3 -3
  40. package/es/ProForm/components/combination/ProModalSelect/index.d.ts +1 -1
  41. package/es/ProForm/components/combination/ProModalSelect/index.js +3 -2
  42. package/es/ProForm/components/combination/ProModalSelect/propsType.d.ts +7 -6
  43. package/es/ProForm/components/combination/ProModalSelect/style/index.less +45 -36
  44. package/es/ProForm/components/combination/ProRangeLimit/index.js +13 -15
  45. package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +1 -1
  46. package/es/ProForm/components/index.d.ts +2 -0
  47. package/es/ProForm/components/index.js +2 -0
  48. package/es/ProForm/components/old/CertNo/index.d.ts +2 -1
  49. package/es/ProForm/components/old/InputRange/index.d.ts +2 -1
  50. package/es/ProForm/components/old/InputWithSuffix/index.d.ts +2 -1
  51. package/es/ProForm/components/old/ProAddress/index.d.ts +2 -1
  52. package/es/ProForm/components/old/ProCertValidity/index.js +1 -1
  53. package/es/ProForm/components/old/ProRangeBox/index.d.ts +2 -1
  54. package/es/ProForm/components/render/Render.js +6 -22
  55. package/es/ProForm/components/render/propsType.d.ts +4 -0
  56. package/es/ProForm/index.js +3 -1
  57. package/es/ProForm/style/index.less +12 -5
  58. package/es/ProForm/utils/index.d.ts +5 -2
  59. package/es/ProForm/utils/index.js +7 -12
  60. package/es/ProForm/utils/transformValue.js +4 -2
  61. package/es/ProForm/utils/useShouldUpdate.js +1 -0
  62. package/es/ProForm/utils/valueType.d.ts +4 -4
  63. package/es/ProIcon/index.d.ts +1 -0
  64. package/es/ProIcon/index.js +35 -5
  65. package/es/ProIcon/propsTypes.d.ts +9 -9
  66. package/es/ProIcon/symbolIcon.js +43 -0
  67. package/es/ProLayout/components/Layout/Header/style/index.less +1 -2
  68. package/es/ProLayout/components/Layout/Menu/OpenMenu/index.d.ts +2 -1
  69. package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +1 -1
  70. package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +3 -0
  71. package/es/ProLayout/components/ProCollapse/index.d.ts +2 -1
  72. package/es/ProLayout/components/ProCollapse/style/index.less +1 -0
  73. package/es/ProLayout/components/ProFooter/index.d.ts +1 -1
  74. package/es/ProLayout/components/ProHeader/components/Copy/index.d.ts +2 -1
  75. package/es/ProLayout/components/ProHeader/index.d.ts +1 -1
  76. package/es/ProLayout/components/ProHeader/index.js +2 -4
  77. package/es/ProLayout/components/ProHeader/style/index.less +3 -3
  78. package/es/ProLayout/index.d.ts +4 -4
  79. package/es/ProLayout/index.js +5 -6
  80. package/es/ProLayout/propTypes.d.ts +2 -5
  81. package/es/ProLayout/style/index.less +7 -1
  82. package/es/ProSelect/index.d.ts +1 -1
  83. package/es/ProSelect/index.js +1 -1
  84. package/es/ProSelect/propsType.d.ts +7 -0
  85. package/es/ProStep/components/Anchor/index.d.ts +2 -1
  86. package/es/ProStep/components/Item/index.d.ts +2 -1
  87. package/es/ProStep/components/Step/index.d.ts +2 -1
  88. package/es/ProStep/components/Step/index.js +12 -10
  89. package/es/ProStep/index.d.ts +2 -2
  90. package/es/ProStep/style/index.less +1 -1
  91. package/es/ProTable/components/ResizableLine/index.d.ts +2 -1
  92. package/es/ProTable/components/TableResizable/index.d.ts +2 -1
  93. package/es/ProTable/index.d.ts +1 -1
  94. package/es/ProTable/index.js +1 -1
  95. package/es/ProTable/propsType.d.ts +3 -2
  96. package/es/ProTable/style/index.less +12 -17
  97. package/es/ProTable/useAntdTable.d.ts +4 -4
  98. package/es/ProTable/useAntdTable.js +54 -34
  99. package/es/ProTable/utils.js +24 -5
  100. package/es/ProTabs/components/Card/index.d.ts +4 -0
  101. package/es/ProTabs/components/Card/index.js +24 -0
  102. package/es/ProTabs/components/index.d.ts +1 -0
  103. package/es/ProTabs/components/index.js +1 -0
  104. package/es/ProTabs/index.d.ts +4 -0
  105. package/es/ProTabs/index.js +98 -0
  106. package/es/ProTabs/propType.d.ts +31 -0
  107. package/es/ProTabs/propType.js +1 -0
  108. package/es/ProTabs/style/index.less +68 -0
  109. package/es/ProThemeTools/component/PrdTools/index.d.ts +4 -0
  110. package/es/ProThemeTools/component/PrdTools/index.js +200 -0
  111. package/es/ProThemeTools/component/PrdTools/style/index.less +164 -0
  112. package/es/ProThemeTools/component/index.d.ts +2 -0
  113. package/es/ProThemeTools/component/index.js +2 -0
  114. package/es/ProThemeTools/index.d.ts +14 -0
  115. package/es/ProThemeTools/index.js +179 -0
  116. package/es/ProThemeTools/propsType.d.ts +30 -0
  117. package/es/ProThemeTools/propsType.js +1 -0
  118. package/es/ProThemeTools/style/index.less +55 -0
  119. package/es/ProThemeTools/utils/index.d.ts +14 -0
  120. package/es/ProThemeTools/utils/index.js +54 -0
  121. package/es/ProTooltip/index.d.ts +2 -1
  122. package/es/ProTransferModal/components/SortableItem/index.js +2 -2
  123. package/es/ProTransferModal/style/index.less +9 -1
  124. package/es/ProTreeModal/components/CloseIcon.d.ts +3 -0
  125. package/es/ProTreeModal/components/CloseIcon.js +25 -0
  126. package/es/ProTreeModal/components/List.d.ts +13 -0
  127. package/es/ProTreeModal/components/List.js +52 -0
  128. package/es/ProTreeModal/components/SearchTitle.d.ts +7 -0
  129. package/es/ProTreeModal/components/SearchTitle.js +14 -0
  130. package/es/ProTreeModal/components/Tree.d.ts +15 -0
  131. package/es/ProTreeModal/components/Tree.js +149 -0
  132. package/es/ProTreeModal/components/Trigger.d.ts +10 -0
  133. package/es/ProTreeModal/components/Trigger.js +32 -0
  134. package/es/ProTreeModal/components/index.d.ts +5 -0
  135. package/es/ProTreeModal/components/index.js +5 -0
  136. package/es/ProTreeModal/data/datasource.d.ts +5 -0
  137. package/es/ProTreeModal/data/datasource.js +17 -0
  138. package/es/ProTreeModal/data/mock.d.ts +9 -0
  139. package/es/ProTreeModal/data/mock.js +39 -0
  140. package/es/ProTreeModal/index.d.ts +5 -0
  141. package/es/ProTreeModal/index.js +333 -0
  142. package/es/ProTreeModal/propsType.d.ts +26 -0
  143. package/es/ProTreeModal/propsType.js +1 -0
  144. package/es/ProTreeModal/style/index.less +105 -0
  145. package/es/ProTreeModal/utils.d.ts +26 -0
  146. package/es/ProTreeModal/utils.js +136 -0
  147. package/es/ProTreeSelect/index.d.ts +5 -0
  148. package/es/ProTreeSelect/index.js +404 -0
  149. package/es/ProTreeSelect/propsType.d.ts +95 -0
  150. package/es/ProTreeSelect/propsType.js +1 -0
  151. package/es/ProTreeSelect/style/index.less +109 -0
  152. package/es/ProUpload/index.d.ts +0 -1
  153. package/es/ProUpload/index.js +8 -2
  154. package/es/ProUpload/style/fileItem.less +3 -1
  155. package/es/ProUpload/style/index.less +8 -1
  156. package/es/ProWaterMark/index.js +1 -1
  157. package/es/assets/close.svg +1 -0
  158. package/es/index.d.ts +3 -0
  159. package/es/index.js +4 -8
  160. package/es/old/ProCertValidity/index.js +1 -1
  161. package/es/style/components.less +25 -9
  162. package/es/style/theme/antd.less +60 -29
  163. package/es/style/theme/index.less +154 -176
  164. package/es/tokens.js +85 -0
  165. package/lib/ProDrawerForm/components/ProDrawer/index.js +5 -3
  166. package/lib/ProDrawerForm/components/ProModal/index.js +13 -5
  167. package/lib/ProDrawerForm/index.js +1 -1
  168. package/lib/ProDrawerForm/propsType.d.ts +4 -0
  169. package/lib/ProDrawerForm/style/index.less +88 -55
  170. package/lib/ProEditLabel/components/RenderProForm.d.ts +4 -0
  171. package/lib/ProEditLabel/components/RenderProForm.js +78 -0
  172. package/lib/ProEditLabel/index.js +102 -137
  173. package/lib/ProEditLabel/propsType.d.ts +7 -4
  174. package/lib/ProEditLabel/style/index.less +33 -2
  175. package/lib/ProEditLabel/utils/index.d.ts +5 -7
  176. package/lib/ProEditLabel/utils/index.js +14 -31
  177. package/lib/ProEditTable/components/ActionButton/index.d.ts +2 -1
  178. package/lib/ProEditTable/components/ActionButton/index.js +20 -4
  179. package/lib/ProEditTable/components/RenderField/index.d.ts +2 -1
  180. package/lib/ProEditTable/components/RenderField/index.js +3 -2
  181. package/lib/ProEditTable/components/RenderToolbar/index.d.ts +2 -1
  182. package/lib/ProEditTable/components/Summary/index.d.ts +2 -1
  183. package/lib/ProEditTable/propsType.d.ts +5 -0
  184. package/lib/ProEditTable/style/index.less +16 -13
  185. package/lib/ProEditTable/utils/config.d.ts +2 -1
  186. package/lib/ProEditTable/utils/config.js +24 -13
  187. package/lib/ProEditTable/utils/index.js +5 -3
  188. package/lib/ProEnum/getEnumLabel.d.ts +2 -1
  189. package/lib/ProEnum/index.d.ts +3 -2
  190. package/lib/ProEnum/useEnumRequest.js +6 -11
  191. package/lib/ProForm/components/base/DatePicker/index.js +1 -1
  192. package/lib/ProForm/components/base/FormList/components/ActionButton.js +4 -5
  193. package/lib/ProForm/components/base/FormList/index.d.ts +1 -0
  194. package/lib/ProForm/components/base/FormList/index.js +10 -5
  195. package/lib/ProForm/components/base/FormList/style/index.less +3 -0
  196. package/lib/ProForm/components/base/Input/index.d.ts +2 -1
  197. package/lib/ProForm/components/base/InputNumber/index.js +24 -0
  198. package/lib/ProForm/components/base/RangePicker/index.js +2 -2
  199. package/lib/ProForm/components/combination/ProAddressBar/index.d.ts +1 -1
  200. package/lib/ProForm/components/combination/ProAddressBar/index.js +2 -1
  201. package/lib/ProForm/components/combination/ProCombination/index.js +3 -3
  202. package/lib/ProForm/components/combination/ProModalSelect/index.d.ts +1 -1
  203. package/lib/ProForm/components/combination/ProModalSelect/index.js +3 -2
  204. package/lib/ProForm/components/combination/ProModalSelect/propsType.d.ts +7 -6
  205. package/lib/ProForm/components/combination/ProModalSelect/style/index.less +45 -36
  206. package/lib/ProForm/components/combination/ProRangeLimit/index.js +13 -15
  207. package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +1 -1
  208. package/lib/ProForm/components/index.d.ts +2 -0
  209. package/lib/ProForm/components/index.js +14 -0
  210. package/lib/ProForm/components/old/CertNo/index.d.ts +2 -1
  211. package/lib/ProForm/components/old/InputRange/index.d.ts +2 -1
  212. package/lib/ProForm/components/old/InputWithSuffix/index.d.ts +2 -1
  213. package/lib/ProForm/components/old/ProAddress/index.d.ts +2 -1
  214. package/lib/ProForm/components/old/ProCertValidity/index.js +1 -1
  215. package/lib/ProForm/components/old/ProRangeBox/index.d.ts +2 -1
  216. package/lib/ProForm/components/render/Render.js +4 -20
  217. package/lib/ProForm/components/render/propsType.d.ts +4 -0
  218. package/lib/ProForm/index.js +2 -0
  219. package/lib/ProForm/style/index.less +12 -5
  220. package/lib/ProForm/utils/index.d.ts +5 -2
  221. package/lib/ProForm/utils/index.js +10 -14
  222. package/lib/ProForm/utils/transformValue.js +4 -2
  223. package/lib/ProForm/utils/useShouldUpdate.js +1 -0
  224. package/lib/ProForm/utils/valueType.d.ts +4 -4
  225. package/lib/ProIcon/index.d.ts +1 -0
  226. package/lib/ProIcon/index.js +36 -5
  227. package/lib/ProIcon/propsTypes.d.ts +9 -9
  228. package/lib/ProIcon/symbolIcon.js +45 -0
  229. package/lib/ProLayout/components/Layout/Header/style/index.less +1 -2
  230. package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.d.ts +2 -1
  231. package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +1 -1
  232. package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +3 -0
  233. package/lib/ProLayout/components/ProCollapse/index.d.ts +2 -1
  234. package/lib/ProLayout/components/ProCollapse/style/index.less +1 -0
  235. package/lib/ProLayout/components/ProFooter/index.d.ts +1 -1
  236. package/lib/ProLayout/components/ProHeader/components/Copy/index.d.ts +2 -1
  237. package/lib/ProLayout/components/ProHeader/index.d.ts +1 -1
  238. package/lib/ProLayout/components/ProHeader/index.js +1 -4
  239. package/lib/ProLayout/components/ProHeader/style/index.less +3 -3
  240. package/lib/ProLayout/index.d.ts +4 -4
  241. package/lib/ProLayout/index.js +5 -6
  242. package/lib/ProLayout/propTypes.d.ts +2 -5
  243. package/lib/ProLayout/style/index.less +7 -1
  244. package/lib/ProSelect/index.d.ts +1 -1
  245. package/lib/ProSelect/index.js +1 -1
  246. package/lib/ProSelect/propsType.d.ts +7 -0
  247. package/lib/ProStep/components/Anchor/index.d.ts +2 -1
  248. package/lib/ProStep/components/Item/index.d.ts +2 -1
  249. package/lib/ProStep/components/Step/index.d.ts +2 -1
  250. package/lib/ProStep/components/Step/index.js +11 -9
  251. package/lib/ProStep/index.d.ts +2 -2
  252. package/lib/ProStep/style/index.less +1 -1
  253. package/lib/ProTable/components/ResizableLine/index.d.ts +2 -1
  254. package/lib/ProTable/components/TableResizable/index.d.ts +2 -1
  255. package/lib/ProTable/components/TableResizable/index.js +8 -0
  256. package/lib/ProTable/index.d.ts +1 -1
  257. package/lib/ProTable/index.js +1 -1
  258. package/lib/ProTable/propsType.d.ts +3 -2
  259. package/lib/ProTable/style/index.less +12 -17
  260. package/lib/ProTable/useAntdTable.d.ts +4 -4
  261. package/lib/ProTable/useAntdTable.js +53 -33
  262. package/lib/ProTable/utils.js +24 -5
  263. package/lib/ProTabs/components/Card/index.d.ts +4 -0
  264. package/lib/ProTabs/components/Card/index.js +31 -0
  265. package/lib/ProTabs/components/index.d.ts +1 -0
  266. package/lib/ProTabs/components/index.js +13 -0
  267. package/lib/ProTabs/index.d.ts +4 -0
  268. package/lib/ProTabs/index.js +106 -0
  269. package/lib/ProTabs/propType.d.ts +31 -0
  270. package/lib/ProTabs/propType.js +5 -0
  271. package/lib/ProTabs/style/index.less +68 -0
  272. package/lib/ProThemeTools/component/PrdTools/index.d.ts +4 -0
  273. package/lib/ProThemeTools/component/PrdTools/index.js +202 -0
  274. package/lib/ProThemeTools/component/PrdTools/style/index.less +164 -0
  275. package/lib/ProThemeTools/component/index.d.ts +2 -0
  276. package/lib/ProThemeTools/component/index.js +13 -0
  277. package/lib/ProThemeTools/index.d.ts +14 -0
  278. package/lib/ProThemeTools/index.js +185 -0
  279. package/lib/ProThemeTools/propsType.d.ts +30 -0
  280. package/lib/ProThemeTools/propsType.js +5 -0
  281. package/lib/ProThemeTools/style/index.less +55 -0
  282. package/lib/ProThemeTools/utils/index.d.ts +14 -0
  283. package/lib/ProThemeTools/utils/index.js +63 -0
  284. package/lib/ProTooltip/index.d.ts +2 -1
  285. package/lib/ProTransferModal/components/SortableItem/index.js +2 -2
  286. package/lib/ProTransferModal/style/index.less +9 -1
  287. package/lib/ProTreeModal/components/CloseIcon.d.ts +3 -0
  288. package/lib/ProTreeModal/components/CloseIcon.js +33 -0
  289. package/lib/ProTreeModal/components/List.d.ts +13 -0
  290. package/lib/ProTreeModal/components/List.js +59 -0
  291. package/lib/ProTreeModal/components/SearchTitle.d.ts +7 -0
  292. package/lib/ProTreeModal/components/SearchTitle.js +22 -0
  293. package/lib/ProTreeModal/components/Tree.d.ts +15 -0
  294. package/lib/ProTreeModal/components/Tree.js +157 -0
  295. package/lib/ProTreeModal/components/Trigger.d.ts +10 -0
  296. package/lib/ProTreeModal/components/Trigger.js +39 -0
  297. package/lib/ProTreeModal/components/index.d.ts +5 -0
  298. package/lib/ProTreeModal/components/index.js +41 -0
  299. package/lib/ProTreeModal/data/datasource.d.ts +5 -0
  300. package/lib/ProTreeModal/data/datasource.js +24 -0
  301. package/lib/ProTreeModal/data/mock.d.ts +9 -0
  302. package/lib/ProTreeModal/data/mock.js +47 -0
  303. package/lib/ProTreeModal/index.d.ts +5 -0
  304. package/lib/ProTreeModal/index.js +340 -0
  305. package/lib/ProTreeModal/propsType.d.ts +26 -0
  306. package/lib/ProTreeModal/propsType.js +5 -0
  307. package/lib/ProTreeModal/style/index.less +105 -0
  308. package/lib/ProTreeModal/utils.d.ts +26 -0
  309. package/lib/ProTreeModal/utils.js +148 -0
  310. package/lib/ProTreeSelect/index.d.ts +5 -0
  311. package/lib/ProTreeSelect/index.js +411 -0
  312. package/lib/ProTreeSelect/propsType.d.ts +95 -0
  313. package/lib/ProTreeSelect/propsType.js +5 -0
  314. package/lib/ProTreeSelect/style/index.less +109 -0
  315. package/lib/ProUpload/index.d.ts +0 -1
  316. package/lib/ProUpload/index.js +8 -2
  317. package/lib/ProUpload/style/fileItem.less +3 -1
  318. package/lib/ProUpload/style/index.less +8 -1
  319. package/lib/ProWaterMark/index.js +1 -1
  320. package/lib/assets/close.svg +1 -0
  321. package/lib/index.d.ts +3 -0
  322. package/lib/index.js +28 -0
  323. package/lib/old/ProCertValidity/index.js +1 -1
  324. package/lib/style/components.less +25 -9
  325. package/lib/style/theme/antd.less +60 -29
  326. package/lib/style/theme/index.less +154 -176
  327. package/lib/tokens.js +87 -0
  328. package/package.json +7 -8
  329. package/typings.d.ts +4 -0
  330. package/es/ProEditLabel/components/RenderForm.d.ts +0 -3
  331. package/es/ProEditLabel/components/RenderForm.js +0 -65
  332. package/lib/ProEditLabel/components/RenderForm.d.ts +0 -3
  333. package/lib/ProEditLabel/components/RenderForm.js +0 -75
  334. package/source-code/package.json +0 -16
@@ -1,6 +1,8 @@
1
1
  import { InputProps } from 'antd/lib/input';
2
2
  import { PopconfirmProps } from 'antd/lib/popconfirm';
3
+ import { FormInstance } from 'antd/lib/form';
3
4
  import React from 'react';
5
+ import { ProColumnProps } from '../index';
4
6
  export interface ContainerProps {
5
7
  trigger?: 'click' | 'hover';
6
8
  size?: 'small' | 'middle' | 'large';
@@ -19,6 +21,7 @@ export interface PopupProps {
19
21
  trim?: boolean;
20
22
  labelWidth?: string | number;
21
23
  fieldProps?: any;
24
+ columns?: ProColumnProps;
22
25
  [key: string]: any;
23
26
  }
24
27
  export interface LabelProps extends InputProps {
@@ -34,10 +37,10 @@ export interface PopupConfirmProps extends Partial<PopconfirmProps> {
34
37
  viewEmpty?: '-';
35
38
  onConfirm?: (e?: any) => void;
36
39
  onFinish?: (e?: any) => void;
37
- tip?: string | React.ReactNode;
38
- dataSource?: any[];
39
- transform?: () => any[];
40
- title?: string | React.ReactNode;
40
+ onOpenChange?: (e?: any) => void;
41
+ trigger?: 'click' | 'hover';
42
+ value?: any;
43
+ form?: FormInstance;
41
44
  disabled?: boolean;
42
45
  [key: string]: any;
43
46
  }
@@ -1,9 +1,15 @@
1
1
  .pro-edit-label {
2
2
  display: inline-block;
3
3
 
4
+ .pro-form-view {
5
+ .ant-row {
6
+ display: block;
7
+ }
8
+ }
9
+
4
10
  .pro-form-view-container {
5
11
  word-break: break-all;
6
- display: inline-block;
12
+ display : inline-block;
7
13
  }
8
14
 
9
15
  &.trigger-hover {
@@ -50,8 +56,34 @@
50
56
  }
51
57
 
52
58
  .ant-popover {
59
+ .ant-btn-sm {
60
+ font-size : 12px;
61
+ min-width : 56px;
62
+ line-height: 1;
63
+
64
+ span {
65
+ letter-spacing: -1px;
66
+ }
67
+
68
+ }
69
+ }
70
+
71
+ .pro-edit-label-popconfirm {
53
72
  z-index: 1029 !important;
54
73
 
74
+ .ant-popover-message {
75
+ display: block;
76
+ }
77
+
78
+ .ant-popover-message-title {
79
+ padding-left: 0;
80
+ }
81
+
82
+ .ant-popover-content {
83
+ width : 360px;
84
+ max-width: 400px;
85
+ }
86
+
55
87
  .pro-edit-label-title {
56
88
  font-size : 16px;
57
89
  font-weight : 500;
@@ -60,7 +92,6 @@
60
92
  }
61
93
 
62
94
  .pro-edit-label-tip {
63
- max-width : 300px;
64
95
  margin-bottom: var(--zaui-space-size-md, 16px);
65
96
  color : #666;
66
97
 
@@ -1,9 +1,7 @@
1
1
  /**
2
- * Input TextArea 移除前后空格
3
- * @param type 组件类型
4
- * @param trim 是否移除前后空格
5
- * @returns {}
2
+ * 判断columns的length是否为1,给表单赋值,默认匹配到value上
3
+ * @param value 表单值
4
+ * @param columns 表单配置项
5
+ * @returns value
6
6
  */
7
- export declare const isTrim: (type: string, trim: boolean) => any;
8
- export declare const isNullValue: (value: any) => boolean;
9
- export declare const isNullArray: (value: any, length: any) => boolean;
7
+ export declare const matchFormValue: (value: any, columns: any) => any;
@@ -1,41 +1,24 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
- exports.isTrim = exports.isNullValue = exports.isNullArray = void 0;
7
+ exports.matchFormValue = void 0;
8
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
7
9
  /**
8
- * Input TextArea 移除前后空格
9
- * @param type 组件类型
10
- * @param trim 是否移除前后空格
11
- * @returns {}
10
+ * 判断columns的length是否为1,给表单赋值,默认匹配到value上
11
+ * @param value 表单值
12
+ * @param columns 表单配置项
13
+ * @returns value
12
14
  */
13
- var isTrim = function isTrim(type, trim) {
14
- var result = {};
15
- if (['Input', 'TextArea'].includes(type) && trim) {
16
- result.getValueFromEvent = function (event) {
17
- return event.target.value.trim();
18
- };
15
+ var matchFormValue = function matchFormValue(value, columns) {
16
+ if (!Array.isArray(columns)) {
17
+ return value;
19
18
  }
20
- return result;
21
- };
22
- // 判断一个字段值是否算空
23
- exports.isTrim = isTrim;
24
- var nullList = [undefined, 'null', '""', '[]'];
25
- var isNullValue = function isNullValue(value) {
26
- return nullList.includes(JSON.stringify(value));
27
- };
28
- // 判断数组是否算空
29
- exports.isNullValue = isNullValue;
30
- var isNullArray = function isNullArray(value, length) {
31
- if (Array.isArray(value)) {
32
- for (var i = 0; i < length; i++) {
33
- if (isNullValue(value[i])) {
34
- return true;
35
- }
36
- }
37
- return false;
19
+ if (columns.length === 1) {
20
+ return (0, _defineProperty2.default)({}, columns[0].name || columns[0].type, value);
38
21
  }
39
- return !value;
22
+ return value;
40
23
  };
41
- exports.isNullArray = isNullArray;
24
+ exports.matchFormValue = matchFormValue;
@@ -1,2 +1,3 @@
1
- declare const ActionButton: ({ record, index, config, btnConfig }: any) => JSX.Element;
1
+ import React from 'react';
2
+ declare const ActionButton: ({ record, index, config, btnConfig }: any) => React.JSX.Element;
2
3
  export default ActionButton;
@@ -48,21 +48,37 @@ var ActionButton = function ActionButton(_ref) {
48
48
  if ((0, _lodash.isFunction)(btnConfig.label)) {
49
49
  btnConfig.label = /*#__PURE__*/_react.default.createElement(btnConfig.label, null);
50
50
  }
51
- return isEditing && getShow(btnConfig.show) ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, ['delete', 'mulDelete'].includes(btnConfig.type) ? /*#__PURE__*/_react.default.createElement(_antd.Popconfirm, {
51
+ var isDisabled = !selectedRowKeys.length && btnConfig.type === 'mulDelete' || editingKeys.length || (delBtnProps === null || delBtnProps === void 0 ? void 0 : delBtnProps.disabled);
52
+ return isEditing && getShow(btnConfig.show) ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, ['delete', 'mulDelete'].includes(btnConfig.type) ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (btnConfig === null || btnConfig === void 0 ? void 0 : btnConfig.needConfirm) ? /*#__PURE__*/_react.default.createElement(_antd.Popconfirm, {
52
53
  placement: "topRight",
53
54
  title: deleteMsgMap[btnConfig.type],
54
55
  onConfirm: function onConfirm() {
55
56
  btnConfig.onClick(record, index);
56
57
  },
57
- disabled: !selectedRowKeys.length && btnConfig.type === 'mulDelete',
58
+ disabled: isDisabled,
58
59
  okText: "\u786E\u8BA4",
59
60
  cancelText: "\u53D6\u6D88"
60
61
  }, /*#__PURE__*/_react.default.isValidElement(btnConfig.label) ? /*#__PURE__*/_react.default.cloneElement(btnConfig.label, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(delBtnProps, ['buttonProps', 'isEditable'])), {}, {
61
62
  record: record,
62
- index: index
63
+ index: index,
64
+ disabled: isDisabled
63
65
  })) : /*#__PURE__*/_react.default.createElement(_antd.Button, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(delBtnProps, ['buttonProps', 'isEditable'])), {}, {
66
+ disabled: isDisabled,
64
67
  type: "link"
65
- }), btnConfig.label)) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.isValidElement(btnConfig.label) ? /*#__PURE__*/_react.default.cloneElement(btnConfig.label, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(actionBtnProps, ['buttonProps', 'isEditable'])), {}, {
68
+ }), btnConfig.label)) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.isValidElement(btnConfig.label) ? /*#__PURE__*/_react.default.cloneElement(btnConfig.label, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(delBtnProps, ['buttonProps', 'isEditable'])), {}, {
69
+ record: record,
70
+ index: index,
71
+ disabled: isDisabled,
72
+ onClick: function onClick() {
73
+ btnConfig.onClick(record, index);
74
+ }
75
+ })) : /*#__PURE__*/_react.default.createElement(_antd.Button, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(delBtnProps, ['buttonProps', 'isEditable'])), {}, {
76
+ disabled: isDisabled,
77
+ type: "link",
78
+ onClick: function onClick() {
79
+ btnConfig.onClick(record, index);
80
+ }
81
+ }), btnConfig.label))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.isValidElement(btnConfig.label) ? /*#__PURE__*/_react.default.cloneElement(btnConfig.label, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(actionBtnProps, ['buttonProps', 'isEditable'])), {}, {
66
82
  record: record,
67
83
  index: index
68
84
  })) : /*#__PURE__*/_react.default.createElement(_antd.Button, (0, _objectSpread2.default)((0, _objectSpread2.default)({
@@ -1,2 +1,3 @@
1
- declare const RenderField: ({ text: value, record, index, column, config }: any) => JSX.Element;
1
+ import React from 'react';
2
+ declare const RenderField: ({ text: value, record, index, column, config }: any) => React.JSX.Element;
2
3
  export default RenderField;
@@ -22,6 +22,8 @@ var componentMap = _interopRequireWildcard(require("../../../ProForm/components"
22
22
  var _Container = _interopRequireDefault(require("../../../ProForm/components/Container"));
23
23
  var _transformNames = _interopRequireDefault(require("../../../ProForm/utils/transformNames"));
24
24
  var _excluded = ["type", "valueType", "rules", "names", "fieldProps", "required", "labelRequired", "editRender", "component", "viewRender", "title", "originTitle", "label", "dataIndex", "formItemProps", "isEditable"];
25
+ /* eslint-disable prefer-destructuring */
26
+ /* eslint-disable prefer-const */
25
27
  var RenderField = function RenderField(_ref) {
26
28
  var _type, _type$replace, _names, _fieldProps$rules, _formItemChildProps$p, _TargetComponent4;
27
29
  var value = _ref.text,
@@ -213,7 +215,7 @@ var RenderField = function RenderField(_ref) {
213
215
  TargetComponent = viewRender;
214
216
  }
215
217
  }
216
- var defaultPlaceholder = ['Select', 'EnumSelect', 'DatePicker', 'RangerPicker', 'Cascader', 'ProSelect', 'ProEnum', 'ProTimeLimit'].includes(type) ? "\u8BF7\u9009\u62E9".concat((0, _lodash.isString)(label) ? label || title : '') : "\u8BF7\u8F93\u5165".concat((0, _lodash.isString)(label) ? label || title : '');
218
+ var defaultPlaceholder = ['Select', 'EnumSelect', 'DatePicker', 'RangePicker', 'Cascader', 'ProSelect', 'ProEnum', 'ProTimeLimit'].includes(type) ? "\u8BF7\u9009\u62E9".concat((0, _lodash.isString)(label) ? label || title : '') : "\u8BF7\u8F93\u5165".concat((0, _lodash.isString)(label) ? label || title : '');
217
219
  var _placeholder = (_formItemChildProps$p = formItemChildProps === null || formItemChildProps === void 0 ? void 0 : formItemChildProps.placeholder) !== null && _formItemChildProps$p !== void 0 ? _formItemChildProps$p : defaultPlaceholder;
218
220
  var _disabled = disabled || (formItemChildProps === null || formItemChildProps === void 0 ? void 0 : formItemChildProps.disabled);
219
221
  var _rules = isEditing ? _formItemProps === null || _formItemProps === void 0 ? void 0 : _formItemProps.rules : [];
@@ -446,7 +448,6 @@ var RenderField = function RenderField(_ref) {
446
448
  // 单元格编辑时,设置各个单元格disabled属性
447
449
  if (isCell) {
448
450
  record["$".concat(dataIndex, "Disabled")] = _disabled;
449
- form.setFieldValue([].concat((0, _toConsumableArray2.default)(namePath), [index, "$".concat(dataIndex, "Disabled")]), _disabled);
450
451
  }
451
452
  // if (isCell) {
452
453
  // _formItemProps.validateTrigger = 'onBlur';
@@ -1,2 +1,3 @@
1
- declare const RenderToolbar: (config: any) => JSX.Element;
1
+ import React from 'react';
2
+ declare const RenderToolbar: (config: any) => React.JSX.Element;
2
3
  export default RenderToolbar;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { SummaryColumnProps } from '../../propsType';
2
3
  interface SummaryProps<T = any> {
3
4
  data: T[];
@@ -8,5 +9,5 @@ interface SummaryProps<T = any> {
8
9
  };
9
10
  rowSelection: any;
10
11
  }
11
- declare const Summary: ({ data, summary, rowSelection, }: SummaryProps) => JSX.Element;
12
+ declare const Summary: ({ data, summary, rowSelection, }: SummaryProps) => React.JSX.Element;
12
13
  export default Summary;
@@ -38,6 +38,11 @@ export interface BaseActionProps<T> {
38
38
  * @default true
39
39
  */
40
40
  show?: boolean | ShowFunction<T>;
41
+ /**
42
+ * @description 删除是否开启二次确认
43
+ * @default true
44
+ */
45
+ needConfirm?: boolean;
41
46
  /**
42
47
  * @description 按钮是否禁止操作
43
48
  * @default -
@@ -38,12 +38,13 @@
38
38
  }
39
39
 
40
40
 
41
- .is-cell .ant-form-item .ant-form-item-row .ant-form-item-control .ant-form-item-control-input {
41
+ .is-cell .ant-form-item .ant-form-item-row .ant-form-item-control .ant-form-item-control-input {
42
42
  border: 1px solid transparent;
43
+
43
44
  &:hover {
44
- border: 1px solid #DEE0E3;
45
+ border : 1px solid #DEE0E3;
45
46
  border-radius: 4px;
46
- text-indent: 5px;
47
+ text-indent : 5px;
47
48
  }
48
49
  }
49
50
 
@@ -87,13 +88,15 @@
87
88
 
88
89
  .ant-table-content {
89
90
  >table {
90
-
91
- .ant-table-cell-fix-right-first::after,
92
- .ant-table-cell-fix-right-last::after {
93
- width : auto;
94
- transform : none;
95
- transition: none;
96
- box-shadow: none;
91
+ .ant-table-summary {
92
+ background-color: var(--zaui-table-header-bg, #f2f3f5);
93
+ color : #343434;
94
+ font-weight : 600;
95
+
96
+ .ant-table-cell-fix-left,
97
+ .ant-table-cell-fix-right {
98
+ background-color: var(--zaui-table-header-bg, #f2f3f5);
99
+ }
97
100
  }
98
101
 
99
102
  td {
@@ -149,7 +152,7 @@
149
152
  .ant-table-thead>tr>th {
150
153
  border : 0;
151
154
  white-space : nowrap;
152
- background-color: #F6F7F8;
155
+ background-color: var(--zaui-table-header-bg, #f2f3f5);
153
156
  }
154
157
 
155
158
  .ant-table-thead>tr>th:not(:last-child):not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan])::before {
@@ -173,7 +176,7 @@
173
176
  }
174
177
 
175
178
  .ant-table-tbody tr:nth-child(2n)>td {
176
- background-color: #f7f9fc;
179
+ background-color: var(--zaui-table-strip-bg, #FAFAFA);
177
180
  }
178
181
 
179
182
  .ant-table-tbody>.ant-table-placeholder>td {
@@ -207,7 +210,7 @@
207
210
  }
208
211
  }
209
212
 
210
- .ant-table-summary > tr > td {
213
+ .ant-table-summary>tr>td {
211
214
  border-bottom: none;
212
215
  }
213
216
  }
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  export declare const defaultBtnNameMap: {
2
3
  add: string;
3
4
  edit: string;
@@ -9,7 +10,7 @@ export declare const defaultBtnNameMap: {
9
10
  custom: string;
10
11
  };
11
12
  export declare const iconMap: {
12
- add: JSX.Element;
13
+ add: React.JSX.Element;
13
14
  };
14
15
  export declare const defaultSingleActionKeys: string[];
15
16
  export declare const defaultMultipleActionKeys: string[];
@@ -61,7 +61,11 @@ var actions = {
61
61
  // 开启编辑状态
62
62
  nextEditingKeys.push(record.rowKey);
63
63
  // 编辑时赋值编辑状态,供validator做保存校验
64
- record.isEditing = Boolean(nextEditingKeys.length);
64
+ if (nextEditingKeys === null || nextEditingKeys === void 0 ? void 0 : nextEditingKeys.length) {
65
+ record.isEditing = true;
66
+ } else {
67
+ delete record.isEditing;
68
+ }
65
69
  // 复制当前行数据
66
70
  form.setFieldValue(virtualRowName, record);
67
71
  setState({
@@ -83,7 +87,11 @@ var actions = {
83
87
  nextEditingKeys = editingKeys.filter(function (key) {
84
88
  return key !== record.rowKey;
85
89
  }); // 保存后取消编辑状态,供validator做保存校验
86
- record.isEditing = Boolean(nextEditingKeys.length);
90
+ if (nextEditingKeys === null || nextEditingKeys === void 0 ? void 0 : nextEditingKeys.length) {
91
+ record.isEditing = true;
92
+ } else {
93
+ delete record.isEditing;
94
+ }
87
95
  form.setFieldValue(rowName, record);
88
96
  setState({
89
97
  editingKeys: nextEditingKeys
@@ -111,7 +119,11 @@ var actions = {
111
119
  return key !== record.rowKey;
112
120
  });
113
121
  // 保存后取消编辑状态,供validator做保存校验
114
- record.isEditing = Boolean(nextEditingKeys.length);
122
+ if (nextEditingKeys === null || nextEditingKeys === void 0 ? void 0 : nextEditingKeys.length) {
123
+ record.isEditing = true;
124
+ } else {
125
+ delete record.isEditing;
126
+ }
115
127
  setState({
116
128
  editingKeys: nextEditingKeys
117
129
  }); // 关闭编辑状态
@@ -173,18 +185,17 @@ var actions = {
173
185
  _antd.message.warning(onlyOneLineMsg);
174
186
  return false;
175
187
  }
188
+ var rowKey = (0, _tools.getRandom)();
176
189
  // 添加新增对象数据
177
- var addData = (0, _typeof2.default)(result) === 'object' ? result : {};
178
- var rowKey = Math.random().toString(36).slice(-6);
179
- insertType === 'before' ? nextData.unshift((0, _objectSpread2.default)((0, _objectSpread2.default)({}, addData), {}, {
180
- addFlag: true,
181
- isEditing: true,
182
- rowKey: rowKey
183
- })) : nextData.push((0, _objectSpread2.default)((0, _objectSpread2.default)({}, addData), {}, {
184
- addFlag: true,
185
- isEditing: true,
190
+ var addData = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _typeof2.default)(result) === 'object' ? result : {}), {}, {
186
191
  rowKey: rowKey
187
- }));
192
+ });
193
+ // 单行编辑时,需要操作一下数据结构,判断是否第一次新增,以及是否是编辑状态
194
+ if (virtualKey) {
195
+ addData.addFlag = true;
196
+ addData.isEditing = true;
197
+ }
198
+ insertType === 'before' ? nextData.unshift(addData) : nextData.push(addData);
188
199
  form.setFieldValue(name, nextData);
189
200
  // 当单选情况下,存储正在编辑值
190
201
  if (virtualKey) {
@@ -22,7 +22,7 @@ var _tools = require("./tools");
22
22
  var _ProTooltip = _interopRequireDefault(require("../../ProTooltip"));
23
23
  var _components = require("../components");
24
24
  var _tip = _interopRequireDefault(require("../../assets/tip.svg"));
25
- var _excluded = ["type", "label", "show", "onHandle", "onClick"],
25
+ var _excluded = ["type", "label", "show", "needConfirm", "onHandle", "onClick"],
26
26
  _excluded2 = ["title", "icon"];
27
27
  // 渲染操作栏
28
28
  var getActionColumn = function getActionColumn(config) {
@@ -65,15 +65,17 @@ var getActionColumn = function getActionColumn(config) {
65
65
  var type = action.type,
66
66
  label = action.label,
67
67
  show = action.show,
68
+ needConfirm = action.needConfirm,
68
69
  onHandle = action.onHandle,
69
70
  onClick = action.onClick,
70
71
  buttonProps = (0, _objectWithoutProperties2.default)(action, _excluded);
71
72
  action.isEditable = _config.defaultEditingActionKeys.includes(type);
72
73
  action.label = label !== null && label !== void 0 ? label : _config.defaultBtnNameMap[type];
73
74
  action.show = show !== null && show !== void 0 ? show : true;
75
+ action.needConfirm = needConfirm !== null && needConfirm !== void 0 ? needConfirm : true;
74
76
  action.onClick = /*#__PURE__*/function () {
75
77
  var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(record, index) {
76
- var _yield$action$onHandl, _action$onHandle;
78
+ var _form$getFieldValue, _yield$action$onHandl, _action$onHandle;
77
79
  var rowName, _record, result;
78
80
  return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
79
81
  while (1) switch (_context.prev = _context.next) {
@@ -87,7 +89,7 @@ var getActionColumn = function getActionColumn(config) {
87
89
  return (0, _tools.customValidate)(validateKeys, form, rowName);
88
90
  case 4:
89
91
  // 编辑状态使用自定义form值,非编辑状态直接使用行数据
90
- _record = record.isEditing ? form.getFieldValue(rowName) : record; // 新增事件可以设置初始默认值,当做函数的出参导出
92
+ _record = (_form$getFieldValue = form.getFieldValue(rowName)) !== null && _form$getFieldValue !== void 0 ? _form$getFieldValue : record; // 新增事件可以设置初始默认值,当做函数的出参导出
91
93
  _context.next = 7;
92
94
  return action === null || action === void 0 ? void 0 : (_action$onHandle = action.onHandle) === null || _action$onHandle === void 0 ? void 0 : _action$onHandle.call(action, _record, index);
93
95
  case 7:
@@ -1,2 +1,3 @@
1
- declare const getEnumLabel: (enumCode: string, value: any, compose?: boolean, code?: string, label?: string) => JSX.Element;
1
+ import React from 'react';
2
+ declare const getEnumLabel: (enumCode: string, value: any, compose?: boolean, code?: string, label?: string) => React.JSX.Element;
2
3
  export default getEnumLabel;
@@ -1,8 +1,9 @@
1
+ import React from 'react';
1
2
  import useEnum from './useEnum';
2
3
  import { ProEnumProps } from './propsType';
3
4
  declare const ProEnum: {
4
- (props: ProEnumProps): JSX.Element;
5
- getEnumLabel: (enumCode: string, value: any, compose?: boolean, code?: string, label?: string) => JSX.Element;
5
+ (props: ProEnumProps): React.JSX.Element;
6
+ getEnumLabel: (enumCode: string, value: any, compose?: boolean, code?: string, label?: string) => React.JSX.Element;
6
7
  useEnum: typeof useEnum;
7
8
  };
8
9
  export default ProEnum;
@@ -47,7 +47,7 @@ var useEnum = function useEnum(props, dispatch) {
47
47
  }, useRequest === null || useRequest === void 0 ? void 0 : useRequest.options), {}, {
48
48
  setCache: function () {
49
49
  var _setCache = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(res) {
50
- var response, _useRequest$options, ignoreCodes, _i, _Object$keys, key, options;
50
+ var response, _useRequest$options, ignoreCodes, _i, _Object$keys, key, options, cacheData;
51
51
  return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
52
52
  while (1) switch (_context.prev = _context.next) {
53
53
  case 0:
@@ -85,15 +85,10 @@ var useEnum = function useEnum(props, dispatch) {
85
85
  }
86
86
  res.data = response;
87
87
  }
88
- // const cacheData = getEnumData(storage, cacheKey) || { data: {} };
89
- // // 缓存数据
90
- // setEnumData(storage, cacheKey, {
91
- // ...res,
92
- // data: {
93
- // ...res.data,
94
- // ...cacheData?.data,
95
- // },
96
- // });
88
+ cacheData = (0, _utils.getEnumData)(storage, cacheKey) || {
89
+ data: {}
90
+ }; // 合并缓存数据
91
+ res.data = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, cacheData === null || cacheData === void 0 ? void 0 : cacheData.data), res.data);
97
92
  (0, _utils.setEnumData)(storage, cacheKey, res);
98
93
  // 同步数据到全局
99
94
  dispatch({
@@ -101,7 +96,7 @@ var useEnum = function useEnum(props, dispatch) {
101
96
  payload: (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, dics), dataSource), res.data)
102
97
  });
103
98
  return _context.abrupt("return", res);
104
- case 14:
99
+ case 16:
105
100
  case "end":
106
101
  return _context.stop();
107
102
  }
@@ -19,7 +19,7 @@ var _excluded = ["className", "format", "otherProps"];
19
19
  var DatePicker = function DatePicker(props) {
20
20
  var className = props.className,
21
21
  _props$format = props.format,
22
- format = _props$format === void 0 ? 'YYYY-MM-DD HH:mm:ss' : _props$format,
22
+ format = _props$format === void 0 ? 'YYYY-MM-DD' : _props$format,
23
23
  otherProps = props.otherProps,
24
24
  rest = (0, _objectWithoutProperties2.default)(props, _excluded);
25
25
  var _ref = otherProps || {},
@@ -10,8 +10,8 @@ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/obje
10
10
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
11
  var _antd = require("antd");
12
12
  var _react = _interopRequireWildcard(require("react"));
13
- var _icons = _interopRequireWildcard(require("@ant-design/icons"));
14
- var _delete = require("../../../../../assets/delete.svg");
13
+ var _icons = require("@ant-design/icons");
14
+ var _ProIcon = _interopRequireDefault(require("../../../../../ProIcon"));
15
15
  var _excluded = ["label", "onClick", "onHandle", "actionType", "needConfirm", "title"],
16
16
  _excluded2 = ["onClick", "label"];
17
17
  var getDefaultActions = function getDefaultActions(mode) {
@@ -32,9 +32,8 @@ var getDefaultActions = function getDefaultActions(mode) {
32
32
  },
33
33
  type: 'text',
34
34
  label: '删除',
35
- // icon: <ReactSVG src={deleteIcon} />,
36
- icon: /*#__PURE__*/_react.default.createElement(_icons.default, {
37
- component: _delete.ReactComponent
35
+ icon: /*#__PURE__*/_react.default.createElement(_ProIcon.default, {
36
+ type: "delete"
38
37
  })
39
38
  },
40
39
  copy: {
@@ -31,6 +31,7 @@ export interface Props {
31
31
  mode?: FormListMode;
32
32
  level?: string;
33
33
  disabled?: boolean;
34
+ span?: number;
34
35
  meta: {
35
36
  errors: React.ReactNode[];
36
37
  warnings: React.ReactNode[];
@@ -26,12 +26,13 @@ var FormList = function FormList(props, ref) {
26
26
  operation = props.operation,
27
27
  _props$mode = props.mode,
28
28
  mode = _props$mode === void 0 ? 'line' : _props$mode,
29
- meta = props.meta;
29
+ meta = props.meta,
30
+ _props$span = props.span,
31
+ span = _props$span === void 0 ? 8 : _props$span;
30
32
  var form = otherProps.form,
31
33
  name = otherProps.name,
32
34
  isView = otherProps.isView,
33
- disabled = otherProps.disabled,
34
- colProps = otherProps.colProps;
35
+ disabled = otherProps.disabled;
35
36
  var errors = meta.errors;
36
37
  var _namePath = (0, _utils.toArray)(name);
37
38
  var processColumns = (0, _react.useCallback)(function (fieldName, namePath) {
@@ -68,7 +69,9 @@ var FormList = function FormList(props, ref) {
68
69
  namePath: namePath,
69
70
  index: index,
70
71
  field: field,
71
- colProps: colProps,
72
+ colProps: {
73
+ span: span
74
+ },
72
75
  form: form
73
76
  })) : /*#__PURE__*/_react.default.createElement(_LineFields.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({
74
77
  key: field.key
@@ -80,7 +83,9 @@ var FormList = function FormList(props, ref) {
80
83
  namePath: namePath,
81
84
  index: index,
82
85
  field: field,
83
- colProps: colProps,
86
+ colProps: {
87
+ span: span
88
+ },
84
89
  form: form
85
90
  }));
86
91
  }), /*#__PURE__*/_react.default.createElement(_antd.Form.ErrorList, {
@@ -33,4 +33,7 @@
33
33
  .ant-btn-link {
34
34
  padding: 4px 0;
35
35
  }
36
+ .ant-btn-text:hover {
37
+ background: transparent;
38
+ }
36
39
  }
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { IProps } from './propsType';
2
- declare const Input: (props: IProps) => JSX.Element;
3
+ declare const Input: (props: IProps) => React.JSX.Element;
3
4
  export default Input;