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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/dist/index.esm.css +7 -4
  2. package/es/ProDrawerForm/index.js +1 -15
  3. package/es/ProEditTable/components/RenderField/index.js +6 -4
  4. package/es/ProEditTable/index.js +26 -16
  5. package/es/ProEditTable/style/index.less +8 -6
  6. package/es/ProForm/components/base/SwitchCheckbox/style/index.less +3 -0
  7. package/es/ProForm/components/base/TextArea/index.less +3 -2
  8. package/es/ProForm/components/base/TimePicker/style/index.less +3 -0
  9. package/es/ProForm/components/combination/Container/style/index.less +3 -0
  10. package/es/ProForm/components/combination/FormList/style/index.less +3 -0
  11. package/es/ProForm/components/combination/Group/style/index.less +3 -0
  12. package/es/ProForm/components/combination/ProAddressBar/style/index.less +3 -0
  13. package/es/ProForm/components/combination/ProCombination/style/index.less +3 -0
  14. package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +6 -1
  15. package/es/ProForm/components/combination/ProModalSelect/index.js +22 -24
  16. package/es/ProForm/components/combination/ProModalSelect/style/index.less +3 -0
  17. package/es/ProForm/components/combination/ProNumberRange/style/index.less +3 -0
  18. package/es/ProForm/components/combination/ProTimeLimit/style/index.less +3 -0
  19. package/es/ProForm/components/render/RenderFields.js +1 -2
  20. package/es/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +3 -0
  21. package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +3 -0
  22. package/es/ProLayout/components/Layout/Menu/SideMenu/style/index.less +3 -0
  23. package/es/ProLayout/components/Layout/Menu/style/index.less +2 -0
  24. package/es/ProLayout/components/Layout/Notice/style/index.less +3 -0
  25. package/es/ProLayout/components/ProCollapse/style/index.less +3 -0
  26. package/es/ProLayout/components/ProFooter/style/index.less +3 -0
  27. package/es/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +3 -0
  28. package/es/ProLayout/components/ProHeader/style/index.less +2 -0
  29. package/es/ProStep/index.js +2 -2
  30. package/es/ProTable/index.js +12 -4
  31. package/es/ProTable/style/index.less +8 -0
  32. package/es/ProTable/utils.d.ts +1 -1
  33. package/es/ProTable/utils.js +38 -19
  34. package/es/ProTree/components/ProTree.js +27 -11
  35. package/es/ProTree/components/Tree.js +1 -1
  36. package/es/ProTree/propsType.d.ts +2 -2
  37. package/es/ProTree/utils.d.ts +6 -0
  38. package/es/ProTree/utils.js +11 -0
  39. package/es/ProTreeSelect/index.js +6 -4
  40. package/es/ProTreeSelect/propsType.d.ts +2 -0
  41. package/es/ProUpload/components/ImageRender.js +5 -1
  42. package/es/ProUpload/style/index.less +6 -0
  43. package/es/locale/en_US.d.ts +1 -0
  44. package/es/locale/en_US.js +2 -1
  45. package/es/locale/zh_CN.d.ts +1 -0
  46. package/es/locale/zh_CN.js +2 -1
  47. package/lib/ProDrawerForm/index.js +0 -14
  48. package/lib/ProEditTable/components/RenderField/index.js +6 -4
  49. package/lib/ProEditTable/index.js +26 -16
  50. package/lib/ProEditTable/style/index.less +8 -6
  51. package/lib/ProForm/components/base/SwitchCheckbox/style/index.less +3 -0
  52. package/lib/ProForm/components/base/TextArea/index.less +3 -2
  53. package/lib/ProForm/components/base/TimePicker/style/index.less +3 -0
  54. package/lib/ProForm/components/combination/Container/style/index.less +3 -0
  55. package/lib/ProForm/components/combination/FormList/style/index.less +3 -0
  56. package/lib/ProForm/components/combination/Group/style/index.less +3 -0
  57. package/lib/ProForm/components/combination/ProAddressBar/style/index.less +3 -0
  58. package/lib/ProForm/components/combination/ProCombination/style/index.less +3 -0
  59. package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +7 -1
  60. package/lib/ProForm/components/combination/ProModalSelect/index.js +22 -24
  61. package/lib/ProForm/components/combination/ProModalSelect/style/index.less +3 -0
  62. package/lib/ProForm/components/combination/ProNumberRange/style/index.less +3 -0
  63. package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +3 -0
  64. package/lib/ProForm/components/render/RenderFields.js +1 -2
  65. package/lib/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +3 -0
  66. package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +3 -0
  67. package/lib/ProLayout/components/Layout/Menu/SideMenu/style/index.less +3 -0
  68. package/lib/ProLayout/components/Layout/Menu/style/index.less +2 -0
  69. package/lib/ProLayout/components/Layout/Notice/style/index.less +3 -0
  70. package/lib/ProLayout/components/ProCollapse/style/index.less +3 -0
  71. package/lib/ProLayout/components/ProFooter/style/index.less +3 -0
  72. package/lib/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +3 -0
  73. package/lib/ProLayout/components/ProHeader/style/index.less +2 -0
  74. package/lib/ProStep/index.js +1 -1
  75. package/lib/ProTable/index.js +11 -3
  76. package/lib/ProTable/style/index.less +8 -0
  77. package/lib/ProTable/utils.d.ts +1 -1
  78. package/lib/ProTable/utils.js +38 -19
  79. package/lib/ProTree/components/ProTree.js +26 -10
  80. package/lib/ProTree/components/Tree.js +1 -1
  81. package/lib/ProTree/propsType.d.ts +2 -2
  82. package/lib/ProTree/utils.d.ts +6 -0
  83. package/lib/ProTree/utils.js +12 -0
  84. package/lib/ProTreeSelect/index.js +6 -4
  85. package/lib/ProTreeSelect/propsType.d.ts +2 -0
  86. package/lib/ProUpload/components/ImageRender.js +5 -1
  87. package/lib/ProUpload/style/index.less +6 -0
  88. package/lib/locale/en_US.d.ts +1 -0
  89. package/lib/locale/en_US.js +2 -1
  90. package/lib/locale/zh_CN.d.ts +1 -0
  91. package/lib/locale/zh_CN.js +2 -1
  92. package/package.json +1 -1
  93. package/typings.d.ts +0 -6
@@ -3027,6 +3027,9 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
3027
3027
  -ms-flex-pack: center;
3028
3028
  justify-content: center;
3029
3029
  }
3030
+ .proupload-modal-preview .ant-modal {
3031
+ width: 600px;
3032
+ }
3030
3033
  .pro-tree-select .ant-select-selector .check-mark-icon {
3031
3034
  display: none;
3032
3035
  }
@@ -4062,6 +4065,10 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
4062
4065
  line-height: 1;
4063
4066
  content: "*";
4064
4067
  }
4068
+ .pro-edit-table .ant-table-scroll-horizontal .ant-table-cell-fix-right-first::after {
4069
+ -webkit-box-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, 0.15);
4070
+ box-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, 0.15);
4071
+ }
4065
4072
  .pro-edit-table .ant-table-content > table .ant-table-summary {
4066
4073
  background-color: var(--zaui-table-header-bg, #f2f3f5);
4067
4074
  color: var(--zaui-text, #343434);
@@ -4071,10 +4078,6 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
4071
4078
  .pro-edit-table .ant-table-content > table .ant-table-summary .ant-table-cell-fix-right {
4072
4079
  background-color: var(--zaui-table-header-bg, #f2f3f5);
4073
4080
  }
4074
- .pro-edit-table .ant-table-content > table .ant-table-cell-fix-right-first::after {
4075
- -webkit-box-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, 0.15);
4076
- box-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, 0.15);
4077
- }
4078
4081
  .pro-edit-table .ant-table-content > table th.ant-table-selection-column {
4079
4082
  width: 48px;
4080
4083
  }
@@ -2,7 +2,7 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
3
  var _locale$ProDrawerForm3;
4
4
  import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
5
- import { forwardRef, useEffect, useImperativeHandle, useMemo } from 'react';
5
+ import { forwardRef, useImperativeHandle, useMemo } from 'react';
6
6
  import { ProDrawer, ProModal } from './components';
7
7
  import ProForm from '../ProForm';
8
8
  import { transformBySize } from './utils';
@@ -50,20 +50,6 @@ var ProDrawerForm = /*#__PURE__*/forwardRef(function (props, ref) {
50
50
  Modal: ProModal
51
51
  }[showType];
52
52
  }, [showType]);
53
- var removeStyle = function removeStyle() {
54
- var styleTags = document.getElementsByTagName('style');
55
- for (var i = 0; i < styleTags.length; i++) {
56
- var rcUtilKey = styleTags[i].getAttribute('rc-util-key');
57
- if ((rcUtilKey === null || rcUtilKey === void 0 ? void 0 : rcUtilKey.indexOf('rc-util-locker')) === 0) {
58
- styleTags[i].remove();
59
- }
60
- }
61
- };
62
- useEffect(function () {
63
- if (!visible) {
64
- removeStyle();
65
- }
66
- }, [visible]);
67
53
  return _jsx(_Fragment, {
68
54
  children: visible ? _jsx(Com, _objectSpread(_objectSpread({}, props), {}, {
69
55
  isView: isView,
@@ -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, {
@@ -10,7 +10,7 @@ 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
15
  import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useRef } from 'react';
16
16
  import { isArray } from 'lodash';
@@ -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();
@@ -97,21 +98,13 @@ var ProEditTable = function ProEditTable(_ref, ref) {
97
98
  'pro-table-no-stripe': !stripe,
98
99
  className: className
99
100
  });
100
- // 编辑行设置下样式
101
- var _rowClassName = function _rowClassName(record) {
102
- return !virtualKey || editingKeys.includes(record.rowKey) ? 'is-editing' : '';
103
- };
104
- // 复选框
105
- var _rowSelection = _objectSpread({
106
- fixed: true,
107
- selectedRowKeys: selectedRowKeys,
108
- onChange: function onChange(selectedRowKeys, selectedRows) {
109
- setState({
110
- selectedRowKeys: selectedRowKeys,
111
- selectedRows: selectedRows
112
- });
101
+ var getRowKey = function getRowKey(record) {
102
+ var key = record.rowKey || getRandom();
103
+ if (rowKey) {
104
+ key = typeof rowKey === 'function' ? rowKey(record) : record[rowKey];
113
105
  }
114
- }, rowSelection);
106
+ return key;
107
+ };
115
108
  var config = {
116
109
  form: form,
117
110
  mode: mode,
@@ -144,6 +137,23 @@ var ProEditTable = function ProEditTable(_ref, ref) {
144
137
  originalTip: originalTip,
145
138
  prefixCls: prefixCls
146
139
  };
140
+ // 编辑行设置下样式
141
+ var _rowClassName = function _rowClassName(record) {
142
+ var isEdit = !virtualKey || editingKeys.includes(record.rowKey);
143
+ var className = isEdit ? 'is-editing' : '';
144
+ return className;
145
+ };
146
+ // 复选框
147
+ var _rowSelection = _objectSpread({
148
+ fixed: true,
149
+ selectedRowKeys: selectedRowKeys,
150
+ onChange: function onChange(selectedRowKeys, selectedRows) {
151
+ setState({
152
+ selectedRowKeys: selectedRowKeys,
153
+ selectedRows: selectedRows
154
+ });
155
+ }
156
+ }, rowSelection);
147
157
  // 判断是否禁止添加、批量删除
148
158
  var isForbiddenBtn = useCallback(function (type) {
149
159
  // 当工具栏不渲染时,都不渲染
@@ -237,7 +247,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
237
247
  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)) {
238
248
  var nextValues = value === null || value === void 0 ? void 0 : value.map(function (item) {
239
249
  return _objectSpread(_objectSpread({}, item), {}, {
240
- rowKey: getRandom()
250
+ rowKey: getRowKey(item)
241
251
  });
242
252
  });
243
253
  onChange(nextValues);
@@ -133,6 +133,14 @@
133
133
  }
134
134
  }
135
135
 
136
+ .@{ant-prefix}-table-scroll-horizontal {
137
+ .@{ant-prefix}-table-cell-fix-right-first {
138
+ &::after {
139
+ box-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, 0.15);
140
+ }
141
+ }
142
+ }
143
+
136
144
  .@{ant-prefix}-table-content {
137
145
  >table {
138
146
  .@{ant-prefix}-table-summary {
@@ -147,12 +155,6 @@
147
155
  }
148
156
  }
149
157
 
150
- .@{ant-prefix}-table-cell-fix-right-first {
151
- &::after {
152
- box-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, 0.15);
153
- }
154
- }
155
-
156
158
  th.@{ant-prefix}-table-selection-column {
157
159
  width: 48px;
158
160
  }
@@ -1,3 +1,6 @@
1
+ @root-entry-name: 'default';
2
+ @import (reference) '~antd/es/style/themes/index.less';
3
+
1
4
  .switch-checkbox-view {
2
5
  display : flex;
3
6
  align-items: center;
@@ -1,5 +1,6 @@
1
- .pro-textarea {
2
- }
1
+ @root-entry-name: 'default';
2
+ @import (reference) '~antd/es/style/themes/index.less';
3
+
3
4
  div.pro-textarea-view {
4
5
  .@{ant-prefix}-input-disabled {
5
6
  background: transparent !important;
@@ -1,3 +1,6 @@
1
+ @root-entry-name: 'default';
2
+ @import (reference) '~antd/es/style/themes/index.less';
3
+
1
4
  .@{ant-prefix}-picker {
2
5
  display: flex;
3
6
  }
@@ -1,3 +1,6 @@
1
+ @root-entry-name: 'default';
2
+ @import (reference) '~antd/es/style/themes/index.less';
3
+
1
4
  .pro-container {
2
5
 
3
6
  &.pro-container-diy {
@@ -1,3 +1,6 @@
1
+ @root-entry-name: 'default';
2
+ @import (reference) '~antd/es/style/themes/index.less';
3
+
1
4
  .pro-form-list-block-title {
2
5
  height: 14px;
3
6
  margin: @zaui-space-size-xs 0;
@@ -1,3 +1,6 @@
1
+ @root-entry-name: 'default';
2
+ @import (reference) '~antd/es/style/themes/index.less';
3
+
1
4
  .border-radius(@start-end: 0, @end-end: 0, @start-start: 0, @end-start: 0) {
2
5
  border-start-end-radius : @start-end;
3
6
  border-end-end-radius : @end-end;
@@ -1,3 +1,6 @@
1
+ @root-entry-name: 'default';
2
+ @import (reference) '~antd/es/style/themes/index.less';
3
+
1
4
  .pro-address {
2
5
  display: flex;
3
6
  width: 100%;
@@ -1,3 +1,6 @@
1
+ @root-entry-name: 'default';
2
+ @import (reference) '~antd/es/style/themes/index.less';
3
+
1
4
  .pro-combination.@{ant-prefix}-input-group.@{ant-prefix}-input-group-compact {
2
5
  display: flex;
3
6
 
@@ -5,6 +5,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
5
5
  import { useDebounceFn, usePrevious, useRequest } from 'ahooks';
6
6
  import { isEqual } from 'lodash';
7
7
  import { useCallback, useEffect, useMemo, useState } from 'react';
8
+ import locale, { formatMessage } from '../../../../../locale';
8
9
  var defaultPage = {
9
10
  pageNum: 1,
10
11
  pageSize: 10
@@ -128,7 +129,11 @@ export function useRequestList(service, options, useRequestOptions) {
128
129
  onShowSizeChange: onChange,
129
130
  hideOnSinglePage: page.pageSize === 10,
130
131
  showTotal: function showTotal(total) {
131
- return "\u5171".concat(total, "\u6761");
132
+ var _locale$ProEditTable;
133
+ if (!total) return;
134
+ return formatMessage(locale === null || locale === void 0 ? void 0 : (_locale$ProEditTable = locale.ProEditTable) === null || _locale$ProEditTable === void 0 ? void 0 : _locale$ProEditTable.total, {
135
+ total: total
136
+ });
132
137
  }
133
138
  } : false
134
139
  });
@@ -419,19 +419,9 @@ var ProModalSelect = function ProModalSelect(props, ref) {
419
419
  useRequest.initParams = useRequest === null || useRequest === void 0 ? void 0 : useRequest.initParams(value, contentForm === null || contentForm === void 0 ? void 0 : (_contentForm$getField = contentForm.getFieldsValue) === null || _contentForm$getField === void 0 ? void 0 : _contentForm$getField.call(contentForm));
420
420
  }
421
421
  if (!((useRequest === null || useRequest === void 0 ? void 0 : useRequest.initParams) || defaultOne)) {
422
- _context4.next = 13;
422
+ _context4.next = 10;
423
423
  break;
424
424
  }
425
- if (readOnly) {
426
- _context4.next = 5;
427
- break;
428
- }
429
- setState({
430
- _value: value,
431
- isInit: false
432
- });
433
- return _context4.abrupt("return");
434
- case 5:
435
425
  queryBean = _objectSpread(_objectSpread({}, useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options2 = useRequest.options) === null || _useRequest$options2 === void 0 ? void 0 : _useRequest$options2.defaultParams), (useRequest === null || useRequest === void 0 ? void 0 : useRequest.initParams) || {});
436
426
  page = _objectSpread({
437
427
  pageNum: 1,
@@ -441,9 +431,9 @@ var ProModalSelect = function ProModalSelect(props, ref) {
441
431
  queryBean: queryBean !== null && queryBean !== void 0 ? queryBean : {}
442
432
  }) : queryBean;
443
433
  params = transformParams ? transformParams(params) : params;
444
- _context4.next = 11;
434
+ _context4.next = 8;
445
435
  return runAsync(params);
446
- case 11:
436
+ case 8:
447
437
  res = _context4.sent;
448
438
  if (res === null || res === void 0 ? void 0 : res.data) {
449
439
  list = [];
@@ -453,19 +443,27 @@ var ProModalSelect = function ProModalSelect(props, ref) {
453
443
  list = withPagination ? res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.list : res === null || res === void 0 ? void 0 : res.data;
454
444
  }
455
445
  _data2 = isMultiple ? list : (_list = list) === null || _list === void 0 ? void 0 : _list[0];
456
- nextSelectRowKeys = isMultiple ? value : [value];
457
- if (labelInValue) {
458
- onChange(_data2);
446
+ if (_data2) {
447
+ nextSelectRowKeys = isMultiple ? value : [value];
448
+ if (labelInValue) {
449
+ onChange(_data2);
450
+ }
451
+ // 更新内部展示值
452
+ setState({
453
+ _value: _data2,
454
+ isInit: false,
455
+ selectedRows: list,
456
+ selectedRowKeys: nextSelectRowKeys
457
+ });
458
+ } else if (!readOnly) {
459
+ // 当传入initParams且文本框非只读时,不调用接口获取初始化数据
460
+ setState({
461
+ _value: value,
462
+ isInit: false
463
+ });
459
464
  }
460
- // 更新内部展示值
461
- setState({
462
- _value: _data2,
463
- isInit: false,
464
- selectedRows: list,
465
- selectedRowKeys: nextSelectRowKeys
466
- });
467
465
  }
468
- case 13:
466
+ case 10:
469
467
  case "end":
470
468
  return _context4.stop();
471
469
  }
@@ -1,3 +1,6 @@
1
+ @root-entry-name: 'default';
2
+ @import (reference) '~antd/es/style/themes/index.less';
3
+
1
4
  .pro-modal-select,
2
5
  .pro-tree-modal {
3
6
  .@{ant-prefix}-input-group-wrapper {
@@ -1,3 +1,6 @@
1
+ @root-entry-name: 'default';
2
+ @import (reference) '~antd/es/style/themes/index.less';
3
+
1
4
  .pro-number-range {
2
5
 
3
6
  .range-split {
@@ -1,3 +1,6 @@
1
+ @root-entry-name: 'default';
2
+ @import (reference) '~antd/es/style/themes/index.less';
3
+
1
4
  .@{ant-prefix}-form-item-has-error {
2
5
  .@{ant-prefix}-picker-status-error
3
6
  ~ .forever-checkbox:not(.@{ant-prefix}-input-disabled):not(.@{ant-prefix}-input-borderless).@{ant-prefix}-input {
@@ -66,8 +66,7 @@ var RenderFields = function RenderFields(props) {
66
66
  formItemChildProps = _column$formItemChild === void 0 ? {} : _column$formItemChild,
67
67
  _column$fieldProps = column.fieldProps,
68
68
  fieldProps = _column$fieldProps === void 0 ? {} : _column$fieldProps,
69
- _column$disabled = column.disabled,
70
- disabled = _column$disabled === void 0 ? false : _column$disabled,
69
+ disabled = column.disabled,
71
70
  equalWith = column.equalWith,
72
71
  _column$clearNotShow = column.clearNotShow,
73
72
  clearNotShow = _column$clearNotShow === void 0 ? outerClearNotShow : _column$clearNotShow,
@@ -1,3 +1,6 @@
1
+ @root-entry-name: 'default';
2
+ @import (reference) '~antd/es/style/themes/index.less';
3
+
1
4
  .pro-layout-menu-fold-list {
2
5
  padding-top: 4px;
3
6
  overflow-y : auto;
@@ -1,3 +1,6 @@
1
+ @root-entry-name: 'default';
2
+ @import (reference) '~antd/es/style/themes/index.less';
3
+
1
4
  .pro-layout-open-menu {
2
5
  color: #fff;
3
6
 
@@ -1,3 +1,6 @@
1
+ @root-entry-name: 'default';
2
+ @import (reference) '~antd/es/style/themes/index.less';
3
+
1
4
  .pro-layout-sider-menu {
2
5
  width : 220px;
3
6
  background: #fff;
@@ -1,3 +1,5 @@
1
+ @root-entry-name: 'default';
2
+ @import (reference) '~antd/es/style/themes/index.less';
1
3
  @import "../FoldMenu/style/index.less";
2
4
  @import "../OpenMenu/style/index.less";
3
5
  @import "../SideMenu/style/index.less";
@@ -1,3 +1,6 @@
1
+ @root-entry-name: 'default';
2
+ @import (reference) '~antd/es/style/themes/index.less';
3
+
1
4
  /** 告知区 */
2
5
  .pro-layout-header-notice {
3
6
  position : fixed;
@@ -1,3 +1,6 @@
1
+ @root-entry-name: 'default';
2
+ @import (reference) '~antd/es/style/themes/index.less';
3
+
1
4
  .pro-collapse {
2
5
  background: #f6f8fc;
3
6
 
@@ -1,3 +1,6 @@
1
+ @root-entry-name: 'default';
2
+ @import (reference) '~antd/es/style/themes/index.less';
3
+
1
4
  .pro-footer {
2
5
  position: fixed;
3
6
  right: 0;
@@ -1,3 +1,6 @@
1
+ @root-entry-name: 'default';
2
+ @import (reference) '~antd/es/style/themes/index.less';
3
+
1
4
  .back-button-container {
2
5
  &.@{ant-prefix}-btn {
3
6
  color : var(--zaui-text);
@@ -1,3 +1,5 @@
1
+ @root-entry-name: 'default';
2
+ @import (reference) '~antd/es/style/themes/index.less';
1
3
  @import '../components/ProBackBtn/style/index';
2
4
 
3
5
  .pro-header {
@@ -7,7 +7,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
7
7
  var _excluded = ["children"];
8
8
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
9
  import { createContext, useContext, useEffect, useMemo, useState } from 'react';
10
- import { useEventEmitter, useSetState, useLocalStorageState } from 'ahooks';
10
+ import { useEventEmitter, useSetState, useLocalStorageState, useDeepCompareEffect } from 'ahooks';
11
11
  import { handleScroll } from './utils';
12
12
  import Step from './components/Step';
13
13
  import Item from './components/Item';
@@ -163,7 +163,7 @@ var ProStep = function ProStep(_ref) {
163
163
 
164
164
  observer.observe(targetElement, config);
165
165
  };
166
- useEffect(function () {
166
+ useDeepCompareEffect(function () {
167
167
  var errorModuleKeys = Object.keys(errorCollection).reverse();
168
168
  if (errorModuleKeys === null || errorModuleKeys === void 0 ? void 0 : errorModuleKeys.length) {
169
169
  var _dataSource$find;
@@ -12,7 +12,7 @@ var _excluded = ["tableId", "headerRender", "footerRender", "quickConfig", "stri
12
12
  _excluded2 = ["resizeColumn", "columnConfig", "cacheTime", "storage"];
13
13
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
14
14
  import { useEffect, useMemo, useState, createContext } from 'react';
15
- import { cloneDeep, get } from 'lodash';
15
+ import { cloneDeep, get, keyBy } from 'lodash';
16
16
  import { useDebounceEffect, useDeepCompareEffect } from 'ahooks';
17
17
  import { ReactSVG } from 'react-svg';
18
18
  import classnames from 'classnames';
@@ -72,7 +72,10 @@ function ProTable(props) {
72
72
  tableProps = _objectWithoutProperties(quickTableConfig, _excluded2);
73
73
  var _ref3 = tableProps || {},
74
74
  pagination = _ref3.pagination,
75
- dataSource = _ref3.dataSource;
75
+ dataSource = _ref3.dataSource,
76
+ rowKey = _ref3.rowKey;
77
+ var originalObj = originalDataSource ? keyBy(originalDataSource, rowKey) : undefined;
78
+ var dataSourceObj = dataSource ? keyBy(dataSource, rowKey) : {};
76
79
  var propsColumnObj = useMemo(function () {
77
80
  return propsColumns.reduce(function (acc, cur) {
78
81
  // @ts-ignore
@@ -163,7 +166,7 @@ function ProTable(props) {
163
166
  return !(item === null || item === void 0 ? void 0 : item.delete);
164
167
  });
165
168
  newColumns === null || newColumns === void 0 ? void 0 : newColumns.forEach(function (item) {
166
- formatColumn(item, originalDataSource);
169
+ formatColumn(item, originalObj, dataSourceObj, rowKey);
167
170
  });
168
171
  return newColumns;
169
172
  }, [curColumns, handleResize]);
@@ -326,7 +329,12 @@ function ProTable(props) {
326
329
  },
327
330
  summary: _typeof(summary) === 'object' ? function () {
328
331
  return renderSummary();
329
- } : summary
332
+ } : summary,
333
+ rowClassName: function rowClassName(record, index) {
334
+ if (originalDataSource && !originalObj.hasOwnProperty(get(record, rowKey))) {
335
+ return 'new-cell';
336
+ }
337
+ }
330
338
  }, tableProps)), _jsx(ResizableLine, {})]
331
339
  }), footerRender ? _jsx("div", {
332
340
  className: "pro-table-footer ".concat(pagination && !!(dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) ? 'has-page' : 'no-page'),
@@ -64,6 +64,14 @@
64
64
  }
65
65
 
66
66
  .@{ant-prefix}-table-body {
67
+ // .@{ant-prefix}-table-tbody .@{ant-prefix}-table-row:nth-child(odd).new-cell {
68
+ // background: #00ae4d !important;
69
+
70
+ // td {
71
+ // background: #00ae4d !important;
72
+ // }
73
+ // }
74
+
67
75
  .@{ant-prefix}-table-cell .varied-cell {
68
76
  margin-left: -8px;
69
77
  background: var(--zaui-contract-bg, #fffaa1);
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { ProTableColumn } from './propsType';
3
- export declare const formatColumn: (column: ProTableColumn, originalDataSource: any[]) => void;
3
+ export declare const formatColumn: (column: ProTableColumn, originalObj: any, dataSourceObj: any, rowKey: any) => void;
4
4
  export declare const getColumnDataIndex: (dataIndex: string | string[]) => string;
5
5
  /**
6
6
  * 查找最近的父级className