@zat-design/sisyphus-react 3.2.2 → 3.3.0-beta.10

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 (222) hide show
  1. package/README.md +7 -0
  2. package/dist/index.esm.css +89 -37
  3. package/es/ProAction/index.less +3 -0
  4. package/es/ProDownload/index.js +9 -6
  5. package/es/ProDownload/style/index.less +5 -2
  6. package/es/ProDrawerForm/index.js +1 -15
  7. package/es/ProDrawerForm/style/index.less +76 -73
  8. package/es/ProEditLabel/style/index.less +12 -9
  9. package/es/ProEditTable/components/RenderField/index.js +6 -4
  10. package/es/ProEditTable/index.js +37 -22
  11. package/es/ProEditTable/style/index.less +57 -47
  12. package/es/ProEditTable/utils/config.d.ts +1 -1
  13. package/es/ProEditTable/utils/config.js +3 -3
  14. package/es/ProEnum/index.js +7 -18
  15. package/es/ProEnum/propsType.d.ts +1 -0
  16. package/es/ProEnum/style/index.less +3 -0
  17. package/es/ProForm/components/base/DatePicker/index.d.ts +2 -2
  18. package/es/ProForm/components/base/DatePicker/index.js +5 -8
  19. package/es/ProForm/components/base/RangePicker/index.d.ts +3 -2
  20. package/es/ProForm/components/base/RangePicker/index.js +3 -5
  21. package/es/ProForm/components/base/SwitchCheckbox/style/index.less +3 -0
  22. package/es/ProForm/components/base/TextArea/index.less +4 -3
  23. package/es/ProForm/components/base/TimePicker/index.js +3 -3
  24. package/es/ProForm/components/base/TimePicker/style/index.less +4 -1
  25. package/es/ProForm/components/combination/Container/style/index.less +6 -3
  26. package/es/ProForm/components/combination/FormList/style/index.less +20 -24
  27. package/es/ProForm/components/combination/Group/style/index.less +18 -15
  28. package/es/ProForm/components/combination/ProAddressBar/style/index.less +6 -3
  29. package/es/ProForm/components/combination/ProCombination/style/index.less +5 -2
  30. package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +6 -1
  31. package/es/ProForm/components/combination/ProModalSelect/index.js +23 -25
  32. package/es/ProForm/components/combination/ProModalSelect/style/index.less +32 -11
  33. package/es/ProForm/components/combination/ProNumberRange/style/index.less +13 -10
  34. package/es/ProForm/components/combination/ProRangeLimit/index.d.ts +2 -2
  35. package/es/ProForm/components/combination/ProRangeLimit/index.js +6 -6
  36. package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.d.ts +2 -2
  37. package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +2 -2
  38. package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +2 -2
  39. package/es/ProForm/components/combination/ProTimeLimit/index.js +4 -4
  40. package/es/ProForm/components/combination/ProTimeLimit/style/index.less +9 -6
  41. package/es/ProForm/components/old/ProCertValidity/index.js +16 -16
  42. package/es/ProForm/components/old/ProCertValidity/propsType.d.ts +4 -4
  43. package/es/ProForm/components/render/Render.js +14 -23
  44. package/es/ProForm/components/render/RenderFields.js +10 -7
  45. package/es/ProForm/style/index.less +46 -44
  46. package/es/ProForm/utils/rulesCreator.js +2 -1
  47. package/es/ProForm/utils/useRules.js +6 -5
  48. package/es/ProIcon/style/index.less +4 -1
  49. package/es/ProLayout/components/Layout/Header/style/index.less +1 -1
  50. package/es/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +10 -7
  51. package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +31 -28
  52. package/es/ProLayout/components/Layout/Menu/SideMenu/style/index.less +14 -11
  53. package/es/ProLayout/components/Layout/Menu/style/index.less +2 -0
  54. package/es/ProLayout/components/Layout/Notice/style/index.less +3 -0
  55. package/es/ProLayout/components/ProCollapse/style/index.less +27 -24
  56. package/es/ProLayout/components/ProFooter/style/index.less +11 -7
  57. package/es/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +4 -1
  58. package/es/ProLayout/components/ProHeader/index.js +4 -4
  59. package/es/ProLayout/components/ProHeader/style/index.less +12 -11
  60. package/es/ProLayout/style/index.less +10 -7
  61. package/es/ProSelect/index.less +3 -0
  62. package/es/ProStep/index.js +2 -2
  63. package/es/ProStep/style/index.less +3 -0
  64. package/es/ProTable/index.js +15 -7
  65. package/es/ProTable/style/index.less +76 -54
  66. package/es/ProTable/utils.d.ts +1 -1
  67. package/es/ProTable/utils.js +52 -33
  68. package/es/ProTabs/style/index.less +25 -23
  69. package/es/ProThemeTools/component/PrdTools/index.d.ts +1 -1
  70. package/es/ProThemeTools/component/PrdTools/index.js +7 -6
  71. package/es/ProThemeTools/component/PrdTools/style/index.less +6 -6
  72. package/es/ProThemeTools/index.d.ts +1 -1
  73. package/es/ProThemeTools/index.js +7 -2
  74. package/es/ProThemeTools/propsType.d.ts +4 -0
  75. package/es/ProThemeTools/style/index.less +6 -3
  76. package/es/ProThemeTools/utils/index.d.ts +1 -1
  77. package/es/ProThemeTools/utils/index.js +2 -1
  78. package/es/ProTooltip/style/index.less +3 -0
  79. package/es/ProTree/components/CloseIcon.js +2 -4
  80. package/es/ProTree/components/ProTree.js +27 -11
  81. package/es/ProTree/components/Tree.js +1 -1
  82. package/es/ProTree/propsType.d.ts +2 -2
  83. package/es/ProTree/style/index.less +29 -26
  84. package/es/ProTree/utils.d.ts +6 -0
  85. package/es/ProTree/utils.js +11 -0
  86. package/es/ProTreeModal/components/CloseIcon.js +2 -4
  87. package/es/ProTreeModal/components/Trigger.d.ts +3 -0
  88. package/es/ProTreeModal/components/Trigger.js +79 -19
  89. package/es/ProTreeModal/index.js +38 -6
  90. package/es/ProTreeModal/propsType.d.ts +5 -2
  91. package/es/ProTreeModal/style/index.less +96 -92
  92. package/es/ProTreeSelect/index.js +6 -4
  93. package/es/ProTreeSelect/propsType.d.ts +2 -0
  94. package/es/ProTreeSelect/style/index.less +25 -22
  95. package/es/ProUpload/components/DragRender.js +7 -4
  96. package/es/ProUpload/components/ImageRender.js +8 -5
  97. package/es/ProUpload/index.js +11 -7
  98. package/es/ProUpload/style/index.less +13 -4
  99. package/es/ProViewer/index.js +3 -1
  100. package/es/ProViewer/style/index.less +6 -3
  101. package/es/locale/en_US.d.ts +4 -0
  102. package/es/locale/en_US.js +5 -1
  103. package/es/locale/index.js +2 -2
  104. package/es/locale/zh_CN.d.ts +4 -0
  105. package/es/locale/zh_CN.js +6 -2
  106. package/es/old/ProCertValidity/index.js +16 -16
  107. package/es/old/ProCertValidity/propsType.d.ts +4 -4
  108. package/es/old/ProEditableTable/utils.d.ts +5 -5
  109. package/es/old/ProEditableTable/utils.js +5 -5
  110. package/es/style/core/compatible.less +6 -6
  111. package/es/style/theme/antd.less +272 -253
  112. package/lib/ProAction/index.less +3 -0
  113. package/lib/ProDownload/index.js +9 -6
  114. package/lib/ProDownload/style/index.less +5 -2
  115. package/lib/ProDrawerForm/index.js +0 -14
  116. package/lib/ProDrawerForm/style/index.less +76 -73
  117. package/lib/ProEditLabel/style/index.less +12 -9
  118. package/lib/ProEditTable/components/RenderField/index.js +6 -4
  119. package/lib/ProEditTable/index.js +35 -20
  120. package/lib/ProEditTable/style/index.less +57 -47
  121. package/lib/ProEditTable/utils/config.d.ts +1 -1
  122. package/lib/ProEditTable/utils/config.js +3 -3
  123. package/lib/ProEnum/index.js +6 -17
  124. package/lib/ProEnum/propsType.d.ts +1 -0
  125. package/lib/ProEnum/style/index.less +3 -0
  126. package/lib/ProForm/components/base/DatePicker/index.d.ts +2 -2
  127. package/lib/ProForm/components/base/DatePicker/index.js +5 -8
  128. package/lib/ProForm/components/base/RangePicker/index.d.ts +3 -2
  129. package/lib/ProForm/components/base/RangePicker/index.js +4 -4
  130. package/lib/ProForm/components/base/SwitchCheckbox/style/index.less +3 -0
  131. package/lib/ProForm/components/base/TextArea/index.less +4 -3
  132. package/lib/ProForm/components/base/TimePicker/index.js +3 -3
  133. package/lib/ProForm/components/base/TimePicker/style/index.less +4 -1
  134. package/lib/ProForm/components/combination/Container/style/index.less +6 -3
  135. package/lib/ProForm/components/combination/FormList/style/index.less +20 -24
  136. package/lib/ProForm/components/combination/Group/style/index.less +18 -15
  137. package/lib/ProForm/components/combination/ProAddressBar/style/index.less +6 -3
  138. package/lib/ProForm/components/combination/ProCombination/style/index.less +5 -2
  139. package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +7 -1
  140. package/lib/ProForm/components/combination/ProModalSelect/index.js +23 -25
  141. package/lib/ProForm/components/combination/ProModalSelect/style/index.less +32 -11
  142. package/lib/ProForm/components/combination/ProNumberRange/style/index.less +13 -10
  143. package/lib/ProForm/components/combination/ProRangeLimit/index.d.ts +2 -2
  144. package/lib/ProForm/components/combination/ProRangeLimit/index.js +6 -6
  145. package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.d.ts +2 -2
  146. package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +2 -2
  147. package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +2 -2
  148. package/lib/ProForm/components/combination/ProTimeLimit/index.js +4 -4
  149. package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +9 -6
  150. package/lib/ProForm/components/old/ProCertValidity/index.js +16 -16
  151. package/lib/ProForm/components/old/ProCertValidity/propsType.d.ts +4 -4
  152. package/lib/ProForm/components/render/Render.js +14 -23
  153. package/lib/ProForm/components/render/RenderFields.js +9 -6
  154. package/lib/ProForm/style/index.less +46 -44
  155. package/lib/ProForm/utils/rulesCreator.js +2 -1
  156. package/lib/ProForm/utils/useRules.js +5 -4
  157. package/lib/ProIcon/style/index.less +4 -1
  158. package/lib/ProLayout/components/Layout/Header/style/index.less +1 -1
  159. package/lib/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +10 -7
  160. package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +31 -28
  161. package/lib/ProLayout/components/Layout/Menu/SideMenu/style/index.less +14 -11
  162. package/lib/ProLayout/components/Layout/Menu/style/index.less +2 -0
  163. package/lib/ProLayout/components/Layout/Notice/style/index.less +3 -0
  164. package/lib/ProLayout/components/ProCollapse/style/index.less +27 -24
  165. package/lib/ProLayout/components/ProFooter/style/index.less +11 -7
  166. package/lib/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +4 -1
  167. package/lib/ProLayout/components/ProHeader/index.js +4 -4
  168. package/lib/ProLayout/components/ProHeader/style/index.less +12 -11
  169. package/lib/ProLayout/style/index.less +10 -7
  170. package/lib/ProSelect/index.less +3 -0
  171. package/lib/ProStep/index.js +1 -1
  172. package/lib/ProStep/style/index.less +3 -0
  173. package/lib/ProTable/index.js +14 -6
  174. package/lib/ProTable/style/index.less +76 -54
  175. package/lib/ProTable/utils.d.ts +1 -1
  176. package/lib/ProTable/utils.js +52 -33
  177. package/lib/ProTabs/style/index.less +25 -23
  178. package/lib/ProThemeTools/component/PrdTools/index.d.ts +1 -1
  179. package/lib/ProThemeTools/component/PrdTools/index.js +7 -6
  180. package/lib/ProThemeTools/component/PrdTools/style/index.less +6 -6
  181. package/lib/ProThemeTools/index.d.ts +1 -1
  182. package/lib/ProThemeTools/index.js +7 -2
  183. package/lib/ProThemeTools/propsType.d.ts +4 -0
  184. package/lib/ProThemeTools/style/index.less +6 -3
  185. package/lib/ProThemeTools/utils/index.d.ts +1 -1
  186. package/lib/ProThemeTools/utils/index.js +2 -1
  187. package/lib/ProTooltip/style/index.less +3 -0
  188. package/lib/ProTree/components/CloseIcon.js +2 -4
  189. package/lib/ProTree/components/ProTree.js +26 -10
  190. package/lib/ProTree/components/Tree.js +1 -1
  191. package/lib/ProTree/propsType.d.ts +2 -2
  192. package/lib/ProTree/style/index.less +29 -26
  193. package/lib/ProTree/utils.d.ts +6 -0
  194. package/lib/ProTree/utils.js +12 -0
  195. package/lib/ProTreeModal/components/CloseIcon.js +2 -4
  196. package/lib/ProTreeModal/components/Trigger.d.ts +3 -0
  197. package/lib/ProTreeModal/components/Trigger.js +74 -18
  198. package/lib/ProTreeModal/index.js +38 -6
  199. package/lib/ProTreeModal/propsType.d.ts +5 -2
  200. package/lib/ProTreeModal/style/index.less +96 -92
  201. package/lib/ProTreeSelect/index.js +6 -4
  202. package/lib/ProTreeSelect/propsType.d.ts +2 -0
  203. package/lib/ProTreeSelect/style/index.less +25 -22
  204. package/lib/ProUpload/components/DragRender.js +7 -4
  205. package/lib/ProUpload/components/ImageRender.js +8 -5
  206. package/lib/ProUpload/index.js +11 -7
  207. package/lib/ProUpload/style/index.less +13 -4
  208. package/lib/ProViewer/index.js +4 -3
  209. package/lib/ProViewer/style/index.less +6 -3
  210. package/lib/locale/en_US.d.ts +4 -0
  211. package/lib/locale/en_US.js +5 -1
  212. package/lib/locale/index.js +2 -2
  213. package/lib/locale/zh_CN.d.ts +4 -0
  214. package/lib/locale/zh_CN.js +6 -2
  215. package/lib/old/ProCertValidity/index.js +16 -16
  216. package/lib/old/ProCertValidity/propsType.d.ts +4 -4
  217. package/lib/old/ProEditableTable/utils.d.ts +5 -5
  218. package/lib/old/ProEditableTable/utils.js +5 -5
  219. package/lib/style/core/compatible.less +6 -6
  220. package/lib/style/theme/antd.less +272 -253
  221. package/package.json +3 -2
  222. package/typings.d.ts +0 -6
@@ -1,82 +1,86 @@
1
+ @root-entry-name: 'default';
2
+ @import (reference) '~antd/es/style/themes/index.less';
3
+
1
4
  .pro-drawer {
2
5
  .pro-drawer-close {
3
- position : absolute;
4
- top : 6px;
5
- left : -34px;
6
- display : flex;
7
- align-items : center;
6
+ position: absolute;
7
+ top: 6px;
8
+ left: -34px;
9
+ display: flex;
10
+ align-items: center;
8
11
  justify-content: center;
9
- width : 32px;
10
- height : 38px;
11
- color : var(--zaui-global-bg, #fff);
12
- cursor : pointer;
12
+ width: 32px;
13
+ height: 38px;
14
+ color: var(--zaui-global-bg, #fff);
15
+ cursor: pointer;
13
16
 
14
17
  .close-icon {
15
- position : relative;
16
- left : 2px;
17
- z-index : 1;
18
+ position: relative;
19
+ left: 2px;
20
+ z-index: 1;
18
21
  font-size: var(--zaui-font-size-lg, 16px);
19
22
  transform: translateZ(100px);
20
- fill : var(--zaui-aide-text, #909090);
23
+ fill: var(--zaui-aide-text, #909090);
21
24
 
22
25
  &:hover {
23
- fill: var(--zaui-brand-active, #005AD9);
26
+ fill: var(--zaui-brand-active, #005ad9);
24
27
  }
25
28
 
26
- >div {
29
+ > div {
27
30
  height: 20px;
28
31
  }
29
32
  }
30
33
  }
31
34
 
32
35
  .pro-drawer-close::after {
33
- position : absolute;
34
- top : 0;
35
- right : 0;
36
- bottom : 0;
37
- left : 0;
36
+ position: absolute;
37
+ top: 0;
38
+ right: 0;
39
+ bottom: 0;
40
+ left: 0;
38
41
  background-color: var(--zaui-global-bg, #fff);
39
- border-radius : 4px 0px 0px 4px;
40
- transform : perspective(0.15em) rotateY(-2deg);
41
- content : '';
42
+ border-radius: 4px 0px 0px 4px;
43
+ transform: perspective(0.15em) rotateY(-2deg);
44
+ content: '';
42
45
  }
43
46
 
44
47
  .pro-drawer-title {
45
- position : absolute;
46
- top : 0;
47
- left : 0;
48
- width : 100%;
49
- height : 64px;
50
- padding : var(--zaui-space-size-md, 16px) var(--zaui-space-size-lg, 32px);
51
- color : var(--zaui-text, #343434);
52
- font-weight : 600;
53
- font-size : var(--zaui-font-size-xxl, 20px);
48
+ position: absolute;
49
+ top: 0;
50
+ left: 0;
51
+ width: 100%;
52
+ height: 64px;
53
+ padding: var(--zaui-space-size-md, 16px) var(--zaui-space-size-lg, 32px);
54
+ color: var(--zaui-text, #343434);
55
+ font-weight: 600;
56
+ font-size: var(--zaui-font-size-xxl, 20px);
54
57
  background-color: var(--zaui-global-bg, #fff);
55
58
  }
56
59
 
57
60
  .pro-drawer-scrolling {
58
- z-index : 1;
61
+ z-index: 1;
59
62
  box-shadow: -12px 14px 14px -18px var(--zaui-shadow, rgba(56, 56, 56, 0.15));
60
63
  }
61
64
 
62
65
  .pro-drawer-content {
63
- flex : 1;
64
- width : 100%;
65
- padding : var(--zaui-space-size-md, 16px) var(--zaui-space-size-lg, 32px);
66
+ flex: 1;
67
+ width: 100%;
68
+ padding: var(--zaui-space-size-md, 16px) var(--zaui-space-size-lg, 32px);
66
69
  padding-top: 0;
67
- overflow-x : hidden;
68
- overflow-y : auto;
70
+ overflow-x: hidden;
71
+ overflow-y: auto;
69
72
  }
70
73
 
71
74
  .pro-drawer-footer {
72
- position : absolute;
73
- bottom : 0;
74
- left : 0;
75
- z-index : 101;
76
- width : 100%;
77
- padding : var(--zaui-space-size-md, 16px) var(--zaui-space-size-lg, 32px);
75
+ position: absolute;
76
+ bottom: 0;
77
+ left: 0;
78
+ z-index: 101;
79
+ width: 100%;
80
+ padding: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1))
81
+ var(--zaui-space-size-lg, 32px);
78
82
  background-color: var(--zaui-global-bg, #fff);
79
- box-shadow : 8px 2px 8px 0 var(--zaui-shadow, rgba(56, 56, 56, 0.15));
83
+ box-shadow: 8px 2px 8px 0 var(--zaui-shadow, rgba(56, 56, 56, 0.15));
80
84
 
81
85
  button {
82
86
  margin-right: var(--zaui-space-size-sm, 8px);
@@ -87,24 +91,24 @@
87
91
  }
88
92
  }
89
93
 
90
- .ant-drawer-body {
91
- height : 100vh;
92
- padding : 0;
94
+ .@{ant-prefix}-drawer-body {
95
+ height: 100vh;
96
+ padding: 0;
93
97
  overflow-y: hidden;
94
98
  }
95
99
 
96
- .ant-drawer-content {
100
+ .@{ant-prefix}-drawer-content {
97
101
  position: static;
98
102
  }
99
103
 
100
- .ant-drawer-close {
104
+ .@{ant-prefix}-drawer-close {
101
105
  display: none;
102
106
  }
103
107
  }
104
108
 
105
109
  .pro-modal {
106
- .ant-modal-close {
107
- .ant-modal-close-x {
110
+ .@{ant-prefix}-modal-close {
111
+ .@{ant-prefix}-modal-close-x {
108
112
  .close-icon {
109
113
  fill: var(--zaui-aide-text, #909090);
110
114
 
@@ -115,40 +119,39 @@
115
119
  }
116
120
  }
117
121
 
118
- .ant-modal-header {
119
- padding : var(--zaui-space-size-md, 16px);
122
+ .@{ant-prefix}-modal-header {
123
+ padding: var(--zaui-space-size-md, 16px);
120
124
  border-bottom: none;
121
125
 
122
- .ant-modal-title {
126
+ .@{ant-prefix}-modal-title {
123
127
  font-weight: 600;
124
128
  }
125
129
  }
126
130
 
127
- .ant-modal-footer {
128
- padding : var(--zaui-space-size-md, 16px);
131
+ .@{ant-prefix}-modal-footer {
132
+ padding: var(--zaui-space-size-md, 16px);
129
133
  border-top: none;
130
134
 
131
135
  .pro-modal-footer {
132
- display : flex;
136
+ display: flex;
133
137
  justify-content: space-between;
134
138
  }
135
139
  }
136
140
 
137
- .ant-modal-content {
138
- .ant-modal-body {
139
- max-height : 450px;
140
- padding : 0 var(--zaui-space-size-md, 16px);
141
+ .@{ant-prefix}-modal-content {
142
+ .@{ant-prefix}-modal-body {
143
+ max-height: 450px;
144
+ padding: 0 var(--zaui-space-size-md, 16px);
141
145
  padding-top: 0;
142
- overflow : auto;
146
+ overflow: auto;
143
147
  }
144
148
  }
145
-
146
149
  }
147
150
 
148
151
  .pro-modal-no-footer {
149
- .ant-modal-content {
150
- .ant-modal-body {
151
- padding-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1))
152
+ .@{ant-prefix}-modal-content {
153
+ .@{ant-prefix}-modal-body {
154
+ padding-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
152
155
  }
153
156
  }
154
157
  }
@@ -156,17 +159,17 @@
156
159
  .pro-modal-scrolling {
157
160
  z-index: 1;
158
161
 
159
- .ant-modal-header {
162
+ .@{ant-prefix}-modal-header {
163
+ position: relative;
164
+ z-index: 1;
160
165
  box-shadow: -12px 14px 14px -18px var(--zaui-shadow, rgba(56, 56, 56, 0.15));
161
- position : relative;
162
- z-index : 1;
163
166
  }
164
167
  }
165
168
 
166
169
  .pro-modal-footer-shadow {
167
- .ant-modal-footer {
168
- position : relative;
169
- z-index : 1;
170
+ .@{ant-prefix}-modal-footer {
171
+ position: relative;
172
+ z-index: 1;
170
173
  box-shadow: 3px 2px 12px 0px var(--zaui-shadow, rgba(56, 56, 56, 0.15));
171
174
  }
172
175
  }
@@ -1,8 +1,11 @@
1
+ @root-entry-name: 'default';
2
+ @import (reference) '~antd/es/style/themes/index.less';
3
+
1
4
  .pro-edit-label {
2
5
  display: inline-block;
3
6
 
4
7
  .pro-form-view {
5
- .ant-row {
8
+ .@{ant-prefix}-row {
6
9
  display: block;
7
10
  }
8
11
  }
@@ -54,8 +57,8 @@
54
57
 
55
58
  }
56
59
 
57
- .ant-popover {
58
- .ant-btn-sm {
60
+ .@{ant-prefix}-popover {
61
+ .@{ant-prefix}-btn-sm {
59
62
  font-size : var(--zaui-font-size-sm, 12px);
60
63
  min-width : 56px;
61
64
  line-height: 1;
@@ -70,15 +73,15 @@
70
73
  .pro-edit-label-popconfirm {
71
74
  z-index: 1001 !important;
72
75
 
73
- .ant-popover-message {
76
+ .@{ant-prefix}-popover-message {
74
77
  display: block;
75
78
  }
76
79
 
77
- .ant-popover-message-title {
80
+ .@{ant-prefix}-popover-message-title {
78
81
  padding-left: 0;
79
82
  }
80
83
 
81
- .ant-popover-content {
84
+ .@{ant-prefix}-popover-content {
82
85
  width : 360px;
83
86
  max-width: 400px;
84
87
  }
@@ -109,13 +112,13 @@
109
112
  width: 100%;
110
113
 
111
114
  &.pro-form-no-label {
112
- .ant-form-item-label {
115
+ .@{ant-prefix}-form-item-label {
113
116
  display: none;
114
117
  }
115
118
  }
116
119
  }
117
120
 
118
- .ant-col-10 {
121
+ .@{ant-prefix}-col-10 {
119
122
  flex : 0 0 var(--zaui-form-label-width, 130px);
120
123
  text-align : var(--zaui-form-align, left);
121
124
  white-space : pre-wrap;
@@ -127,7 +130,7 @@
127
130
 
128
131
  }
129
132
 
130
- .ant-select {
133
+ .@{ant-prefix}-select {
131
134
  width: 100%;
132
135
  }
133
136
 
@@ -506,7 +506,7 @@ var RenderField = function RenderField(_ref) {
506
506
  delete _formItemProps.rules;
507
507
  }
508
508
  var _className = classNames((_classNames = {}, _defineProperty(_classNames, className, className), _defineProperty(_classNames, 'pro-form-item-changed', changed), _classNames));
509
- var originalTitle = _jsxs(_Space, {
509
+ var originalTitle = originalTip ? _jsxs(_Space, {
510
510
  children: ["\u521D\u59CB\u503C\uFF1A", /*#__PURE__*/React.isValidElement(TargetComponent) ? /*#__PURE__*/React.cloneElement(TargetComponent, _objectSpread(_objectSpread({}, omit(componentProps, ['onFieldChange'])), {}, {
511
511
  isView: true,
512
512
  value: originalValue,
@@ -516,14 +516,16 @@ var RenderField = function RenderField(_ref) {
516
516
  value: originalValue,
517
517
  checked: type === 'Switch' ? originalValue : undefined
518
518
  }))]
519
- });
520
- var FormItem = _jsx(_Form.Item, _objectSpread(_objectSpread({
519
+ }) : null;
520
+ var FormItem = TargetComponent ? _jsx(_Form.Item, _objectSpread(_objectSpread({
521
521
  validateFirst: true
522
522
  }, omit(_formItemProps, ['render', 'cache', 'key', 'width', 'hiddenNames', 'name'])), {}, {
523
523
  className: _className,
524
524
  name: cellName,
525
525
  children: /*#__PURE__*/React.isValidElement(TargetComponent) ? /*#__PURE__*/React.cloneElement(TargetComponent, _objectSpread({}, omit(componentProps, ['onFieldChange']))) : _jsx(TargetComponent, _objectSpread({}, omit(componentProps, ['onFieldChange'])))
526
- }));
526
+ })) : _jsx(Container, {
527
+ viewEmpty: viewEmpty
528
+ });
527
529
  return _jsx(FieldProvider, {
528
530
  value: componentProps === null || componentProps === void 0 ? void 0 : componentProps.otherProps,
529
531
  children: !originalTip || ['FormList', 'ProEditTable'].includes(type) ? FormItem : _jsx(_Tooltip, {
@@ -1,18 +1,18 @@
1
1
  import "antd/es/table/style";
2
2
  import _Table from "antd/es/table";
3
- import "antd/es/config-provider/style";
4
- import _ConfigProvider from "antd/es/config-provider";
5
3
  import _typeof from "@babel/runtime/helpers/esm/typeof";
6
4
  import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
7
5
  import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
8
6
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
9
7
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
8
+ import "antd/es/config-provider/style";
9
+ import _ConfigProvider from "antd/es/config-provider";
10
10
  import "antd/es/form/style";
11
11
  import _Form from "antd/es/form";
12
12
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
13
- var _excluded = ["value", "onChange", "className", "columns", "type", "mode", "stripe", "draggable", "disabled", "insertType", "emptyBtnText", "actionWidth", "actionProps", "toolbarProps", "rowSelection", "onlyOneLineMsg", "deletePoConfirmMsg", "mulDeletePoConfirmMsg", "otherProps", "requiredAlign", "summary", "max", "headerRender", "pagination", "originalValues", "originalTip"];
13
+ var _excluded = ["value", "onChange", "className", "columns", "type", "mode", "stripe", "draggable", "disabled", "insertType", "emptyBtnText", "actionWidth", "actionProps", "toolbarProps", "rowSelection", "onlyOneLineMsg", "deletePoConfirmMsg", "mulDeletePoConfirmMsg", "otherProps", "requiredAlign", "summary", "max", "headerRender", "pagination", "originalValues", "originalTip", "rowKey"];
14
14
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
15
- import { forwardRef, useCallback, useEffect, useImperativeHandle, useRef } from 'react';
15
+ import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useRef } from 'react';
16
16
  import { isArray } from 'lodash';
17
17
  import { useDebounceEffect, useSetState } from 'ahooks';
18
18
  import classnames from 'classnames';
@@ -50,6 +50,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
50
50
  pagination = _ref.pagination,
51
51
  originalValues = _ref.originalValues,
52
52
  originalTip = _ref.originalTip,
53
+ rowKey = _ref.rowKey,
53
54
  resetProps = _objectWithoutProperties(_ref, _excluded);
54
55
  // 上下文form
55
56
  var contentForm = _Form.useFormInstance();
@@ -60,6 +61,9 @@ var ProEditTable = function ProEditTable(_ref, ref) {
60
61
  _otherProps$viewEmpty = otherProps.viewEmpty,
61
62
  viewEmpty = _otherProps$viewEmpty === void 0 ? '-' : _otherProps$viewEmpty;
62
63
  var tableRef = useRef(null);
64
+ var _React$useContext = React.useContext(_ConfigProvider.ConfigContext),
65
+ getPrefixCls = _React$useContext.getPrefixCls;
66
+ var prefixCls = getPrefixCls();
63
67
  disabled = (otherProps === null || otherProps === void 0 ? void 0 : otherProps.disabled) || disabled;
64
68
  var _useSetState = useSetState({
65
69
  _columns: columns,
@@ -94,21 +98,14 @@ var ProEditTable = function ProEditTable(_ref, ref) {
94
98
  'pro-table-no-stripe': !stripe,
95
99
  className: className
96
100
  });
97
- // 编辑行设置下样式
98
- var _rowClassName = function _rowClassName(record) {
99
- return !virtualKey || editingKeys.includes(record.rowKey) ? 'is-editing' : '';
100
- };
101
- // 复选框
102
- var _rowSelection = _objectSpread({
103
- fixed: true,
104
- selectedRowKeys: selectedRowKeys,
105
- onChange: function onChange(selectedRowKeys, selectedRows) {
106
- setState({
107
- selectedRowKeys: selectedRowKeys,
108
- selectedRows: selectedRows
109
- });
101
+ var getRowKey = function getRowKey(record) {
102
+ var key = record.rowKey || getRandom();
103
+ if (rowKey) {
104
+ var _ref2;
105
+ key = (_ref2 = typeof rowKey === 'function' ? rowKey(record) : record[rowKey]) !== null && _ref2 !== void 0 ? _ref2 : key;
110
106
  }
111
- }, rowSelection);
107
+ return key;
108
+ };
112
109
  var config = {
113
110
  form: form,
114
111
  mode: mode,
@@ -138,8 +135,26 @@ var ProEditTable = function ProEditTable(_ref, ref) {
138
135
  tableLength: value === null || value === void 0 ? void 0 : value.length,
139
136
  page: page,
140
137
  originalValues: originalValues,
141
- originalTip: originalTip
138
+ originalTip: originalTip,
139
+ prefixCls: prefixCls
140
+ };
141
+ // 编辑行设置下样式
142
+ var _rowClassName = function _rowClassName(record) {
143
+ var isEdit = !virtualKey || editingKeys.includes(record.rowKey);
144
+ var className = isEdit ? 'is-editing' : '';
145
+ return className;
142
146
  };
147
+ // 复选框
148
+ var _rowSelection = _objectSpread({
149
+ fixed: true,
150
+ selectedRowKeys: selectedRowKeys,
151
+ onChange: function onChange(selectedRowKeys, selectedRows) {
152
+ setState({
153
+ selectedRowKeys: selectedRowKeys,
154
+ selectedRows: selectedRows
155
+ });
156
+ }
157
+ }, rowSelection);
143
158
  // 判断是否禁止添加、批量删除
144
159
  var isForbiddenBtn = useCallback(function (type) {
145
160
  // 当工具栏不渲染时,都不渲染
@@ -198,7 +213,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
198
213
  return isForbiddenBtn('mulDelete') ? rowSelection : _rowSelection;
199
214
  };
200
215
  var setColumns = /*#__PURE__*/function () {
201
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
216
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
202
217
  var nextColumns;
203
218
  return _regeneratorRuntime().wrap(function _callee$(_context) {
204
219
  while (1) switch (_context.prev = _context.next) {
@@ -217,7 +232,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
217
232
  }, _callee);
218
233
  }));
219
234
  return function setColumns() {
220
- return _ref2.apply(this, arguments);
235
+ return _ref3.apply(this, arguments);
221
236
  };
222
237
  }();
223
238
  useDebounceEffect(function () {
@@ -233,7 +248,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
233
248
  if ((value === null || value === void 0 ? void 0 : value.length) && !(value === null || value === void 0 ? void 0 : (_value$ = value[0]) === null || _value$ === void 0 ? void 0 : _value$.rowKey)) {
234
249
  var nextValues = value === null || value === void 0 ? void 0 : value.map(function (item) {
235
250
  return _objectSpread(_objectSpread({}, item), {}, {
236
- rowKey: getRandom()
251
+ rowKey: getRowKey(item)
237
252
  });
238
253
  });
239
254
  onChange(nextValues);