@zat-design/sisyphus-react 3.2.1 → 3.2.2-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 (239) hide show
  1. package/README.md +7 -0
  2. package/dist/index.esm.css +106 -39
  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/style/index.less +76 -73
  7. package/es/ProEditLabel/style/index.less +12 -9
  8. package/es/ProEditTable/components/RenderField/index.js +66 -21
  9. package/es/ProEditTable/index.js +18 -7
  10. package/es/ProEditTable/propsType.d.ts +11 -1
  11. package/es/ProEditTable/style/index.less +50 -42
  12. package/es/ProEditTable/utils/config.d.ts +1 -1
  13. package/es/ProEditTable/utils/config.js +3 -3
  14. package/es/ProEnum/style/index.less +3 -0
  15. package/es/ProForm/components/base/Checkbox/index.d.ts +1 -0
  16. package/es/ProForm/components/base/Checkbox/index.js +5 -3
  17. package/es/ProForm/components/base/DatePicker/index.js +3 -5
  18. package/es/ProForm/components/base/Input/index.js +4 -2
  19. package/es/ProForm/components/base/Input/propsType.d.ts +1 -0
  20. package/es/ProForm/components/base/InputNumber/index.d.ts +1 -0
  21. package/es/ProForm/components/base/InputNumber/index.js +5 -3
  22. package/es/ProForm/components/base/ProCascader/index.js +6 -6
  23. package/es/ProForm/components/base/Radio/index.d.ts +1 -0
  24. package/es/ProForm/components/base/Radio/index.js +4 -2
  25. package/es/ProForm/components/base/RangePicker/index.d.ts +1 -0
  26. package/es/ProForm/components/base/RangePicker/index.js +5 -3
  27. package/es/ProForm/components/base/Select/index.d.ts +1 -0
  28. package/es/ProForm/components/base/Select/index.js +4 -2
  29. package/es/ProForm/components/base/Switch/index.d.ts +1 -0
  30. package/es/ProForm/components/base/Switch/index.js +4 -2
  31. package/es/ProForm/components/base/SwitchCheckbox/index.d.ts +1 -0
  32. package/es/ProForm/components/base/SwitchCheckbox/index.js +4 -2
  33. package/es/ProForm/components/base/SwitchCheckbox/style/index.less +3 -0
  34. package/es/ProForm/components/base/TextArea/index.d.ts +1 -0
  35. package/es/ProForm/components/base/TextArea/index.js +4 -3
  36. package/es/ProForm/components/base/TextArea/index.less +4 -3
  37. package/es/ProForm/components/base/TimePicker/index.d.ts +1 -0
  38. package/es/ProForm/components/base/TimePicker/index.js +4 -2
  39. package/es/ProForm/components/base/TimePicker/style/index.less +4 -1
  40. package/es/ProForm/components/combination/Container/index.js +7 -5
  41. package/es/ProForm/components/combination/Container/style/index.less +3 -3
  42. package/es/ProForm/components/combination/FormList/index.js +6 -5
  43. package/es/ProForm/components/combination/FormList/style/index.less +17 -24
  44. package/es/ProForm/components/combination/Group/index.js +6 -3
  45. package/es/ProForm/components/combination/Group/style/index.less +15 -15
  46. package/es/ProForm/components/combination/ProAddressBar/index.js +29 -30
  47. package/es/ProForm/components/combination/ProAddressBar/style/index.less +3 -3
  48. package/es/ProForm/components/combination/ProCombination/index.js +11 -11
  49. package/es/ProForm/components/combination/ProCombination/style/index.less +2 -2
  50. package/es/ProForm/components/combination/ProModalSelect/index.js +4 -5
  51. package/es/ProForm/components/combination/ProModalSelect/style/index.less +30 -12
  52. package/es/ProForm/components/combination/ProNumberRange/index.d.ts +1 -1
  53. package/es/ProForm/components/combination/ProNumberRange/index.js +7 -7
  54. package/es/ProForm/components/combination/ProNumberRange/style/index.less +10 -10
  55. package/es/ProForm/components/combination/ProRangeLimit/index.d.ts +1 -0
  56. package/es/ProForm/components/combination/ProRangeLimit/index.js +4 -2
  57. package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +1 -0
  58. package/es/ProForm/components/combination/ProTimeLimit/index.js +4 -2
  59. package/es/ProForm/components/combination/ProTimeLimit/style/index.less +6 -6
  60. package/es/ProForm/components/render/Render.js +54 -20
  61. package/es/ProForm/components/render/RenderFields.d.ts +1 -0
  62. package/es/ProForm/components/render/RenderFields.js +13 -12
  63. package/es/ProForm/index.js +5 -2
  64. package/es/ProForm/propsType.d.ts +1 -0
  65. package/es/ProForm/style/index.less +89 -80
  66. package/es/ProForm/utils/contrastOriginal.d.ts +10 -1
  67. package/es/ProForm/utils/contrastOriginal.js +15 -18
  68. package/es/ProForm/utils/useChanged.d.ts +15 -1
  69. package/es/ProForm/utils/useChanged.js +27 -8
  70. package/es/ProIcon/style/index.less +4 -1
  71. package/es/ProLayout/components/Layout/Header/style/index.less +1 -1
  72. package/es/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +7 -7
  73. package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +28 -28
  74. package/es/ProLayout/components/Layout/Menu/SideMenu/style/index.less +11 -11
  75. package/es/ProLayout/components/ProCollapse/style/index.less +24 -24
  76. package/es/ProLayout/components/ProFooter/style/index.less +8 -7
  77. package/es/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +1 -1
  78. package/es/ProLayout/components/ProHeader/index.js +1 -0
  79. package/es/ProLayout/components/ProHeader/style/index.less +17 -11
  80. package/es/ProLayout/style/index.less +10 -7
  81. package/es/ProSelect/index.js +6 -3
  82. package/es/ProSelect/index.less +3 -0
  83. package/es/ProStep/components/Item/index.js +1 -4
  84. package/es/ProStep/style/index.less +3 -0
  85. package/es/ProTable/components/RenderColumn/index.js +1 -1
  86. package/es/ProTable/index.js +3 -3
  87. package/es/ProTable/style/index.less +72 -52
  88. package/es/ProTabs/style/index.less +26 -24
  89. package/es/ProThemeTools/component/PrdTools/index.d.ts +1 -1
  90. package/es/ProThemeTools/component/PrdTools/index.js +28 -26
  91. package/es/ProThemeTools/component/PrdTools/style/index.less +6 -6
  92. package/es/ProThemeTools/index.d.ts +1 -1
  93. package/es/ProThemeTools/index.js +9 -3
  94. package/es/ProThemeTools/propsType.d.ts +4 -0
  95. package/es/ProThemeTools/style/index.less +6 -3
  96. package/es/ProThemeTools/utils/index.d.ts +1 -1
  97. package/es/ProThemeTools/utils/index.js +2 -1
  98. package/es/ProTooltip/style/index.less +3 -0
  99. package/es/ProTree/components/CloseIcon.js +2 -4
  100. package/es/ProTree/components/Tree.js +43 -42
  101. package/es/ProTree/style/index.less +29 -32
  102. package/es/ProTreeModal/components/CloseIcon.js +2 -4
  103. package/es/ProTreeModal/components/Trigger.d.ts +3 -0
  104. package/es/ProTreeModal/components/Trigger.js +79 -19
  105. package/es/ProTreeModal/index.js +38 -6
  106. package/es/ProTreeModal/propsType.d.ts +5 -2
  107. package/es/ProTreeModal/style/index.less +11 -8
  108. package/es/ProTreeSelect/index.js +3 -2
  109. package/es/ProTreeSelect/style/index.less +25 -22
  110. package/es/ProUpload/components/DragRender.js +7 -4
  111. package/es/ProUpload/index.js +11 -7
  112. package/es/ProUpload/style/index.less +7 -4
  113. package/es/ProViewer/index.js +3 -1
  114. package/es/ProViewer/style/index.less +6 -3
  115. package/es/locale/en_US.d.ts +18 -1
  116. package/es/locale/en_US.js +20 -3
  117. package/es/locale/zh_CN.d.ts +18 -1
  118. package/es/locale/zh_CN.js +19 -2
  119. package/es/style/core/compatible.less +6 -6
  120. package/es/style/theme/antd.less +277 -253
  121. package/lib/ProAction/index.less +3 -0
  122. package/lib/ProDownload/index.js +9 -6
  123. package/lib/ProDownload/style/index.less +5 -2
  124. package/lib/ProDrawerForm/style/index.less +76 -73
  125. package/lib/ProEditLabel/style/index.less +12 -9
  126. package/lib/ProEditTable/components/RenderField/index.js +61 -20
  127. package/lib/ProEditTable/index.js +17 -5
  128. package/lib/ProEditTable/propsType.d.ts +11 -1
  129. package/lib/ProEditTable/style/index.less +50 -42
  130. package/lib/ProEditTable/utils/config.d.ts +1 -1
  131. package/lib/ProEditTable/utils/config.js +3 -3
  132. package/lib/ProEnum/style/index.less +3 -0
  133. package/lib/ProForm/components/base/Checkbox/index.d.ts +1 -0
  134. package/lib/ProForm/components/base/Checkbox/index.js +5 -3
  135. package/lib/ProForm/components/base/DatePicker/index.js +3 -5
  136. package/lib/ProForm/components/base/Input/index.js +4 -2
  137. package/lib/ProForm/components/base/Input/propsType.d.ts +1 -0
  138. package/lib/ProForm/components/base/InputNumber/index.d.ts +1 -0
  139. package/lib/ProForm/components/base/InputNumber/index.js +5 -3
  140. package/lib/ProForm/components/base/ProCascader/index.js +6 -6
  141. package/lib/ProForm/components/base/Radio/index.d.ts +1 -0
  142. package/lib/ProForm/components/base/Radio/index.js +4 -2
  143. package/lib/ProForm/components/base/RangePicker/index.d.ts +1 -0
  144. package/lib/ProForm/components/base/RangePicker/index.js +5 -3
  145. package/lib/ProForm/components/base/Select/index.d.ts +1 -0
  146. package/lib/ProForm/components/base/Select/index.js +4 -2
  147. package/lib/ProForm/components/base/Switch/index.d.ts +1 -0
  148. package/lib/ProForm/components/base/Switch/index.js +4 -2
  149. package/lib/ProForm/components/base/SwitchCheckbox/index.d.ts +1 -0
  150. package/lib/ProForm/components/base/SwitchCheckbox/index.js +4 -2
  151. package/lib/ProForm/components/base/SwitchCheckbox/style/index.less +3 -0
  152. package/lib/ProForm/components/base/TextArea/index.d.ts +1 -0
  153. package/lib/ProForm/components/base/TextArea/index.js +4 -3
  154. package/lib/ProForm/components/base/TextArea/index.less +4 -3
  155. package/lib/ProForm/components/base/TimePicker/index.d.ts +1 -0
  156. package/lib/ProForm/components/base/TimePicker/index.js +4 -2
  157. package/lib/ProForm/components/base/TimePicker/style/index.less +4 -1
  158. package/lib/ProForm/components/combination/Container/index.js +7 -5
  159. package/lib/ProForm/components/combination/Container/style/index.less +3 -3
  160. package/lib/ProForm/components/combination/FormList/index.js +6 -5
  161. package/lib/ProForm/components/combination/FormList/style/index.less +17 -24
  162. package/lib/ProForm/components/combination/Group/index.js +6 -3
  163. package/lib/ProForm/components/combination/Group/style/index.less +15 -15
  164. package/lib/ProForm/components/combination/ProAddressBar/index.js +29 -30
  165. package/lib/ProForm/components/combination/ProAddressBar/style/index.less +3 -3
  166. package/lib/ProForm/components/combination/ProCombination/index.js +11 -11
  167. package/lib/ProForm/components/combination/ProCombination/style/index.less +2 -2
  168. package/lib/ProForm/components/combination/ProModalSelect/index.js +4 -5
  169. package/lib/ProForm/components/combination/ProModalSelect/style/index.less +30 -12
  170. package/lib/ProForm/components/combination/ProNumberRange/index.d.ts +1 -1
  171. package/lib/ProForm/components/combination/ProNumberRange/index.js +7 -7
  172. package/lib/ProForm/components/combination/ProNumberRange/style/index.less +10 -10
  173. package/lib/ProForm/components/combination/ProRangeLimit/index.d.ts +1 -0
  174. package/lib/ProForm/components/combination/ProRangeLimit/index.js +4 -2
  175. package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +1 -0
  176. package/lib/ProForm/components/combination/ProTimeLimit/index.js +4 -2
  177. package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +6 -6
  178. package/lib/ProForm/components/render/Render.js +53 -21
  179. package/lib/ProForm/components/render/RenderFields.d.ts +1 -0
  180. package/lib/ProForm/components/render/RenderFields.js +13 -12
  181. package/lib/ProForm/index.js +5 -2
  182. package/lib/ProForm/propsType.d.ts +1 -0
  183. package/lib/ProForm/style/index.less +89 -80
  184. package/lib/ProForm/utils/contrastOriginal.d.ts +10 -1
  185. package/lib/ProForm/utils/contrastOriginal.js +14 -17
  186. package/lib/ProForm/utils/useChanged.d.ts +15 -1
  187. package/lib/ProForm/utils/useChanged.js +27 -8
  188. package/lib/ProIcon/style/index.less +4 -1
  189. package/lib/ProLayout/components/Layout/Header/style/index.less +1 -1
  190. package/lib/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +7 -7
  191. package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +28 -28
  192. package/lib/ProLayout/components/Layout/Menu/SideMenu/style/index.less +11 -11
  193. package/lib/ProLayout/components/ProCollapse/style/index.less +24 -24
  194. package/lib/ProLayout/components/ProFooter/style/index.less +8 -7
  195. package/lib/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +1 -1
  196. package/lib/ProLayout/components/ProHeader/index.js +1 -0
  197. package/lib/ProLayout/components/ProHeader/style/index.less +17 -11
  198. package/lib/ProLayout/style/index.less +10 -7
  199. package/lib/ProSelect/index.js +6 -3
  200. package/lib/ProSelect/index.less +3 -0
  201. package/lib/ProStep/components/Item/index.js +1 -4
  202. package/lib/ProStep/style/index.less +3 -0
  203. package/lib/ProTable/components/RenderColumn/index.js +1 -1
  204. package/lib/ProTable/index.js +3 -3
  205. package/lib/ProTable/style/index.less +72 -52
  206. package/lib/ProTabs/style/index.less +26 -24
  207. package/lib/ProThemeTools/component/PrdTools/index.d.ts +1 -1
  208. package/lib/ProThemeTools/component/PrdTools/index.js +28 -26
  209. package/lib/ProThemeTools/component/PrdTools/style/index.less +6 -6
  210. package/lib/ProThemeTools/index.d.ts +1 -1
  211. package/lib/ProThemeTools/index.js +9 -3
  212. package/lib/ProThemeTools/propsType.d.ts +4 -0
  213. package/lib/ProThemeTools/style/index.less +6 -3
  214. package/lib/ProThemeTools/utils/index.d.ts +1 -1
  215. package/lib/ProThemeTools/utils/index.js +2 -1
  216. package/lib/ProTooltip/style/index.less +3 -0
  217. package/lib/ProTree/components/CloseIcon.js +2 -4
  218. package/lib/ProTree/components/Tree.js +42 -41
  219. package/lib/ProTree/style/index.less +29 -32
  220. package/lib/ProTreeModal/components/CloseIcon.js +2 -4
  221. package/lib/ProTreeModal/components/Trigger.d.ts +3 -0
  222. package/lib/ProTreeModal/components/Trigger.js +74 -18
  223. package/lib/ProTreeModal/index.js +38 -6
  224. package/lib/ProTreeModal/propsType.d.ts +5 -2
  225. package/lib/ProTreeModal/style/index.less +11 -8
  226. package/lib/ProTreeSelect/index.js +3 -2
  227. package/lib/ProTreeSelect/style/index.less +25 -22
  228. package/lib/ProUpload/components/DragRender.js +7 -4
  229. package/lib/ProUpload/index.js +11 -7
  230. package/lib/ProUpload/style/index.less +7 -4
  231. package/lib/ProViewer/index.js +4 -3
  232. package/lib/ProViewer/style/index.less +6 -3
  233. package/lib/locale/en_US.d.ts +18 -1
  234. package/lib/locale/en_US.js +20 -3
  235. package/lib/locale/zh_CN.d.ts +18 -1
  236. package/lib/locale/zh_CN.js +19 -2
  237. package/lib/style/core/compatible.less +6 -6
  238. package/lib/style/theme/antd.less +277 -253
  239. package/package.json +1 -1
@@ -1,3 +1,5 @@
1
+ @root-entry-name: 'default';
2
+ @import (reference) '~antd/es/style/themes/index.less';
1
3
  @import '../components/base/SwitchCheckbox/style/index.less';
2
4
  @import '../components/base/TextArea/index.less';
3
5
  @import '../components/combination/FormList/style/index.less';
@@ -11,78 +13,78 @@
11
13
  @import '../components/old/EnumSelect/style/index.less';
12
14
 
13
15
  .pro-form {
14
- &.ant-form-vertical {
15
- .ant-form-item .ant-form-item-label {
16
+ &.@{ant-prefix}-form-vertical {
17
+ .@{ant-prefix}-form-item .@{ant-prefix}-form-item-label {
16
18
  flex: none !important;
17
19
  }
18
20
 
19
21
  .pro-form-custom-footer {
20
- display : flex;
21
- align-items : center;
22
+ display: flex;
23
+ align-items: center;
24
+ height: auto;
22
25
  margin-bottom: 0;
23
- height : auto;
24
- padding-top : 6px;
26
+ padding-top: 6px;
25
27
 
26
- .ant-space-align-center {
28
+ .@{ant-prefix}-space-align-center {
27
29
  align-items: normal;
28
30
  }
29
31
  }
30
32
  }
31
33
 
32
- &.ant-form {
34
+ &.@{ant-prefix}-form {
33
35
  margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
34
36
  }
35
37
 
36
38
  .pro-collapse-level2 {
37
- .ant-collapse-item {
39
+ .@{ant-prefix}-collapse-item {
38
40
  margin-bottom: 0 !important;
39
41
  }
40
42
  }
41
43
 
42
- .ant-form-item-control-input {
44
+ .@{ant-prefix}-form-item-control-input {
43
45
  flex-grow: 1;
44
46
  max-width: 100%;
45
47
  }
46
48
 
47
- span.ant-input-clear-icon {
48
- display : unset;
49
+ span.@{ant-prefix}-input-clear-icon {
50
+ display: unset;
49
51
  visibility: hidden;
50
52
  }
51
53
 
52
- .ant-input-affix-wrapper:hover span.ant-input-clear-icon {
53
- display : unset;
54
+ .@{ant-prefix}-input-affix-wrapper:hover span.@{ant-prefix}-input-clear-icon {
55
+ display: unset;
54
56
  visibility: unset;
55
57
  }
56
58
 
57
- .ant-input-affix-wrapper:hover span.ant-input-clear-icon[class~='ant-input-clear-icon-hidden'] {
58
- display : unset;
59
+ .@{ant-prefix}-input-affix-wrapper:hover span.@{ant-prefix}-input-clear-icon[class~='ant-input-clear-icon-hidden'] {
60
+ display: unset;
59
61
  visibility: hidden;
60
62
  }
61
63
 
62
64
  &.pro-form-view {
63
- .ant-form-item-label {
65
+ .@{ant-prefix}-form-item-label {
64
66
  label {
65
67
  color: var(--zaui-aide-text, #939599);
66
68
  }
67
69
  }
68
70
 
69
- .ant-form-item {
71
+ .@{ant-prefix}-form-item {
70
72
  margin-bottom: 0 !important;
71
73
  }
72
74
 
73
- .ant-form-item {
74
- .ant-tree-icon-hide input {
75
+ .@{ant-prefix}-form-item {
76
+ .@{ant-prefix}-tree-icon-hide input {
75
77
  display: none !important;
76
78
  }
77
79
  }
78
80
  }
79
81
 
80
- .ant-picker-range {
82
+ .@{ant-prefix}-picker-range {
81
83
  width: 100%;
82
84
  }
83
85
 
84
86
  .pro-form-list-line {
85
- .ant-row {
87
+ .@{ant-prefix}-row {
86
88
  width: 100%;
87
89
  }
88
90
  }
@@ -90,7 +92,7 @@
90
92
  // 展开折叠按钮
91
93
  .expand-button {
92
94
  line-height: 32px;
93
- cursor : pointer;
95
+ cursor: pointer;
94
96
 
95
97
  .rotate-to-top {
96
98
  transform: rotate(90deg);
@@ -101,88 +103,96 @@
101
103
  }
102
104
  }
103
105
 
104
- .ant-form-item {
106
+ .@{ant-prefix}-form-item {
105
107
  margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1)) !important;
106
108
 
107
109
  &.pro-form-item-width-auto {
108
- .ant-form-item-control-input {
110
+ .@{ant-prefix}-form-item-control-input {
109
111
  flex-grow: inherit;
110
112
  }
111
113
 
112
- .ant-form-item-control-input-content {
114
+ .@{ant-prefix}-form-item-control-input-content {
113
115
  flex: initial;
114
116
  }
115
117
  }
116
118
 
117
- .ant-form-item-tooltip {
119
+ .@{ant-prefix}-form-item-tooltip {
118
120
  svg {
119
- width : 14px;
120
- height : 14px;
121
+ width: 14px;
122
+ height: 14px;
121
123
  vertical-align: bottom;
122
- fill : @zaui-aide-text;
124
+ fill: @zaui-aide-text;
123
125
  }
124
126
  }
125
127
 
126
128
  // 比较原始值场景下 不同时候的样式
127
129
  &.pro-form-item-changed {
128
-
129
- span.ant-input-affix-wrapper,
130
- .ant-select-selector,
131
- .ant-picker {
132
- background: @zaui-contract-bg;
130
+ span.@{ant-prefix}-input-affix-wrapper,
131
+ .@{ant-prefix}-select-selector,
132
+ .@{ant-prefix}-picker {
133
+ background: @zaui-contract-bg !important;
133
134
 
134
135
  input {
135
136
  background: @zaui-contract-bg;
136
137
  }
138
+ .@{ant-prefix}-select-selection-placeholder {
139
+ z-index: 9;
140
+ }
141
+ }
142
+
143
+ .@{ant-prefix}-form-item-control-input-content > span {
144
+ background: @zaui-contract-bg;
145
+ padding: 4px 8px;
146
+ border-radius: 4px;
137
147
  }
138
148
  }
139
149
 
140
- .ant-row {
150
+ .@{ant-prefix}-row {
141
151
  width: 100%;
142
152
  }
143
153
 
144
- .ant-col.ant-col-0 {
154
+ .@{ant-prefix}-col.@{ant-prefix}-col-0 {
145
155
  display: none;
146
156
  }
147
157
 
148
- .ant-form-item-explain {
158
+ .@{ant-prefix}-form-item-explain {
149
159
  height: auto;
150
160
 
151
- .ant-form-item-explain-error {
161
+ .@{ant-prefix}-form-item-explain-error {
152
162
  font-size: var(--zaui-font-size, 14px);
153
163
  }
154
164
  }
155
165
 
156
- .ant-input-number {
166
+ .@{ant-prefix}-input-number {
157
167
  width: 100%;
158
168
  }
159
169
 
160
170
  .pro-number-range {
161
- .ant-input-number {
171
+ .@{ant-prefix}-input-number {
162
172
  width: calc(50% - 20px);
163
173
  }
164
174
 
165
175
  .range-right {
166
- .ant-input-number {
176
+ .@{ant-prefix}-input-number {
167
177
  border-left: none;
168
178
  }
169
179
 
170
180
  .range-right {
171
- width : 100%;
172
- border : 1px solid @zaui-form-control-line;
173
- border-top-left-radius : 0;
181
+ width: 100%;
182
+ border: 1px solid @zaui-form-control-line;
183
+ border-top-left-radius: 0;
174
184
  border-bottom-left-radius: 0;
175
185
  }
176
186
  }
177
187
  }
178
188
  }
179
189
 
180
- .ant-form-item-hidden {
190
+ .@{ant-prefix}-form-item-hidden {
181
191
  display: none;
182
192
  }
183
193
 
184
- .ant-form-item-label {
185
- >label {
194
+ .@{ant-prefix}-form-item-label {
195
+ > label {
186
196
  white-space: pre-wrap;
187
197
  }
188
198
  }
@@ -191,9 +201,9 @@
191
201
  margin-left: @zaui-space-size-sm;
192
202
  }
193
203
 
194
- .ant-form-item-has-error {
204
+ .@{ant-prefix}-form-item-has-error {
195
205
  .group-separator {
196
- color : var(--ant-error-color);
206
+ color: var(--ant-error-color);
197
207
  border-color: var(--ant-error-color);
198
208
  }
199
209
 
@@ -203,10 +213,9 @@
203
213
  }
204
214
 
205
215
  .site-input-group-wrapper {
206
-
207
216
  // 范围值表单样式
208
217
  & .site-input-split {
209
- text-align : center;
218
+ text-align: center;
210
219
  background-color: @zaui-table-strip-bg;
211
220
 
212
221
  &.site-input-split-disabled {
@@ -222,16 +231,16 @@
222
231
  border-left-width: 1px;
223
232
  }
224
233
 
225
- & .ant-input-rtl.site-input-right {
234
+ & .@{ant-prefix}-input-rtl.site-input-right {
226
235
  border-right-width: 0;
227
236
  }
228
237
 
229
- & .ant-input-rtl.site-input-right:hover,
230
- & .ant-input-rtl.site-input-right:focus {
238
+ & .@{ant-prefix}-input-rtl.site-input-right:hover,
239
+ & .@{ant-prefix}-input-rtl.site-input-right:focus {
231
240
  border-right-width: 1px;
232
241
  }
233
242
 
234
- .ant-form-item {
243
+ .@{ant-prefix}-form-item {
235
244
  margin-bottom: 0;
236
245
  }
237
246
 
@@ -241,44 +250,44 @@
241
250
  }
242
251
 
243
252
  .site-input-left {
244
- .ant-input-number {
253
+ .@{ant-prefix}-input-number {
245
254
  border-right: none;
246
255
  }
247
256
  }
248
257
 
249
258
  .site-input-right {
250
- .ant-input-number {
259
+ .@{ant-prefix}-input-number {
251
260
  border-left: none;
252
261
  }
253
262
  }
254
263
 
255
- &.ant-input-group.ant-input-group-compact>*:not(:last-child) {
264
+ &.@{ant-prefix}-input-group.@{ant-prefix}-input-group-compact > *:not(:last-child) {
256
265
  margin-right: 0;
257
266
  }
258
267
 
259
- >*:first-child {
260
- border-top-right-radius : 0 !important;
268
+ > *:first-child {
269
+ border-top-right-radius: 0 !important;
261
270
  border-bottom-right-radius: 0 !important;
262
271
 
263
- >.ant-select-selector {
264
- border-top-right-radius : 0 !important;
272
+ > .@{ant-prefix}-select-selector {
273
+ border-top-right-radius: 0 !important;
265
274
  border-bottom-right-radius: 0 !important;
266
275
  }
267
276
  }
268
277
 
269
- >*:last-child {
270
- border-top-left-radius : 0 !important;
278
+ > *:last-child {
279
+ border-top-left-radius: 0 !important;
271
280
  border-bottom-left-radius: 0 !important;
272
281
 
273
- >.ant-select-selector {
274
- border-top-left-radius : 0 !important;
282
+ > .@{ant-prefix}-select-selector {
283
+ border-top-left-radius: 0 !important;
275
284
  border-bottom-left-radius: 0 !important;
276
285
  }
277
286
  }
278
287
  }
279
288
 
280
- .ant-input-group.ant-input-group-compact>* {
281
- float : none;
289
+ .@{ant-prefix}-input-group.@{ant-prefix}-input-group-compact > * {
290
+ float: none;
282
291
  vertical-align: top;
283
292
  }
284
293
 
@@ -287,17 +296,17 @@
287
296
  }
288
297
 
289
298
  .noDisabled {
290
- color : @zaui-disabled-text;
291
- font-size : var(--zaui-font-size, 14px);
299
+ color: @zaui-disabled-text;
300
+ font-size: var(--zaui-font-size, 14px);
292
301
  background-color: transparent;
293
- border : none;
294
- cursor : default;
295
- opacity : 1;
302
+ border: none;
303
+ cursor: default;
304
+ opacity: 1;
296
305
  }
297
306
 
298
307
  div.pro-form-custom-footer {
299
- width : unset !important;
300
- height : 32px;
308
+ width: unset !important;
309
+ height:32px;
301
310
  margin-bottom: calc(var(--zaui-height-size-md, 16px) * var(--zaui-size, 1));
302
311
 
303
312
  &.pro-form-custom-footer-hidden {
@@ -306,14 +315,14 @@
306
315
  }
307
316
 
308
317
  .pro-form-view-container {
309
- display : inline-block;
310
- color : var(--zaui-text, #343434);
318
+ display: inline-block;
319
+ color: var(--zaui-text, #343434);
311
320
  word-break: break-all;
312
321
  }
313
322
 
314
323
  .pro-form-view-container_nowrap {
315
- overflow : hidden;
316
- white-space : nowrap;
324
+ overflow: hidden;
325
+ white-space: nowrap;
317
326
  text-overflow: ellipsis;
318
327
  }
319
328
 
@@ -1 +1,10 @@
1
- export declare const contrastOriginal: (name: any, names: any, originValues: any, currentValue: any, fun: any) => any;
1
+ import { FormInstance } from 'antd';
2
+ interface Params {
3
+ originalValues: any;
4
+ originalValue: any;
5
+ value: any;
6
+ form: FormInstance;
7
+ equalWith?: (originalValue: any, currentValue: any) => boolean;
8
+ }
9
+ export declare const contrastOriginal: (params: Params) => boolean;
10
+ export {};
@@ -6,29 +6,26 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.contrastOriginal = void 0;
7
7
  var _lodash = require("lodash");
8
8
  var nullValue = [null, undefined, '']; // 输入框空值时可能存在的三种值 视为相等
9
- var contrastOriginal = exports.contrastOriginal = function contrastOriginal(name, names, originValues, currentValue, fun) {
9
+ var contrastOriginal = exports.contrastOriginal = function contrastOriginal(params) {
10
+ var originalValue = params.originalValue,
11
+ originalValues = params.originalValues,
12
+ value = params.value,
13
+ equalWith = params.equalWith;
10
14
  // 支持传入自定义比较事件
11
- if ((0, _lodash.isFunction)(fun)) {
12
- if (names === null || names === void 0 ? void 0 : names.length) {
13
- var originVal = names.map(function (key) {
14
- return (0, _lodash.get)(originValues, key);
15
- });
16
- return !fun(originVal, currentValue);
17
- }
18
- return !fun((0, _lodash.get)(originValues, name), currentValue);
15
+ if ((0, _lodash.isFunction)(equalWith)) {
16
+ return !equalWith(originalValue, value);
19
17
  }
20
- if (names === null || names === void 0 ? void 0 : names.length) {
21
- return names.some(function (nameItem, index) {
22
- var originalValue = (0, _lodash.get)(originValues, nameItem);
23
- if (!nullValue.includes(currentValue === null || currentValue === void 0 ? void 0 : currentValue[index]) || !nullValue.includes(originalValue)) {
24
- return !(0, _lodash.isEqual)(currentValue === null || currentValue === void 0 ? void 0 : currentValue[index], (0, _lodash.get)(originValues, nameItem));
18
+ if (Array.isArray(originalValue)) {
19
+ return originalValue.some(function (valueItem, index) {
20
+ // 如果两个值有一个不是空值, 则进行深比较
21
+ if (!nullValue.includes(value === null || value === void 0 ? void 0 : value[index]) || !nullValue.includes(valueItem)) {
22
+ return !(0, _lodash.isEqual)(value === null || value === void 0 ? void 0 : value[index], valueItem);
25
23
  }
26
24
  return false;
27
25
  });
28
26
  }
29
- var originalValue = (0, _lodash.get)(originValues, name);
30
- if (!nullValue.includes(currentValue) || !nullValue.includes(originalValue)) {
31
- return !(0, _lodash.isEqual)(currentValue, (0, _lodash.get)(originValues, name));
27
+ if (!nullValue.includes(value) || !nullValue.includes(originalValue)) {
28
+ return !(0, _lodash.isEqual)(value, originalValue);
32
29
  }
33
30
  return false;
34
31
  };
@@ -1 +1,15 @@
1
- export declare const useChanged: (name: any, names: any, nameStr: any, originalValues: any, form: any, fun: any) => any;
1
+ import { FormInstance } from 'antd';
2
+ import { NamePath } from 'antd/lib/form/interface';
3
+ interface Params {
4
+ name?: NamePath;
5
+ names?: NamePath[];
6
+ namesStr?: NamePath;
7
+ originalName?: NamePath;
8
+ originalNames?: NamePath[];
9
+ originalNameStr?: NamePath;
10
+ originalValues: any;
11
+ form: FormInstance;
12
+ equalWith?: (originalValue: any, currentValue: any) => boolean;
13
+ }
14
+ export declare const useChanged: (params: Params) => any[];
15
+ export {};
@@ -7,13 +7,32 @@ exports.useChanged = void 0;
7
7
  var _antd = require("antd");
8
8
  var _lodash = require("lodash");
9
9
  var _contrastOriginal = require("./contrastOriginal");
10
- var useChanged = exports.useChanged = function useChanged(name, names, nameStr, originalValues, form, fun) {
10
+ var useChanged = exports.useChanged = function useChanged(params) {
11
+ var name = params.name,
12
+ names = params.names,
13
+ namesStr = params.namesStr,
14
+ _params$originalName = params.originalName,
15
+ originalName = _params$originalName === void 0 ? name : _params$originalName,
16
+ _params$originalNames = params.originalNames,
17
+ originalNames = _params$originalNames === void 0 ? names : _params$originalNames,
18
+ originalValues = params.originalValues,
19
+ form = params.form,
20
+ equalWith = params.equalWith;
11
21
  var _form = form;
12
- if (!originalValues || (0, _lodash.get)(originalValues, nameStr || name) === undefined) {
13
- _form = [];
14
- return false;
15
- }
16
- var value = _antd.Form.useWatch(nameStr || name, _form);
17
- var changed = (0, _contrastOriginal.contrastOriginal)(name, names, originalValues, value, fun);
18
- return changed;
22
+ var originalValue = (originalNames === null || originalNames === void 0 ? void 0 : originalNames.length) ? originalNames.map(function (originalName) {
23
+ return (0, _lodash.get)(originalValues, originalName);
24
+ }) : (0, _lodash.get)(originalValues, originalName);
25
+ var notWatch = !originalValues || originalValue === undefined;
26
+ // @ts-ignore
27
+ if (notWatch) _form = [];
28
+ var value = _antd.Form.useWatch(namesStr || name, _form);
29
+ if (notWatch) return [false];
30
+ var changed = (0, _contrastOriginal.contrastOriginal)({
31
+ value: value,
32
+ originalValue: originalValue,
33
+ originalValues: originalValues,
34
+ form: form,
35
+ equalWith: equalWith
36
+ });
37
+ return [changed, originalValue];
19
38
  };
@@ -1,3 +1,6 @@
1
+ @root-entry-name: 'default';
2
+ @import (reference) '~antd/es/style/themes/index.less';
3
+
1
4
  .pro-icon {
2
5
  cursor: pointer;
3
6
 
@@ -17,7 +20,7 @@
17
20
  display: inline-block;
18
21
  }
19
22
 
20
- &.ant-btn-icon-only {
23
+ &.@{ant-prefix}-btn-icon-only {
21
24
  width : auto;
22
25
  height : auto;
23
26
  padding: 0;
@@ -15,7 +15,7 @@
15
15
  box-shadow : 0px 1px 2px 0px rgba(0, 55, 93, 0.1) !important;
16
16
 
17
17
  .pro-layout-header-actions {
18
- .ant-avatar {
18
+ .@{ant-prefix}-avatar {
19
19
  background: var(--zaui-brand, #006aff);
20
20
  }
21
21
  }
@@ -73,28 +73,28 @@
73
73
  top: 80px !important
74
74
  }
75
75
 
76
- .pro-layout-menu-tooltip.pro-layout-menu-tooltip-nav-open.ant-popover-placement-rightBottom,
77
- .pro-layout-menu-tooltip.pro-layout-menu-tooltip-nav-open.ant-popover-placement-rightTop {
76
+ .pro-layout-menu-tooltip.pro-layout-menu-tooltip-nav-open.@{ant-prefix}-popover-placement-rightBottom,
77
+ .pro-layout-menu-tooltip.pro-layout-menu-tooltip-nav-open.@{ant-prefix}-popover-placement-rightTop {
78
78
  left: 220px !important
79
79
  }
80
80
 
81
- .pro-layout-menu-tooltip.ant-popover-placement-rightBottom,
82
- .pro-layout-menu-tooltip.ant-popover-placement-rightTop {
81
+ .pro-layout-menu-tooltip.@{ant-prefix}-popover-placement-rightBottom,
82
+ .pro-layout-menu-tooltip.@{ant-prefix}-popover-placement-rightTop {
83
83
  position : fixed;
84
84
  z-index : 1001;
85
85
  left : 49px !important;
86
86
  padding-left: 0
87
87
  }
88
88
 
89
- .pro-layout-menu-tooltip .ant-popover-inner-content {
89
+ .pro-layout-menu-tooltip .@{ant-prefix}-popover-inner-content {
90
90
  padding: 0
91
91
  }
92
92
 
93
- .pro-layout-menu-tooltip .ant-popover-content>.ant-popover-arrow {
93
+ .pro-layout-menu-tooltip .@{ant-prefix}-popover-content>.@{ant-prefix}-popover-arrow {
94
94
  display: none
95
95
  }
96
96
 
97
- .pro-layout-menu-tooltip .ant-popover-content .ant-popover-inner {
97
+ .pro-layout-menu-tooltip .@{ant-prefix}-popover-content .@{ant-prefix}-popover-inner {
98
98
  padding : 0;
99
99
  box-shadow: 2px 0px 5px 0px rgba(0, 55, 93, 0.1);
100
100
  }