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

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 (141) hide show
  1. package/README.md +7 -0
  2. package/dist/index.esm.css +47 -5
  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 +17 -14
  7. package/es/ProEditLabel/style/index.less +12 -9
  8. package/es/ProEditTable/index.js +8 -4
  9. package/es/ProEditTable/style/index.less +50 -42
  10. package/es/ProEditTable/utils/config.d.ts +1 -1
  11. package/es/ProEditTable/utils/config.js +3 -3
  12. package/es/ProEnum/style/index.less +3 -0
  13. package/es/ProForm/components/base/DatePicker/index.js +0 -3
  14. package/es/ProForm/components/base/SwitchCheckbox/style/index.less +3 -0
  15. package/es/ProForm/components/base/TextArea/index.less +4 -3
  16. package/es/ProForm/components/base/TimePicker/style/index.less +4 -1
  17. package/es/ProForm/components/combination/Container/style/index.less +3 -3
  18. package/es/ProForm/components/combination/FormList/style/index.less +3 -3
  19. package/es/ProForm/components/combination/Group/style/index.less +15 -15
  20. package/es/ProForm/components/combination/ProAddressBar/style/index.less +3 -3
  21. package/es/ProForm/components/combination/ProCombination/style/index.less +2 -2
  22. package/es/ProForm/components/combination/ProModalSelect/style/index.less +29 -11
  23. package/es/ProForm/components/combination/ProNumberRange/style/index.less +10 -10
  24. package/es/ProForm/components/combination/ProTimeLimit/style/index.less +6 -6
  25. package/es/ProForm/components/render/RenderFields.js +3 -3
  26. package/es/ProForm/style/index.less +46 -44
  27. package/es/ProIcon/style/index.less +4 -1
  28. package/es/ProLayout/components/Layout/Header/style/index.less +1 -1
  29. package/es/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +7 -7
  30. package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +28 -28
  31. package/es/ProLayout/components/Layout/Menu/SideMenu/style/index.less +11 -11
  32. package/es/ProLayout/components/ProCollapse/style/index.less +24 -24
  33. package/es/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +1 -1
  34. package/es/ProLayout/components/ProHeader/style/index.less +10 -11
  35. package/es/ProLayout/style/index.less +10 -7
  36. package/es/ProSelect/index.less +3 -0
  37. package/es/ProStep/style/index.less +3 -0
  38. package/es/ProTable/index.js +3 -3
  39. package/es/ProTable/style/index.less +68 -54
  40. package/es/ProTabs/style/index.less +14 -11
  41. package/es/ProThemeTools/component/PrdTools/index.d.ts +1 -1
  42. package/es/ProThemeTools/component/PrdTools/index.js +7 -6
  43. package/es/ProThemeTools/component/PrdTools/style/index.less +6 -6
  44. package/es/ProThemeTools/index.d.ts +1 -1
  45. package/es/ProThemeTools/index.js +7 -2
  46. package/es/ProThemeTools/propsType.d.ts +4 -0
  47. package/es/ProThemeTools/style/index.less +6 -3
  48. package/es/ProThemeTools/utils/index.d.ts +1 -1
  49. package/es/ProThemeTools/utils/index.js +2 -1
  50. package/es/ProTooltip/style/index.less +3 -0
  51. package/es/ProTree/components/CloseIcon.js +2 -4
  52. package/es/ProTree/style/index.less +29 -26
  53. package/es/ProTreeModal/components/CloseIcon.js +2 -4
  54. package/es/ProTreeModal/components/Trigger.d.ts +3 -0
  55. package/es/ProTreeModal/components/Trigger.js +79 -19
  56. package/es/ProTreeModal/index.js +24 -3
  57. package/es/ProTreeModal/propsType.d.ts +5 -2
  58. package/es/ProTreeModal/style/index.less +11 -8
  59. package/es/ProTreeSelect/style/index.less +25 -22
  60. package/es/ProUpload/components/DragRender.js +7 -4
  61. package/es/ProUpload/components/ImageRender.js +5 -1
  62. package/es/ProUpload/index.js +11 -7
  63. package/es/ProUpload/style/index.less +13 -4
  64. package/es/ProViewer/index.js +3 -1
  65. package/es/ProViewer/style/index.less +6 -3
  66. package/es/locale/en_US.d.ts +3 -0
  67. package/es/locale/en_US.js +3 -0
  68. package/es/locale/zh_CN.d.ts +3 -0
  69. package/es/locale/zh_CN.js +4 -1
  70. package/es/style/core/compatible.less +6 -6
  71. package/es/style/theme/antd.less +172 -157
  72. package/lib/ProAction/index.less +3 -0
  73. package/lib/ProDownload/index.js +9 -6
  74. package/lib/ProDownload/style/index.less +5 -2
  75. package/lib/ProDrawerForm/style/index.less +17 -14
  76. package/lib/ProEditLabel/style/index.less +12 -9
  77. package/lib/ProEditTable/index.js +6 -2
  78. package/lib/ProEditTable/style/index.less +50 -42
  79. package/lib/ProEditTable/utils/config.d.ts +1 -1
  80. package/lib/ProEditTable/utils/config.js +3 -3
  81. package/lib/ProEnum/style/index.less +3 -0
  82. package/lib/ProForm/components/base/DatePicker/index.js +0 -3
  83. package/lib/ProForm/components/base/SwitchCheckbox/style/index.less +3 -0
  84. package/lib/ProForm/components/base/TextArea/index.less +4 -3
  85. package/lib/ProForm/components/base/TimePicker/style/index.less +4 -1
  86. package/lib/ProForm/components/combination/Container/style/index.less +3 -3
  87. package/lib/ProForm/components/combination/FormList/style/index.less +3 -3
  88. package/lib/ProForm/components/combination/Group/style/index.less +15 -15
  89. package/lib/ProForm/components/combination/ProAddressBar/style/index.less +3 -3
  90. package/lib/ProForm/components/combination/ProCombination/style/index.less +2 -2
  91. package/lib/ProForm/components/combination/ProModalSelect/style/index.less +29 -11
  92. package/lib/ProForm/components/combination/ProNumberRange/style/index.less +10 -10
  93. package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +6 -6
  94. package/lib/ProForm/components/render/RenderFields.js +3 -3
  95. package/lib/ProForm/style/index.less +46 -44
  96. package/lib/ProIcon/style/index.less +4 -1
  97. package/lib/ProLayout/components/Layout/Header/style/index.less +1 -1
  98. package/lib/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +7 -7
  99. package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +28 -28
  100. package/lib/ProLayout/components/Layout/Menu/SideMenu/style/index.less +11 -11
  101. package/lib/ProLayout/components/ProCollapse/style/index.less +24 -24
  102. package/lib/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +1 -1
  103. package/lib/ProLayout/components/ProHeader/style/index.less +10 -11
  104. package/lib/ProLayout/style/index.less +10 -7
  105. package/lib/ProSelect/index.less +3 -0
  106. package/lib/ProStep/style/index.less +3 -0
  107. package/lib/ProTable/index.js +3 -3
  108. package/lib/ProTable/style/index.less +68 -54
  109. package/lib/ProTabs/style/index.less +14 -11
  110. package/lib/ProThemeTools/component/PrdTools/index.d.ts +1 -1
  111. package/lib/ProThemeTools/component/PrdTools/index.js +7 -6
  112. package/lib/ProThemeTools/component/PrdTools/style/index.less +6 -6
  113. package/lib/ProThemeTools/index.d.ts +1 -1
  114. package/lib/ProThemeTools/index.js +7 -2
  115. package/lib/ProThemeTools/propsType.d.ts +4 -0
  116. package/lib/ProThemeTools/style/index.less +6 -3
  117. package/lib/ProThemeTools/utils/index.d.ts +1 -1
  118. package/lib/ProThemeTools/utils/index.js +2 -1
  119. package/lib/ProTooltip/style/index.less +3 -0
  120. package/lib/ProTree/components/CloseIcon.js +2 -4
  121. package/lib/ProTree/style/index.less +29 -26
  122. package/lib/ProTreeModal/components/CloseIcon.js +2 -4
  123. package/lib/ProTreeModal/components/Trigger.d.ts +3 -0
  124. package/lib/ProTreeModal/components/Trigger.js +74 -18
  125. package/lib/ProTreeModal/index.js +24 -3
  126. package/lib/ProTreeModal/propsType.d.ts +5 -2
  127. package/lib/ProTreeModal/style/index.less +11 -8
  128. package/lib/ProTreeSelect/style/index.less +25 -22
  129. package/lib/ProUpload/components/DragRender.js +7 -4
  130. package/lib/ProUpload/components/ImageRender.js +5 -1
  131. package/lib/ProUpload/index.js +11 -7
  132. package/lib/ProUpload/style/index.less +13 -4
  133. package/lib/ProViewer/index.js +4 -3
  134. package/lib/ProViewer/style/index.less +6 -3
  135. package/lib/locale/en_US.d.ts +3 -0
  136. package/lib/locale/en_US.js +3 -0
  137. package/lib/locale/zh_CN.d.ts +3 -0
  138. package/lib/locale/zh_CN.js +4 -1
  139. package/lib/style/core/compatible.less +6 -6
  140. package/lib/style/theme/antd.less +172 -157
  141. package/package.json +1 -1
package/README.md CHANGED
@@ -91,3 +91,10 @@ render(<App />, document.getElementById('root'));
91
91
  4. release: "yarn build:types & yarn build:es && yarn build:lib && npm publish" 打包 3 个文件进行发布
92
92
  5. 执行 yarn build 成功
93
93
  6. 执行 yarn release
94
+
95
+
96
+ ### 发布
97
+
98
+ npm publish --registry https://registry.npmjs.org --access=public
99
+
100
+
@@ -817,7 +817,7 @@
817
817
  }
818
818
  .pro-header {
819
819
  background-color: var(--zaui-base-bg, #ffffff);
820
- padding: 24px 0 0 0;
820
+ padding: 16px 0 0 0 !important;
821
821
  }
822
822
  .pro-header.pro-header-no-back.pro-header-has-describe .pro-header-top {
823
823
  padding-left: var(--zaui-space-size-md, 16px);
@@ -1733,9 +1733,18 @@
1733
1733
  .pro-table .column-config .right-actions .custom-column-btn {
1734
1734
  margin-left: var(--zaui-space-size-sm, 8px);
1735
1735
  }
1736
- .pro-table .ant-empty .ant-empty-image {
1736
+ .pro-table .pro-table-empty {
1737
+ margin: var(--zaui-space-size-lg, 32px) 0;
1738
+ color: rgba(0, 0, 0, 0.25);
1739
+ font-size: var(--zaui-font-size-md, 14px);
1740
+ text-align: center;
1741
+ }
1742
+ .pro-table .pro-table-empty .empty-image {
1737
1743
  height: 80px;
1738
1744
  }
1745
+ .pro-table .pro-table-empty .empty-image img {
1746
+ height: 100%;
1747
+ }
1739
1748
  .pro-table .ant-table .ant-table-thead > tr > th {
1740
1749
  border-bottom: 0;
1741
1750
  white-space: nowrap;
@@ -2147,6 +2156,23 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
2147
2156
  .pro-tree-modal .ant-input-group-wrapper:hover .ant-input-group-addon {
2148
2157
  border-color: var(--zaui-brand-hover, #3387ff);
2149
2158
  }
2159
+ .pro-modal-select .ant-input-group-wrapper:hover .ant-input-disabled,
2160
+ .pro-tree-modal .ant-input-group-wrapper:hover .ant-input-disabled {
2161
+ border-color: #d9d9d9;
2162
+ }
2163
+ .pro-modal-select .ant-input-group-wrapper:hover .ant-input-disabled + span,
2164
+ .pro-tree-modal .ant-input-group-wrapper:hover .ant-input-disabled + span {
2165
+ border-color: #d9d9d9;
2166
+ }
2167
+ .pro-modal-select .ant-input-group-wrapper:hover .ant-input-disabled + span .close-icon,
2168
+ .pro-tree-modal .ant-input-group-wrapper:hover .ant-input-disabled + span .close-icon {
2169
+ display: none;
2170
+ }
2171
+ .pro-modal-select .pro-tree-modal-input-appoint .ant-input,
2172
+ .pro-tree-modal .pro-tree-modal-input-appoint .ant-input {
2173
+ border-top-left-radius: 0;
2174
+ border-bottom-left-radius: 0;
2175
+ }
2150
2176
  .pro-modal-select .ant-input-group-wrapper-status-error:hover .ant-input,
2151
2177
  .pro-tree-modal .ant-input-group-wrapper-status-error:hover .ant-input,
2152
2178
  .pro-modal-select .ant-input-group-wrapper-status-error:hover .ant-input-group-addon,
@@ -3001,6 +3027,9 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
3001
3027
  -ms-flex-pack: center;
3002
3028
  justify-content: center;
3003
3029
  }
3030
+ .proupload-modal-preview .ant-modal {
3031
+ width: 600px;
3032
+ }
3004
3033
  .pro-tree-select .ant-select-selector .check-mark-icon {
3005
3034
  display: none;
3006
3035
  }
@@ -4117,7 +4146,12 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
4117
4146
  .pro-edit-table .ant-table-tbody > .ant-table-placeholder > td {
4118
4147
  background-color: var(--zaui-base-bg, #ffffff);
4119
4148
  }
4120
- .pro-edit-table .ant-table-tbody > tr:hover:not(.ant-table-expanded-row, .ant-table-placeholder) > td,
4149
+ .pro-edit-table .ant-table-tbody > tr:hover:not(.ant-table-expanded-row) > td,
4150
+ .pro-edit-table .ant-table-tbody .ant-table-row-hover,
4151
+ .pro-edit-table .ant-table-tbody .ant-table-row-hover > td {
4152
+ background: #FAFAFA;
4153
+ }
4154
+ .pro-edit-table .ant-table-tbody > tr:hover:not(.ant-table-placeholder) > td,
4121
4155
  .pro-edit-table .ant-table-tbody .ant-table-row-hover,
4122
4156
  .pro-edit-table .ant-table-tbody .ant-table-row-hover > td {
4123
4157
  background: #FAFAFA;
@@ -5002,6 +5036,9 @@ input[type='button'] {
5002
5036
  font-size: calc(var(--zaui-font-size, 14px) + var(--zaui-base-font-size, 0px));
5003
5037
  color: var(--zaui-text, #464646);
5004
5038
  }
5039
+ .ant-table .ant-empty-normal {
5040
+ margin: calc(var(--zaui-space-size-lg, 32px) * var(--zaui-size, 1)) 0;
5041
+ }
5005
5042
  .ant-table.pro-table-no-stripe .ant-table-tbody .ant-table-row {
5006
5043
  background: #fff !important;
5007
5044
  }
@@ -5069,13 +5106,18 @@ input[type='button'] {
5069
5106
  .ant-table table .ant-table-tbody > tr > td,
5070
5107
  .ant-table table .ant-table tfoot > tr > th,
5071
5108
  .ant-table table .ant-table tfoot > tr > td {
5072
- padding: calc(5px + var(--zaui-size) * 8px) 16px;
5109
+ padding: calc(4px + var(--zaui-size) * 8px);
5110
+ }
5111
+ .ant-table table .ant-table-tbody > tr > td > .ant-table-wrapper:only-child .ant-table,
5112
+ .ant-table table .ant-table-tbody > tr > td > .ant-table-expanded-row-fixed > .ant-table-wrapper:only-child .ant-table {
5113
+ margin-top: calc(var(--zaui-size) * -16px);
5114
+ margin-bottom: calc(var(--zaui-size) * -16px);
5073
5115
  }
5074
5116
  .ant-table.ant-table-scroll-horizontal table .ant-table-thead > tr > th,
5075
5117
  .ant-table.ant-table-scroll-horizontal table .ant-table-tbody > tr > td,
5076
5118
  .ant-table.ant-table-scroll-horizontal table .ant-table tfoot > tr > th,
5077
5119
  .ant-table.ant-table-scroll-horizontal table .ant-table tfoot > tr > td {
5078
- padding: calc(5px + var(--zaui-size) * 8px) 16px;
5120
+ padding: calc(4px + var(--zaui-size) * 8px);
5079
5121
  }
5080
5122
  .ant-table.ant-table-scroll-horizontal table .ant-table-tbody .ant-table-row:nth-child(even) {
5081
5123
  background-color: var(--zaui-table-strip-bg, #fafafa);
@@ -1,3 +1,6 @@
1
+ @root-entry-name: 'default';
2
+ @import (reference) '~antd/es/style/themes/index.less';
3
+
1
4
  .pro-action-view-tile {
2
5
  margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
3
6
  color : #666;
@@ -1,16 +1,17 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
1
  import "antd/es/button/style";
3
2
  import _Button from "antd/es/button";
4
3
  import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
5
4
  import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
5
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
6
6
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
7
7
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
8
- var _excluded = ["source", "action", "url", "method", "params", "fileName", "headers", "children", "onFinish", "beforeDownload", "className", "transformResponse"];
8
+ var _excluded = ["source", "action", "url", "method", "params", "fileName", "children", "onFinish", "beforeDownload", "className", "transformResponse"];
9
9
  import { jsx as _jsx } from "react/jsx-runtime";
10
10
  import { useSetState } from 'ahooks';
11
11
  import classNames from 'classnames';
12
12
  import _, { isFunction } from 'lodash';
13
13
  import { BlobMakeFile, DownloadRequest } from './utils';
14
+ import { useProConfig } from '../ProConfigProvider';
14
15
  var ProDownload = function ProDownload(props) {
15
16
  var source = props.source,
16
17
  action = props.action,
@@ -18,7 +19,6 @@ var ProDownload = function ProDownload(props) {
18
19
  method = props.method,
19
20
  params = props.params,
20
21
  fileName = props.fileName,
21
- headers = props.headers,
22
22
  children = props.children,
23
23
  onFinish = props.onFinish,
24
24
  beforeDownload = props.beforeDownload,
@@ -31,8 +31,11 @@ var ProDownload = function ProDownload(props) {
31
31
  _useSetState2 = _slicedToArray(_useSetState, 2),
32
32
  loading = _useSetState2[0].loading,
33
33
  setState = _useSetState2[1];
34
+ var _ref = useProConfig('ProDownload') || {},
35
+ headers = _ref.headers;
36
+ defaultProps.headers = _objectSpread(_objectSpread({}, headers), defaultProps.headers);
34
37
  var handDownload = /*#__PURE__*/function () {
35
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
38
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
36
39
  var _params;
37
40
  return _regeneratorRuntime().wrap(function _callee$(_context) {
38
41
  while (1) switch (_context.prev = _context.next) {
@@ -87,7 +90,7 @@ var ProDownload = function ProDownload(props) {
87
90
  return DownloadRequest({
88
91
  url: url || action,
89
92
  method: method,
90
- headers: headers,
93
+ headers: defaultProps.headers,
91
94
  params: _params,
92
95
  transformResponse: transformResponse,
93
96
  fileName: fileName,
@@ -116,7 +119,7 @@ var ProDownload = function ProDownload(props) {
116
119
  }, _callee, null, [[14, 19, 23, 26]]);
117
120
  }));
118
121
  return function handDownload() {
119
- return _ref.apply(this, arguments);
122
+ return _ref2.apply(this, arguments);
120
123
  };
121
124
  }();
122
125
  var cls = classNames(className, {
@@ -1,7 +1,10 @@
1
+ @root-entry-name: 'default';
2
+ @import (reference) '~antd/es/style/themes/index.less';
3
+
1
4
  .pro-download {
2
5
 
3
- &.ant-btn-link,
4
- &.ant-btn-text {
6
+ &.@{ant-prefix}-btn-link,
7
+ &.@{ant-prefix}-btn-text {
5
8
  padding: 0;
6
9
  }
7
10
  }
@@ -1,3 +1,6 @@
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
6
  position: absolute;
@@ -88,24 +91,24 @@
88
91
  }
89
92
  }
90
93
 
91
- .ant-drawer-body {
94
+ .@{ant-prefix}-drawer-body {
92
95
  height: 100vh;
93
96
  padding: 0;
94
97
  overflow-y: hidden;
95
98
  }
96
99
 
97
- .ant-drawer-content {
100
+ .@{ant-prefix}-drawer-content {
98
101
  position: static;
99
102
  }
100
103
 
101
- .ant-drawer-close {
104
+ .@{ant-prefix}-drawer-close {
102
105
  display: none;
103
106
  }
104
107
  }
105
108
 
106
109
  .pro-modal {
107
- .ant-modal-close {
108
- .ant-modal-close-x {
110
+ .@{ant-prefix}-modal-close {
111
+ .@{ant-prefix}-modal-close-x {
109
112
  .close-icon {
110
113
  fill: var(--zaui-aide-text, #909090);
111
114
 
@@ -116,16 +119,16 @@
116
119
  }
117
120
  }
118
121
 
119
- .ant-modal-header {
122
+ .@{ant-prefix}-modal-header {
120
123
  padding: var(--zaui-space-size-md, 16px);
121
124
  border-bottom: none;
122
125
 
123
- .ant-modal-title {
126
+ .@{ant-prefix}-modal-title {
124
127
  font-weight: 600;
125
128
  }
126
129
  }
127
130
 
128
- .ant-modal-footer {
131
+ .@{ant-prefix}-modal-footer {
129
132
  padding: var(--zaui-space-size-md, 16px);
130
133
  border-top: none;
131
134
 
@@ -135,8 +138,8 @@
135
138
  }
136
139
  }
137
140
 
138
- .ant-modal-content {
139
- .ant-modal-body {
141
+ .@{ant-prefix}-modal-content {
142
+ .@{ant-prefix}-modal-body {
140
143
  max-height: 450px;
141
144
  padding: 0 var(--zaui-space-size-md, 16px);
142
145
  padding-top: 0;
@@ -146,8 +149,8 @@
146
149
  }
147
150
 
148
151
  .pro-modal-no-footer {
149
- .ant-modal-content {
150
- .ant-modal-body {
152
+ .@{ant-prefix}-modal-content {
153
+ .@{ant-prefix}-modal-body {
151
154
  padding-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
152
155
  }
153
156
  }
@@ -156,7 +159,7 @@
156
159
  .pro-modal-scrolling {
157
160
  z-index: 1;
158
161
 
159
- .ant-modal-header {
162
+ .@{ant-prefix}-modal-header {
160
163
  position: relative;
161
164
  z-index: 1;
162
165
  box-shadow: -12px 14px 14px -18px var(--zaui-shadow, rgba(56, 56, 56, 0.15));
@@ -164,7 +167,7 @@
164
167
  }
165
168
 
166
169
  .pro-modal-footer-shadow {
167
- .ant-modal-footer {
170
+ .@{ant-prefix}-modal-footer {
168
171
  position: relative;
169
172
  z-index: 1;
170
173
  box-shadow: 3px 2px 12px 0px var(--zaui-shadow, rgba(56, 56, 56, 0.15));
@@ -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
 
@@ -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
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"];
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';
@@ -60,6 +60,9 @@ var ProEditTable = function ProEditTable(_ref, ref) {
60
60
  _otherProps$viewEmpty = otherProps.viewEmpty,
61
61
  viewEmpty = _otherProps$viewEmpty === void 0 ? '-' : _otherProps$viewEmpty;
62
62
  var tableRef = useRef(null);
63
+ var _React$useContext = React.useContext(_ConfigProvider.ConfigContext),
64
+ getPrefixCls = _React$useContext.getPrefixCls;
65
+ var prefixCls = getPrefixCls();
63
66
  disabled = (otherProps === null || otherProps === void 0 ? void 0 : otherProps.disabled) || disabled;
64
67
  var _useSetState = useSetState({
65
68
  _columns: columns,
@@ -138,7 +141,8 @@ var ProEditTable = function ProEditTable(_ref, ref) {
138
141
  tableLength: value === null || value === void 0 ? void 0 : value.length,
139
142
  page: page,
140
143
  originalValues: originalValues,
141
- originalTip: originalTip
144
+ originalTip: originalTip,
145
+ prefixCls: prefixCls
142
146
  };
143
147
  // 判断是否禁止添加、批量删除
144
148
  var isForbiddenBtn = useCallback(function (type) {
@@ -1,3 +1,6 @@
1
+ @root-entry-name: 'default';
2
+ @import (reference) '~antd/es/style/themes/index.less';
3
+
1
4
  .pro-edit-table {
2
5
  .pro-edit-table-tooltip {
3
6
  display : inline-flex;
@@ -35,7 +38,7 @@
35
38
  justify-content: center;
36
39
  margin-top: var(--zaui-space-size-md, 16px);
37
40
 
38
- .ant-btn-link {
41
+ .@{ant-prefix}-btn-link {
39
42
  padding: 0;
40
43
  }
41
44
  }
@@ -47,7 +50,7 @@
47
50
  }
48
51
 
49
52
 
50
- .is-cell .ant-form-item .ant-form-item-row .ant-form-item-control .ant-form-item-control-input {
53
+ .is-cell .@{ant-prefix}-form-item .@{ant-prefix}-form-item-row .@{ant-prefix}-form-item-control .@{ant-prefix}-form-item-control-input {
51
54
  border: 1px solid transparent;
52
55
 
53
56
  &:hover {
@@ -66,15 +69,15 @@
66
69
  }
67
70
 
68
71
  &.pro-table-no-stripe {
69
- .ant-table-tbody tr:nth-child(n)>td {
72
+ .@{ant-prefix}-table-tbody tr:nth-child(n)>td {
70
73
  background-color: var(--zaui-base-bg, #fff);
71
74
  }
72
75
  }
73
76
 
74
- .ant-space {
77
+ .@{ant-prefix}-space {
75
78
  gap: var(--zaui-space-size-sm, 8px);
76
79
 
77
- .ant-btn-link {
80
+ .@{ant-prefix}-btn-link {
78
81
  padding: 0 var(--zaui-space-size-xs, 4px);
79
82
 
80
83
  &:first-child {
@@ -83,12 +86,12 @@
83
86
  }
84
87
  }
85
88
 
86
- .ant-table-header>table .ant-table-thead>tr>th.ant-table-selection-column {
89
+ .@{ant-prefix}-table-header>table .@{ant-prefix}-table-thead>tr>th.@{ant-prefix}-table-selection-column {
87
90
  padding-left: var(--zaui-space-size-md, 16px);
88
91
  padding-right: var(--zaui-space-size-md, 16px);
89
92
  }
90
93
 
91
- .ant-table-header>table .ant-table-thead>tr>th:not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan]).is-required {
94
+ .@{ant-prefix}-table-header>table .@{ant-prefix}-table-thead>tr>th:not(.@{ant-prefix}-table-selection-column):not(.@{ant-prefix}-table-row-expand-icon-cell):not([colspan]).is-required {
92
95
  &::after {
93
96
  content: "";
94
97
  }
@@ -130,27 +133,27 @@
130
133
  }
131
134
  }
132
135
 
133
- .ant-table-content {
136
+ .@{ant-prefix}-table-content {
134
137
  >table {
135
- .ant-table-summary {
138
+ .@{ant-prefix}-table-summary {
136
139
  background-color: var(--zaui-table-header-bg, #f2f3f5);
137
140
  color : var(--zaui-text, #343434);
138
141
  font-weight : 600;
139
142
 
140
- .ant-table-cell-fix-left,
141
- .ant-table-cell-fix-right {
143
+ .@{ant-prefix}-table-cell-fix-left,
144
+ .@{ant-prefix}-table-cell-fix-right {
142
145
  background-color: var(--zaui-table-header-bg, #f2f3f5);
143
146
 
144
147
  }
145
148
  }
146
149
 
147
- .ant-table-cell-fix-right-first {
150
+ .@{ant-prefix}-table-cell-fix-right-first {
148
151
  &::after {
149
152
  box-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, 0.15);
150
153
  }
151
154
  }
152
155
 
153
- th.ant-table-selection-column {
156
+ th.@{ant-prefix}-table-selection-column {
154
157
  width: 48px;
155
158
  }
156
159
 
@@ -160,7 +163,7 @@
160
163
  }
161
164
  }
162
165
 
163
- .ant-table-thead>tr>th:not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan]).is-required {
166
+ .@{ant-prefix}-table-thead>tr>th:not(.@{ant-prefix}-table-selection-column):not(.@{ant-prefix}-table-row-expand-icon-cell):not([colspan]).is-required {
164
167
  &::after {
165
168
  content: "";
166
169
  }
@@ -204,83 +207,88 @@
204
207
  }
205
208
  }
206
209
 
207
- .ant-table-cell {
208
- .ant-form-item {
210
+ .@{ant-prefix}-table-cell {
211
+ .@{ant-prefix}-form-item {
209
212
  margin-bottom: 0px !important;
210
213
  }
211
214
  }
212
215
 
213
- .ant-table.ant-table-bordered>.ant-table-container {
216
+ .@{ant-prefix}-table.@{ant-prefix}-table-bordered>.@{ant-prefix}-table-container {
214
217
  border: 0;
215
218
  }
216
219
 
217
- .ant-table-thead>tr>th {
220
+ .@{ant-prefix}-table-thead>tr>th {
218
221
  border : 0;
219
222
  white-space : nowrap;
220
223
  background-color: var(--zaui-table-header-bg, #f2f3f5);
221
224
  }
222
225
 
223
- .ant-table-thead>tr>th:not(:last-child):not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan])::before {
226
+ .@{ant-prefix}-table-thead>tr>th:not(:last-child):not(.@{ant-prefix}-table-selection-column):not(.@{ant-prefix}-table-row-expand-icon-cell):not([colspan])::before {
224
227
  height: 0;
225
228
  }
226
229
 
227
- .ant-table-tbody>tr:not(.ant-table-placeholder)>td {
230
+ .@{ant-prefix}-table-tbody>tr:not(.@{ant-prefix}-table-placeholder)>td {
228
231
  border-bottom: 0;
229
232
  border-right : 0;
230
233
  border-top : 0;
231
234
  }
232
235
 
233
- .ant-table-tbody>.is-editing:not(.ant-table-measure-row)>td {
236
+ .@{ant-prefix}-table-tbody>.is-editing:not(.@{ant-prefix}-table-measure-row)>td {
234
237
  border-bottom : 0;
235
238
  vertical-align: top;
236
239
  }
237
240
 
238
- .ant-table-tbody tr:nth-child(n)>td {
241
+ .@{ant-prefix}-table-tbody tr:nth-child(n)>td {
239
242
  background-color: var(--zaui-base-bg, #ffffff);
240
243
  }
241
244
 
242
- .ant-table-tbody tr:nth-child(2n)>td {
245
+ .@{ant-prefix}-table-tbody tr:nth-child(2n)>td {
243
246
  background-color: var(--zaui-table-strip-bg, #FAFAFA);
244
247
  }
245
248
 
246
- .ant-table-tbody>.ant-table-placeholder>td {
249
+ .@{ant-prefix}-table-tbody>.@{ant-prefix}-table-placeholder>td {
247
250
  background-color: var(--zaui-base-bg, #ffffff);
248
251
  }
249
252
 
250
- .ant-table-tbody {
253
+ .@{ant-prefix}-table-tbody {
251
254
 
252
- >tr:hover:not(.ant-table-expanded-row, .ant-table-placeholder)>td,
253
- .ant-table-row-hover,
254
- .ant-table-row-hover>td {
255
+ >tr:hover:not(.@{ant-prefix}-table-expanded-row)>td,
256
+ .@{ant-prefix}-table-row-hover,
257
+ .@{ant-prefix}-table-row-hover>td {
258
+ background: #FAFAFA;
259
+ }
260
+ >tr:hover:not(.@{ant-prefix}-table-placeholder)>td,
261
+ .@{ant-prefix}-table-row-hover,
262
+ .@{ant-prefix}-table-row-hover>td {
255
263
  background: #FAFAFA;
256
264
  }
257
265
  }
258
266
 
259
- .ant-table-fixed {
267
+ .@{ant-prefix}-table-fixed {
260
268
 
261
- .ant-table-row-hover,
262
- .ant-table-row-hover>td {
269
+ .@{ant-prefix}-table-row-hover,
270
+ .@{ant-prefix}-table-row-hover>td {
263
271
  background: #FAFAFA;
264
272
  }
265
273
  }
266
274
 
267
- .ant-table-fixed-header {
268
- .ant-table-tbody tr:nth-child(n)>td {
275
+ .@{ant-prefix}-table-fixed-header {
276
+ .@{ant-prefix}-table-tbody tr:nth-child(n)>td {
269
277
  background-color: #FAFAFA;
270
278
  }
271
279
 
272
- .ant-table-tbody tr:nth-child(2n)>td {
280
+ .@{ant-prefix}-table-tbody tr:nth-child(2n)>td {
273
281
  background-color: var(--zaui-base-bg, #ffffff);
274
282
  }
275
283
  }
276
284
 
277
- .ant-table-summary>tr>td {
285
+ .@{ant-prefix}-table-summary>tr>td {
278
286
  border-bottom: none;
279
287
  }
280
288
 
281
- .ant-table-pagination {
282
- .ant-pagination-options {
283
- .ant-select.ant-select-in-form-item {
289
+ .@{ant-prefix}-table-pagination {
290
+ .@{ant-prefix}-pagination-options {
291
+ .@{ant-prefix}-select.@{ant-prefix}-select-in-form-item {
284
292
  width: auto;
285
293
  }
286
294
  }
@@ -299,11 +307,11 @@
299
307
 
300
308
  .pro-edit-table-toolbar {
301
309
  margin-top: var(--zaui-space-size-md, 16px);
302
- .ant-space {
310
+ .@{ant-prefix}-space {
303
311
  gap: var(--zaui-space-size-sm, 8px);
304
312
 
305
- .ant-space-item {
306
- .ant-btn-link {
313
+ .@{ant-prefix}-space-item {
314
+ .@{ant-prefix}-btn-link {
307
315
  display: flex;
308
316
  align-items: center;
309
317
  padding: 0 var(--zaui-space-size-xs, 4px);
@@ -321,7 +329,7 @@
321
329
  }
322
330
 
323
331
  .pro-edit-table-drag {
324
- table tr th.ant-table-selection-column.ant-table-cell-fix-left{
332
+ table tr th.@{ant-prefix}-table-selection-column.@{ant-prefix}-table-cell-fix-left{
325
333
  text-align: right;
326
334
  }
327
335
  }
@@ -20,6 +20,6 @@ export declare const actions: {
20
20
  save: ({ record, editingKeys, setState, form, rowName, virtualRowName, result }: any) => Promise<void>;
21
21
  cancel: ({ name, record, editingKeys, setState, form, virtualRowName, virtualKey }: any) => void;
22
22
  delete: ({ name, record, editingKeys, setState, form, virtualKey, onlyOneLineMsg }: any) => boolean;
23
- add: ({ result, insertType, editingKeys, setState, form, name, virtualName, virtualKey, onlyOneLineMsg, tableRef, }: any) => Promise<boolean>;
23
+ add: ({ result, insertType, editingKeys, setState, form, name, virtualName, virtualKey, onlyOneLineMsg, tableRef, prefixCls, }: any) => Promise<boolean>;
24
24
  mulDelete: ({ form, name, virtualKey, setState, selectedRowKeys, editingKeys }: any) => void;
25
25
  };
@@ -168,11 +168,11 @@ export var actions = {
168
168
  add: function () {
169
169
  var _add = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref5) {
170
170
  var _tableRef$current$que, _tableRef$current$que2;
171
- var result, insertType, editingKeys, setState, form, name, virtualName, virtualKey, onlyOneLineMsg, tableRef, nextData, rowKey, addData, nextEditingKeys;
171
+ var result, insertType, editingKeys, setState, form, name, virtualName, virtualKey, onlyOneLineMsg, tableRef, _ref5$prefixCls, prefixCls, nextData, rowKey, addData, nextEditingKeys;
172
172
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
173
173
  while (1) switch (_context2.prev = _context2.next) {
174
174
  case 0:
175
- result = _ref5.result, insertType = _ref5.insertType, editingKeys = _ref5.editingKeys, setState = _ref5.setState, form = _ref5.form, name = _ref5.name, virtualName = _ref5.virtualName, virtualKey = _ref5.virtualKey, onlyOneLineMsg = _ref5.onlyOneLineMsg, tableRef = _ref5.tableRef;
175
+ result = _ref5.result, insertType = _ref5.insertType, editingKeys = _ref5.editingKeys, setState = _ref5.setState, form = _ref5.form, name = _ref5.name, virtualName = _ref5.virtualName, virtualKey = _ref5.virtualKey, onlyOneLineMsg = _ref5.onlyOneLineMsg, tableRef = _ref5.tableRef, _ref5$prefixCls = _ref5.prefixCls, prefixCls = _ref5$prefixCls === void 0 ? 'ant' : _ref5$prefixCls;
176
176
  nextData = _toConsumableArray(form.getFieldValue(name) || []); // 单行编辑时,需要先保存,才能进行下面的编辑
177
177
  if (!(virtualKey && editingKeys.length >= 1)) {
178
178
  _context2.next = 5;
@@ -191,7 +191,7 @@ export var actions = {
191
191
  }
192
192
  insertType === 'before' ? nextData.unshift(addData) : nextData.push(addData);
193
193
  form.setFieldValue(name, nextData);
194
- (_tableRef$current$que = tableRef.current.querySelector('.ant-table-body')) === null || _tableRef$current$que === void 0 ? void 0 : (_tableRef$current$que2 = _tableRef$current$que.scrollTo) === null || _tableRef$current$que2 === void 0 ? void 0 : _tableRef$current$que2.call(_tableRef$current$que, {
194
+ (_tableRef$current$que = tableRef.current.querySelector(".".concat(prefixCls, "-table-body"))) === null || _tableRef$current$que === void 0 ? void 0 : (_tableRef$current$que2 = _tableRef$current$que.scrollTo) === null || _tableRef$current$que2 === void 0 ? void 0 : _tableRef$current$que2.call(_tableRef$current$que, {
195
195
  top: 10000,
196
196
  behavior: 'smooth'
197
197
  });