@zat-design/sisyphus-react 3.2.1 → 3.2.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 (132) hide show
  1. package/dist/index.esm.css +32 -7
  2. package/es/ProEditTable/components/RenderField/index.js +66 -21
  3. package/es/ProEditTable/index.js +11 -4
  4. package/es/ProEditTable/propsType.d.ts +11 -1
  5. package/es/ProForm/components/base/Checkbox/index.d.ts +1 -0
  6. package/es/ProForm/components/base/Checkbox/index.js +5 -3
  7. package/es/ProForm/components/base/DatePicker/index.js +3 -2
  8. package/es/ProForm/components/base/Input/index.js +4 -2
  9. package/es/ProForm/components/base/Input/propsType.d.ts +1 -0
  10. package/es/ProForm/components/base/InputNumber/index.d.ts +1 -0
  11. package/es/ProForm/components/base/InputNumber/index.js +5 -3
  12. package/es/ProForm/components/base/ProCascader/index.js +6 -6
  13. package/es/ProForm/components/base/Radio/index.d.ts +1 -0
  14. package/es/ProForm/components/base/Radio/index.js +4 -2
  15. package/es/ProForm/components/base/RangePicker/index.d.ts +1 -0
  16. package/es/ProForm/components/base/RangePicker/index.js +5 -3
  17. package/es/ProForm/components/base/Select/index.d.ts +1 -0
  18. package/es/ProForm/components/base/Select/index.js +4 -2
  19. package/es/ProForm/components/base/Switch/index.d.ts +1 -0
  20. package/es/ProForm/components/base/Switch/index.js +4 -2
  21. package/es/ProForm/components/base/SwitchCheckbox/index.d.ts +1 -0
  22. package/es/ProForm/components/base/SwitchCheckbox/index.js +4 -2
  23. package/es/ProForm/components/base/TextArea/index.d.ts +1 -0
  24. package/es/ProForm/components/base/TextArea/index.js +4 -3
  25. package/es/ProForm/components/base/TimePicker/index.d.ts +1 -0
  26. package/es/ProForm/components/base/TimePicker/index.js +4 -2
  27. package/es/ProForm/components/combination/Container/index.js +7 -5
  28. package/es/ProForm/components/combination/FormList/index.js +6 -5
  29. package/es/ProForm/components/combination/Group/index.js +6 -3
  30. package/es/ProForm/components/combination/ProAddressBar/index.js +29 -30
  31. package/es/ProForm/components/combination/ProCombination/index.js +11 -11
  32. package/es/ProForm/components/combination/ProModalSelect/index.js +4 -5
  33. package/es/ProForm/components/combination/ProModalSelect/style/index.less +1 -1
  34. package/es/ProForm/components/combination/ProNumberRange/index.d.ts +1 -1
  35. package/es/ProForm/components/combination/ProNumberRange/index.js +7 -7
  36. package/es/ProForm/components/combination/ProRangeLimit/index.d.ts +1 -0
  37. package/es/ProForm/components/combination/ProRangeLimit/index.js +4 -2
  38. package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +1 -0
  39. package/es/ProForm/components/combination/ProTimeLimit/index.js +4 -2
  40. package/es/ProForm/components/render/Render.js +54 -20
  41. package/es/ProForm/components/render/RenderFields.d.ts +1 -0
  42. package/es/ProForm/components/render/RenderFields.js +12 -11
  43. package/es/ProForm/index.js +5 -2
  44. package/es/ProForm/propsType.d.ts +1 -0
  45. package/es/ProForm/style/index.less +49 -42
  46. package/es/ProForm/utils/contrastOriginal.d.ts +10 -1
  47. package/es/ProForm/utils/contrastOriginal.js +15 -18
  48. package/es/ProForm/utils/useChanged.d.ts +15 -1
  49. package/es/ProForm/utils/useChanged.js +27 -8
  50. package/es/ProLayout/components/ProHeader/index.js +1 -0
  51. package/es/ProLayout/components/ProHeader/style/index.less +7 -0
  52. package/es/ProSelect/index.js +6 -3
  53. package/es/ProStep/components/Item/index.js +1 -4
  54. package/es/ProTable/components/RenderColumn/index.js +1 -1
  55. package/es/ProTable/style/index.less +6 -0
  56. package/es/ProTabs/style/index.less +1 -1
  57. package/es/ProThemeTools/component/PrdTools/index.js +21 -20
  58. package/es/ProThemeTools/index.js +2 -1
  59. package/es/ProTree/components/Tree.js +43 -42
  60. package/es/ProTree/style/index.less +0 -6
  61. package/es/ProTreeSelect/index.js +3 -2
  62. package/es/locale/en_US.d.ts +15 -1
  63. package/es/locale/en_US.js +17 -3
  64. package/es/locale/zh_CN.d.ts +15 -1
  65. package/es/locale/zh_CN.js +15 -1
  66. package/es/style/theme/antd.less +8 -3
  67. package/lib/ProEditTable/components/RenderField/index.js +61 -20
  68. package/lib/ProEditTable/index.js +12 -4
  69. package/lib/ProEditTable/propsType.d.ts +11 -1
  70. package/lib/ProForm/components/base/Checkbox/index.d.ts +1 -0
  71. package/lib/ProForm/components/base/Checkbox/index.js +5 -3
  72. package/lib/ProForm/components/base/DatePicker/index.js +3 -2
  73. package/lib/ProForm/components/base/Input/index.js +4 -2
  74. package/lib/ProForm/components/base/Input/propsType.d.ts +1 -0
  75. package/lib/ProForm/components/base/InputNumber/index.d.ts +1 -0
  76. package/lib/ProForm/components/base/InputNumber/index.js +5 -3
  77. package/lib/ProForm/components/base/ProCascader/index.js +6 -6
  78. package/lib/ProForm/components/base/Radio/index.d.ts +1 -0
  79. package/lib/ProForm/components/base/Radio/index.js +4 -2
  80. package/lib/ProForm/components/base/RangePicker/index.d.ts +1 -0
  81. package/lib/ProForm/components/base/RangePicker/index.js +5 -3
  82. package/lib/ProForm/components/base/Select/index.d.ts +1 -0
  83. package/lib/ProForm/components/base/Select/index.js +4 -2
  84. package/lib/ProForm/components/base/Switch/index.d.ts +1 -0
  85. package/lib/ProForm/components/base/Switch/index.js +4 -2
  86. package/lib/ProForm/components/base/SwitchCheckbox/index.d.ts +1 -0
  87. package/lib/ProForm/components/base/SwitchCheckbox/index.js +4 -2
  88. package/lib/ProForm/components/base/TextArea/index.d.ts +1 -0
  89. package/lib/ProForm/components/base/TextArea/index.js +4 -3
  90. package/lib/ProForm/components/base/TimePicker/index.d.ts +1 -0
  91. package/lib/ProForm/components/base/TimePicker/index.js +4 -2
  92. package/lib/ProForm/components/combination/Container/index.js +7 -5
  93. package/lib/ProForm/components/combination/FormList/index.js +6 -5
  94. package/lib/ProForm/components/combination/Group/index.js +6 -3
  95. package/lib/ProForm/components/combination/ProAddressBar/index.js +29 -30
  96. package/lib/ProForm/components/combination/ProCombination/index.js +11 -11
  97. package/lib/ProForm/components/combination/ProModalSelect/index.js +4 -5
  98. package/lib/ProForm/components/combination/ProModalSelect/style/index.less +1 -1
  99. package/lib/ProForm/components/combination/ProNumberRange/index.d.ts +1 -1
  100. package/lib/ProForm/components/combination/ProNumberRange/index.js +7 -7
  101. package/lib/ProForm/components/combination/ProRangeLimit/index.d.ts +1 -0
  102. package/lib/ProForm/components/combination/ProRangeLimit/index.js +4 -2
  103. package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +1 -0
  104. package/lib/ProForm/components/combination/ProTimeLimit/index.js +4 -2
  105. package/lib/ProForm/components/render/Render.js +53 -21
  106. package/lib/ProForm/components/render/RenderFields.d.ts +1 -0
  107. package/lib/ProForm/components/render/RenderFields.js +12 -11
  108. package/lib/ProForm/index.js +5 -2
  109. package/lib/ProForm/propsType.d.ts +1 -0
  110. package/lib/ProForm/style/index.less +49 -42
  111. package/lib/ProForm/utils/contrastOriginal.d.ts +10 -1
  112. package/lib/ProForm/utils/contrastOriginal.js +14 -17
  113. package/lib/ProForm/utils/useChanged.d.ts +15 -1
  114. package/lib/ProForm/utils/useChanged.js +27 -8
  115. package/lib/ProLayout/components/ProHeader/index.js +1 -0
  116. package/lib/ProLayout/components/ProHeader/style/index.less +7 -0
  117. package/lib/ProSelect/index.js +6 -3
  118. package/lib/ProStep/components/Item/index.js +1 -4
  119. package/lib/ProTable/components/RenderColumn/index.js +1 -1
  120. package/lib/ProTable/style/index.less +6 -0
  121. package/lib/ProTabs/style/index.less +1 -1
  122. package/lib/ProThemeTools/component/PrdTools/index.js +21 -20
  123. package/lib/ProThemeTools/index.js +2 -1
  124. package/lib/ProTree/components/Tree.js +42 -41
  125. package/lib/ProTree/style/index.less +0 -6
  126. package/lib/ProTreeSelect/index.js +3 -2
  127. package/lib/locale/en_US.d.ts +15 -1
  128. package/lib/locale/en_US.js +17 -3
  129. package/lib/locale/zh_CN.d.ts +15 -1
  130. package/lib/locale/zh_CN.js +15 -1
  131. package/lib/style/theme/antd.less +8 -3
  132. package/package.json +1 -1
@@ -24,7 +24,8 @@ var RenderFields = function RenderFields(props) {
24
24
  originalValues = props.originalValues,
25
25
  outerClearNotShow = props.clearNotShow,
26
26
  requiredOnView = props.requiredOnView,
27
- required = props.required;
27
+ required = props.required,
28
+ originalTip = props.originalTip;
28
29
  // 是否包含隐藏字段
29
30
  var hiddenData = columns.filter(function (item) {
30
31
  return Array.isArray(item.hiddenNames);
@@ -119,10 +120,10 @@ var RenderFields = function RenderFields(props) {
119
120
  }
120
121
  }
121
122
  var label = formItemChildProps.label,
122
- comDisabled = formItemChildProps.disabled,
123
123
  placeholder = formItemChildProps.placeholder,
124
124
  dataSource = formItemChildProps.dataSource;
125
125
  var formLabel = _formItemProps.label;
126
+ var comDisabled = formItemChildProps.disabled || fieldProps.disabled || disabled;
126
127
  var _disabled = comDisabled === undefined ? formDisabled : comDisabled;
127
128
  // 当前组件是不是一个选择组件
128
129
  var _isSelect = isSelect({
@@ -131,17 +132,16 @@ var RenderFields = function RenderFields(props) {
131
132
  });
132
133
  var _placeholder = placeholder || "".concat(_isSelect ? "".concat(locale.ProForm.selectPlaceHolder) : "".concat(locale.ProForm.inputPlaceholder)).concat(label || formLabel || '');
133
134
  // 表单组件Props 兼容2.0版本
134
- var _fieldProps = _objectSpread(_objectSpread({
135
- disabled: disabled
136
- }, formItemChildProps), fieldProps);
135
+ var _fieldProps = _objectSpread(_objectSpread({}, formItemChildProps), fieldProps);
137
136
  if (isBoolean(formDisabled)) {
138
137
  _fieldProps.disabled = formDisabled;
139
138
  }
140
- var componentProps = _objectSpread({
141
- disabled: _disabled,
142
- placeholder: _placeholder,
139
+ var componentProps = _objectSpread(_objectSpread({
143
140
  disabledStrictly: true
144
- }, _fieldProps);
141
+ }, _fieldProps), {}, {
142
+ disabled: _disabled,
143
+ placeholder: _placeholder
144
+ });
145
145
  // switch与SwitchCheckbox单独添加valuePropName
146
146
  if (['Switch', 'SwitchCheckbox'].includes(_type)) {
147
147
  _formItemProps.valuePropName = 'checked';
@@ -159,7 +159,7 @@ var RenderFields = function RenderFields(props) {
159
159
  var otherProps = {
160
160
  label: _formItemProps.label,
161
161
  name: _formItemProps.name,
162
- disabled: formDisabled,
162
+ disabled: _disabled,
163
163
  isView: _isView,
164
164
  viewEmpty: viewEmpty,
165
165
  valueType: valueType,
@@ -194,7 +194,8 @@ var RenderFields = function RenderFields(props) {
194
194
  isSelect: _isSelect,
195
195
  originalValues: originalValues,
196
196
  equalWith: equalWith,
197
- requiredOnView: requiredOnView
197
+ requiredOnView: requiredOnView,
198
+ originalTip: originalTip
198
199
  })
199
200
  }, "".concat(_formItemProps.name || _formItemProps.label).concat(index));
200
201
  });
@@ -12,7 +12,7 @@ import "antd/es/space/style";
12
12
  import _Space from "antd/es/space";
13
13
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
14
14
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
15
- var _excluded = ["mode", "span", "disabled", "isView", "columns", "footer", "onOk", "okText", "onCancel", "confirmLoading", "cancelText", "form", "children", "rowProps", "className", "expand", "expandOpen", "expandOpenChange", "viewEmpty", "labelAlign", "labelWidth", "onValuesChange", "onFinish", "originalValues", "submitOnEnter", "clearNotShow", "initialValues", "requiredOnView", "formId", "required"];
15
+ var _excluded = ["mode", "span", "disabled", "isView", "columns", "footer", "onOk", "okText", "onCancel", "confirmLoading", "cancelText", "form", "children", "rowProps", "className", "expand", "expandOpen", "expandOpenChange", "viewEmpty", "labelAlign", "labelWidth", "onValuesChange", "onFinish", "originalValues", "submitOnEnter", "clearNotShow", "initialValues", "requiredOnView", "formId", "required", "originalTip"];
16
16
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
17
17
  import { DoubleLeftOutlined } from '@ant-design/icons';
18
18
  import classnames from 'classnames';
@@ -63,6 +63,8 @@ var ProForm = function ProForm(props, ref) {
63
63
  requiredOnView = _props$requiredOnView === void 0 ? true : _props$requiredOnView,
64
64
  formId = props.formId,
65
65
  required = props.required,
66
+ _props$originalTip = props.originalTip,
67
+ originalTip = _props$originalTip === void 0 ? true : _props$originalTip,
66
68
  otherProps = _objectWithoutProperties(props, _excluded);
67
69
  var _useForm = useForm(originForm),
68
70
  _useForm2 = _slicedToArray(_useForm, 1),
@@ -221,7 +223,8 @@ var ProForm = function ProForm(props, ref) {
221
223
  originalValues: originalValues,
222
224
  clearNotShow: clearNotShow,
223
225
  requiredOnView: requiredOnView,
224
- required: required
226
+ required: required,
227
+ originalTip: originalTip
225
228
  }), children, footerRender()]
226
229
  }))
227
230
  }));
@@ -66,6 +66,7 @@ export interface ProFormProps<Values = any> extends FormProps<Values> {
66
66
  requiredOnView?: boolean;
67
67
  formId?: string;
68
68
  required?: boolean;
69
+ originalTip?: boolean;
69
70
  }
70
71
  export interface Transform<T = any> {
71
72
  normalize?: (value: StoreValue, prevValue: StoreValue, allValues: Store) => StoreValue;
@@ -17,11 +17,11 @@
17
17
  }
18
18
 
19
19
  .pro-form-custom-footer {
20
- display : flex;
21
- align-items : center;
20
+ display: flex;
21
+ align-items: center;
22
+ height: auto;
22
23
  margin-bottom: 0;
23
- height : auto;
24
- padding-top : 6px;
24
+ padding-top: 6px;
25
25
 
26
26
  .ant-space-align-center {
27
27
  align-items: normal;
@@ -45,17 +45,17 @@
45
45
  }
46
46
 
47
47
  span.ant-input-clear-icon {
48
- display : unset;
48
+ display: unset;
49
49
  visibility: hidden;
50
50
  }
51
51
 
52
52
  .ant-input-affix-wrapper:hover span.ant-input-clear-icon {
53
- display : unset;
53
+ display: unset;
54
54
  visibility: unset;
55
55
  }
56
56
 
57
57
  .ant-input-affix-wrapper:hover span.ant-input-clear-icon[class~='ant-input-clear-icon-hidden'] {
58
- display : unset;
58
+ display: unset;
59
59
  visibility: hidden;
60
60
  }
61
61
 
@@ -90,7 +90,7 @@
90
90
  // 展开折叠按钮
91
91
  .expand-button {
92
92
  line-height: 32px;
93
- cursor : pointer;
93
+ cursor: pointer;
94
94
 
95
95
  .rotate-to-top {
96
96
  transform: rotate(90deg);
@@ -116,24 +116,32 @@
116
116
 
117
117
  .ant-form-item-tooltip {
118
118
  svg {
119
- width : 14px;
120
- height : 14px;
119
+ width: 14px;
120
+ height: 14px;
121
121
  vertical-align: bottom;
122
- fill : @zaui-aide-text;
122
+ fill: @zaui-aide-text;
123
123
  }
124
124
  }
125
125
 
126
126
  // 比较原始值场景下 不同时候的样式
127
127
  &.pro-form-item-changed {
128
-
129
128
  span.ant-input-affix-wrapper,
130
129
  .ant-select-selector,
131
130
  .ant-picker {
132
- background: @zaui-contract-bg;
131
+ background: @zaui-contract-bg !important;
133
132
 
134
133
  input {
135
134
  background: @zaui-contract-bg;
136
135
  }
136
+ .ant-select-selection-placeholder {
137
+ z-index: 9;
138
+ }
139
+ }
140
+
141
+ .ant-form-item-control-input-content > span {
142
+ background: @zaui-contract-bg;
143
+ padding: 4px 8px;
144
+ border-radius: 4px;
137
145
  }
138
146
  }
139
147
 
@@ -168,9 +176,9 @@
168
176
  }
169
177
 
170
178
  .range-right {
171
- width : 100%;
172
- border : 1px solid @zaui-form-control-line;
173
- border-top-left-radius : 0;
179
+ width: 100%;
180
+ border: 1px solid @zaui-form-control-line;
181
+ border-top-left-radius: 0;
174
182
  border-bottom-left-radius: 0;
175
183
  }
176
184
  }
@@ -182,7 +190,7 @@
182
190
  }
183
191
 
184
192
  .ant-form-item-label {
185
- >label {
193
+ > label {
186
194
  white-space: pre-wrap;
187
195
  }
188
196
  }
@@ -193,7 +201,7 @@
193
201
 
194
202
  .ant-form-item-has-error {
195
203
  .group-separator {
196
- color : var(--ant-error-color);
204
+ color: var(--ant-error-color);
197
205
  border-color: var(--ant-error-color);
198
206
  }
199
207
 
@@ -203,10 +211,9 @@
203
211
  }
204
212
 
205
213
  .site-input-group-wrapper {
206
-
207
214
  // 范围值表单样式
208
215
  & .site-input-split {
209
- text-align : center;
216
+ text-align: center;
210
217
  background-color: @zaui-table-strip-bg;
211
218
 
212
219
  &.site-input-split-disabled {
@@ -252,33 +259,33 @@
252
259
  }
253
260
  }
254
261
 
255
- &.ant-input-group.ant-input-group-compact>*:not(:last-child) {
262
+ &.ant-input-group.ant-input-group-compact > *:not(:last-child) {
256
263
  margin-right: 0;
257
264
  }
258
265
 
259
- >*:first-child {
260
- border-top-right-radius : 0 !important;
266
+ > *:first-child {
267
+ border-top-right-radius: 0 !important;
261
268
  border-bottom-right-radius: 0 !important;
262
269
 
263
- >.ant-select-selector {
264
- border-top-right-radius : 0 !important;
270
+ > .ant-select-selector {
271
+ border-top-right-radius: 0 !important;
265
272
  border-bottom-right-radius: 0 !important;
266
273
  }
267
274
  }
268
275
 
269
- >*:last-child {
270
- border-top-left-radius : 0 !important;
276
+ > *:last-child {
277
+ border-top-left-radius: 0 !important;
271
278
  border-bottom-left-radius: 0 !important;
272
279
 
273
- >.ant-select-selector {
274
- border-top-left-radius : 0 !important;
280
+ > .ant-select-selector {
281
+ border-top-left-radius: 0 !important;
275
282
  border-bottom-left-radius: 0 !important;
276
283
  }
277
284
  }
278
285
  }
279
286
 
280
- .ant-input-group.ant-input-group-compact>* {
281
- float : none;
287
+ .ant-input-group.ant-input-group-compact > * {
288
+ float: none;
282
289
  vertical-align: top;
283
290
  }
284
291
 
@@ -287,17 +294,17 @@
287
294
  }
288
295
 
289
296
  .noDisabled {
290
- color : @zaui-disabled-text;
291
- font-size : var(--zaui-font-size, 14px);
297
+ color: @zaui-disabled-text;
298
+ font-size: var(--zaui-font-size, 14px);
292
299
  background-color: transparent;
293
- border : none;
294
- cursor : default;
295
- opacity : 1;
300
+ border: none;
301
+ cursor: default;
302
+ opacity: 1;
296
303
  }
297
304
 
298
305
  div.pro-form-custom-footer {
299
- width : unset !important;
300
- height : 32px;
306
+ width: unset !important;
307
+ height:32px;
301
308
  margin-bottom: calc(var(--zaui-height-size-md, 16px) * var(--zaui-size, 1));
302
309
 
303
310
  &.pro-form-custom-footer-hidden {
@@ -306,14 +313,14 @@
306
313
  }
307
314
 
308
315
  .pro-form-view-container {
309
- display : inline-block;
310
- color : var(--zaui-text, #343434);
316
+ display: inline-block;
317
+ color: var(--zaui-text, #343434);
311
318
  word-break: break-all;
312
319
  }
313
320
 
314
321
  .pro-form-view-container_nowrap {
315
- overflow : hidden;
316
- white-space : nowrap;
322
+ overflow: hidden;
323
+ white-space: nowrap;
317
324
  text-overflow: ellipsis;
318
325
  }
319
326
 
@@ -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 {};
@@ -1,28 +1,25 @@
1
- import { get, isEqual, isFunction } from 'lodash';
1
+ import { isEqual, isFunction } from 'lodash';
2
2
  var nullValue = [null, undefined, '']; // 输入框空值时可能存在的三种值 视为相等
3
- export var contrastOriginal = function contrastOriginal(name, names, originValues, currentValue, fun) {
3
+ export var contrastOriginal = function contrastOriginal(params) {
4
+ var originalValue = params.originalValue,
5
+ originalValues = params.originalValues,
6
+ value = params.value,
7
+ equalWith = params.equalWith;
4
8
  // 支持传入自定义比较事件
5
- if (isFunction(fun)) {
6
- if (names === null || names === void 0 ? void 0 : names.length) {
7
- var originVal = names.map(function (key) {
8
- return get(originValues, key);
9
- });
10
- return !fun(originVal, currentValue);
11
- }
12
- return !fun(get(originValues, name), currentValue);
9
+ if (isFunction(equalWith)) {
10
+ return !equalWith(originalValue, value);
13
11
  }
14
- if (names === null || names === void 0 ? void 0 : names.length) {
15
- return names.some(function (nameItem, index) {
16
- var originalValue = get(originValues, nameItem);
17
- if (!nullValue.includes(currentValue === null || currentValue === void 0 ? void 0 : currentValue[index]) || !nullValue.includes(originalValue)) {
18
- return !isEqual(currentValue === null || currentValue === void 0 ? void 0 : currentValue[index], get(originValues, nameItem));
12
+ if (Array.isArray(originalValue)) {
13
+ return originalValue.some(function (valueItem, index) {
14
+ // 如果两个值有一个不是空值, 则进行深比较
15
+ if (!nullValue.includes(value === null || value === void 0 ? void 0 : value[index]) || !nullValue.includes(valueItem)) {
16
+ return !isEqual(value === null || value === void 0 ? void 0 : value[index], valueItem);
19
17
  }
20
18
  return false;
21
19
  });
22
20
  }
23
- var originalValue = get(originValues, name);
24
- if (!nullValue.includes(currentValue) || !nullValue.includes(originalValue)) {
25
- return !isEqual(currentValue, get(originValues, name));
21
+ if (!nullValue.includes(value) || !nullValue.includes(originalValue)) {
22
+ return !isEqual(value, originalValue);
26
23
  }
27
24
  return false;
28
25
  };
@@ -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 {};
@@ -2,13 +2,32 @@ import "antd/es/form/style";
2
2
  import _Form from "antd/es/form";
3
3
  import { get } from 'lodash';
4
4
  import { contrastOriginal } from './contrastOriginal';
5
- export var useChanged = function useChanged(name, names, nameStr, originalValues, form, fun) {
5
+ export var useChanged = function useChanged(params) {
6
+ var name = params.name,
7
+ names = params.names,
8
+ namesStr = params.namesStr,
9
+ _params$originalName = params.originalName,
10
+ originalName = _params$originalName === void 0 ? name : _params$originalName,
11
+ _params$originalNames = params.originalNames,
12
+ originalNames = _params$originalNames === void 0 ? names : _params$originalNames,
13
+ originalValues = params.originalValues,
14
+ form = params.form,
15
+ equalWith = params.equalWith;
6
16
  var _form = form;
7
- if (!originalValues || get(originalValues, nameStr || name) === undefined) {
8
- _form = [];
9
- return false;
10
- }
11
- var value = _Form.useWatch(nameStr || name, _form);
12
- var changed = contrastOriginal(name, names, originalValues, value, fun);
13
- return changed;
17
+ var originalValue = (originalNames === null || originalNames === void 0 ? void 0 : originalNames.length) ? originalNames.map(function (originalName) {
18
+ return get(originalValues, originalName);
19
+ }) : get(originalValues, originalName);
20
+ var notWatch = !originalValues || originalValue === undefined;
21
+ // @ts-ignore
22
+ if (notWatch) _form = [];
23
+ var value = _Form.useWatch(namesStr || name, _form);
24
+ if (notWatch) return [false];
25
+ var changed = contrastOriginal({
26
+ value: value,
27
+ originalValue: originalValue,
28
+ originalValues: originalValues,
29
+ form: form,
30
+ equalWith: equalWith
31
+ });
32
+ return [changed, originalValue];
14
33
  };
@@ -373,6 +373,7 @@ var ProHeader = function ProHeader(props) {
373
373
  'pro-header-fixed': fixedTop,
374
374
  'pro-header-shadow': showShadow,
375
375
  'pro-header-no-back': !backState,
376
+ 'pro-header-has-describe': !isEmpty(_subDescribeColumns) || !isEmpty(describeColumns) || !isEmpty(describeColumns),
376
377
  'pro-header-no-describe': isEmpty(_subDescribeColumns) && isEmpty(describeColumns) || isEmpty(describeColumns)
377
378
  }, "".concat(className), className));
378
379
  if (title && !isEmpty(_breadcrumbColumns)) {
@@ -4,6 +4,12 @@
4
4
  background-color: var(--zaui-base-bg, #ffffff);
5
5
  padding : 24px 0 0 0;
6
6
 
7
+ &.pro-header-no-back.pro-header-has-describe {
8
+ .pro-header-top {
9
+ padding-left: var(--zaui-space-size-md, 16px);
10
+ }
11
+ }
12
+
7
13
  &.pro-header-no-back {
8
14
  .pro-header-top {
9
15
  padding-left: 0;
@@ -106,6 +112,7 @@
106
112
 
107
113
  .ant-breadcrumb-link {
108
114
  font-size: var(--zaui-font-size-xl, 18px);
115
+ display : inline-flex;
109
116
  }
110
117
 
111
118
  .ant-breadcrumb-separator {
@@ -9,7 +9,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
9
9
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
10
10
  import "antd/es/select/style";
11
11
  import _Select from "antd/es/select";
12
- var _excluded = ["dataSource", "defaultDisableValue", "useRequest", "fieldNames", "tooltip", "otherProps", "labelInValue", "scrollFollowParent", "defaultOne", "onSearch", "optionRender", "onChange", "updateDataSource", "transformResponse"];
12
+ var _excluded = ["dataSource", "defaultDisableValue", "useRequest", "fieldNames", "tooltip", "otherProps", "labelInValue", "scrollFollowParent", "defaultOne", "onSearch", "optionRender", "onChange", "updateDataSource", "transformResponse", "isView"];
13
13
  import { jsx as _jsx } from "react/jsx-runtime";
14
14
  import { useDeepCompareEffect, useRequest as useRequestFunc } from 'ahooks';
15
15
  import React, { useImperativeHandle, useState, forwardRef } from 'react';
@@ -17,6 +17,7 @@ import { isFunction, isObject, isString, omit, cloneDeep } from 'lodash';
17
17
  import { useProConfig } from '../ProConfigProvider';
18
18
  import Container from '../ProForm/components/Container';
19
19
  import AdaptiveTooltip from './components/AdaptiveTooltip';
20
+ import { ProForm } from '..';
20
21
  import locale from '../locale';
21
22
  import './index.less';
22
23
  var Option = _Select.Option;
@@ -48,11 +49,13 @@ export var ProSelect = function ProSelect(props, ref) {
48
49
  onChange = props.onChange,
49
50
  updateDataSource = props.updateDataSource,
50
51
  transformResponse = props.transformResponse,
52
+ isViewPro = props.isView,
51
53
  selectProps = _objectWithoutProperties(props, _excluded);
52
54
  var value = props.value;
53
- var _ref2 = otherProps || {},
54
- isView = _ref2.isView,
55
+ var _ref2 = ProForm.useFieldProps() || {},
56
+ isViewCon = _ref2.isView,
55
57
  viewEmpty = _ref2.viewEmpty;
58
+ var isView = typeof props.isView === 'boolean' ? props.isView : isViewCon; // 组件可直接接收isView参数, 优先级高
56
59
  if (fieldNames && Object.keys(fieldNames).length) {
57
60
  code = fieldNames.value;
58
61
  label = fieldNames.label;
@@ -26,9 +26,6 @@ export default (function (_ref) {
26
26
  title: title
27
27
  }, restProps), {}, {
28
28
  children: children
29
- })) : _jsx("div", {
30
- id: id,
31
- children: children
32
- })
29
+ })) : children
33
30
  });
34
31
  });
@@ -86,6 +86,6 @@ var RenderColumn = function RenderColumn(props) {
86
86
  children: node
87
87
  }) : '-';
88
88
  }
89
- return value ? node : '-';
89
+ return value || value === 0 ? node : '-';
90
90
  };
91
91
  export default RenderColumn;
@@ -54,6 +54,12 @@
54
54
  }
55
55
  }
56
56
 
57
+ .ant-table-tbody {
58
+ .ant-table-cell-fix-left, .ant-table-cell-fix-right {
59
+ background: unset !important;
60
+ }
61
+ }
62
+
57
63
  .ant-table-body {
58
64
  .ant-table-cell .varied-cell {
59
65
  margin-left: -8px;
@@ -1,6 +1,6 @@
1
1
  .pro-tabs {
2
2
  .ant-tabs .ant-tabs-nav-list .ant-tabs-tab {
3
- padding: 0;
3
+ padding: 0 !important;
4
4
  }
5
5
 
6
6
  .ant-tabs-top>.ant-tabs-nav::before,