@zat-design/sisyphus-react 3.2.2-beta.1 → 3.2.2-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/index.esm.css +44 -5
- package/es/ProAction/index.less +3 -0
- package/es/ProDownload/index.js +9 -6
- package/es/ProDownload/style/index.less +5 -2
- package/es/ProDrawerForm/style/index.less +17 -14
- package/es/ProEditLabel/style/index.less +12 -9
- package/es/ProEditTable/index.js +8 -4
- package/es/ProEditTable/style/index.less +50 -42
- package/es/ProEditTable/utils/config.d.ts +1 -1
- package/es/ProEditTable/utils/config.js +3 -3
- package/es/ProEnum/style/index.less +3 -0
- package/es/ProForm/components/base/DatePicker/index.js +0 -3
- package/es/ProForm/components/base/SwitchCheckbox/style/index.less +3 -0
- package/es/ProForm/components/base/TextArea/index.less +4 -3
- package/es/ProForm/components/base/TimePicker/style/index.less +4 -1
- package/es/ProForm/components/combination/Container/style/index.less +3 -3
- package/es/ProForm/components/combination/FormList/style/index.less +3 -3
- package/es/ProForm/components/combination/Group/style/index.less +15 -15
- package/es/ProForm/components/combination/ProAddressBar/style/index.less +3 -3
- package/es/ProForm/components/combination/ProCombination/style/index.less +2 -2
- package/es/ProForm/components/combination/ProModalSelect/style/index.less +29 -11
- package/es/ProForm/components/combination/ProNumberRange/style/index.less +10 -10
- package/es/ProForm/components/combination/ProTimeLimit/style/index.less +6 -6
- package/es/ProForm/components/render/RenderFields.js +3 -3
- package/es/ProForm/style/index.less +46 -44
- package/es/ProIcon/style/index.less +4 -1
- package/es/ProLayout/components/Layout/Header/style/index.less +1 -1
- package/es/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +7 -7
- package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +28 -28
- package/es/ProLayout/components/Layout/Menu/SideMenu/style/index.less +11 -11
- package/es/ProLayout/components/ProCollapse/style/index.less +24 -24
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +1 -1
- package/es/ProLayout/components/ProHeader/style/index.less +10 -11
- package/es/ProLayout/style/index.less +10 -7
- package/es/ProSelect/index.less +3 -0
- package/es/ProStep/style/index.less +3 -0
- package/es/ProTable/index.js +3 -3
- package/es/ProTable/style/index.less +68 -54
- package/es/ProTabs/style/index.less +14 -11
- package/es/ProThemeTools/component/PrdTools/index.d.ts +1 -1
- package/es/ProThemeTools/component/PrdTools/index.js +7 -6
- package/es/ProThemeTools/component/PrdTools/style/index.less +6 -6
- package/es/ProThemeTools/index.d.ts +1 -1
- package/es/ProThemeTools/index.js +7 -2
- package/es/ProThemeTools/propsType.d.ts +4 -0
- package/es/ProThemeTools/style/index.less +6 -3
- package/es/ProThemeTools/utils/index.d.ts +1 -1
- package/es/ProThemeTools/utils/index.js +2 -1
- package/es/ProTooltip/style/index.less +3 -0
- package/es/ProTree/components/CloseIcon.js +2 -4
- package/es/ProTree/style/index.less +29 -26
- package/es/ProTreeModal/components/CloseIcon.js +2 -4
- package/es/ProTreeModal/components/Trigger.d.ts +3 -0
- package/es/ProTreeModal/components/Trigger.js +79 -19
- package/es/ProTreeModal/index.js +24 -3
- package/es/ProTreeModal/propsType.d.ts +5 -2
- package/es/ProTreeModal/style/index.less +11 -8
- package/es/ProTreeSelect/style/index.less +25 -22
- package/es/ProUpload/components/DragRender.js +7 -4
- package/es/ProUpload/index.js +11 -7
- package/es/ProUpload/style/index.less +7 -4
- package/es/ProViewer/index.js +3 -1
- package/es/ProViewer/style/index.less +6 -3
- package/es/locale/en_US.d.ts +3 -0
- package/es/locale/en_US.js +3 -0
- package/es/locale/zh_CN.d.ts +3 -0
- package/es/locale/zh_CN.js +4 -1
- package/es/style/core/compatible.less +6 -6
- package/es/style/theme/antd.less +172 -157
- package/lib/ProAction/index.less +3 -0
- package/lib/ProDownload/index.js +9 -6
- package/lib/ProDownload/style/index.less +5 -2
- package/lib/ProDrawerForm/style/index.less +17 -14
- package/lib/ProEditLabel/style/index.less +12 -9
- package/lib/ProEditTable/index.js +6 -2
- package/lib/ProEditTable/style/index.less +50 -42
- package/lib/ProEditTable/utils/config.d.ts +1 -1
- package/lib/ProEditTable/utils/config.js +3 -3
- package/lib/ProEnum/style/index.less +3 -0
- package/lib/ProForm/components/base/DatePicker/index.js +0 -3
- package/lib/ProForm/components/base/SwitchCheckbox/style/index.less +3 -0
- package/lib/ProForm/components/base/TextArea/index.less +4 -3
- package/lib/ProForm/components/base/TimePicker/style/index.less +4 -1
- package/lib/ProForm/components/combination/Container/style/index.less +3 -3
- package/lib/ProForm/components/combination/FormList/style/index.less +3 -3
- package/lib/ProForm/components/combination/Group/style/index.less +15 -15
- package/lib/ProForm/components/combination/ProAddressBar/style/index.less +3 -3
- package/lib/ProForm/components/combination/ProCombination/style/index.less +2 -2
- package/lib/ProForm/components/combination/ProModalSelect/style/index.less +29 -11
- package/lib/ProForm/components/combination/ProNumberRange/style/index.less +10 -10
- package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +6 -6
- package/lib/ProForm/components/render/RenderFields.js +3 -3
- package/lib/ProForm/style/index.less +46 -44
- package/lib/ProIcon/style/index.less +4 -1
- package/lib/ProLayout/components/Layout/Header/style/index.less +1 -1
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +7 -7
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +28 -28
- package/lib/ProLayout/components/Layout/Menu/SideMenu/style/index.less +11 -11
- package/lib/ProLayout/components/ProCollapse/style/index.less +24 -24
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +1 -1
- package/lib/ProLayout/components/ProHeader/style/index.less +10 -11
- package/lib/ProLayout/style/index.less +10 -7
- package/lib/ProSelect/index.less +3 -0
- package/lib/ProStep/style/index.less +3 -0
- package/lib/ProTable/index.js +3 -3
- package/lib/ProTable/style/index.less +68 -54
- package/lib/ProTabs/style/index.less +14 -11
- package/lib/ProThemeTools/component/PrdTools/index.d.ts +1 -1
- package/lib/ProThemeTools/component/PrdTools/index.js +7 -6
- package/lib/ProThemeTools/component/PrdTools/style/index.less +6 -6
- package/lib/ProThemeTools/index.d.ts +1 -1
- package/lib/ProThemeTools/index.js +7 -2
- package/lib/ProThemeTools/propsType.d.ts +4 -0
- package/lib/ProThemeTools/style/index.less +6 -3
- package/lib/ProThemeTools/utils/index.d.ts +1 -1
- package/lib/ProThemeTools/utils/index.js +2 -1
- package/lib/ProTooltip/style/index.less +3 -0
- package/lib/ProTree/components/CloseIcon.js +2 -4
- package/lib/ProTree/style/index.less +29 -26
- package/lib/ProTreeModal/components/CloseIcon.js +2 -4
- package/lib/ProTreeModal/components/Trigger.d.ts +3 -0
- package/lib/ProTreeModal/components/Trigger.js +74 -18
- package/lib/ProTreeModal/index.js +24 -3
- package/lib/ProTreeModal/propsType.d.ts +5 -2
- package/lib/ProTreeModal/style/index.less +11 -8
- package/lib/ProTreeSelect/style/index.less +25 -22
- package/lib/ProUpload/components/DragRender.js +7 -4
- package/lib/ProUpload/index.js +11 -7
- package/lib/ProUpload/style/index.less +7 -4
- package/lib/ProViewer/index.js +4 -3
- package/lib/ProViewer/style/index.less +6 -3
- package/lib/locale/en_US.d.ts +3 -0
- package/lib/locale/en_US.js +3 -0
- package/lib/locale/zh_CN.d.ts +3 -0
- package/lib/locale/zh_CN.js +4 -1
- package/lib/style/core/compatible.less +6 -6
- package/lib/style/theme/antd.less +172 -157
- 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
|
+
|
package/dist/index.esm.css
CHANGED
|
@@ -817,7 +817,7 @@
|
|
|
817
817
|
}
|
|
818
818
|
.pro-header {
|
|
819
819
|
background-color: var(--zaui-base-bg, #ffffff);
|
|
820
|
-
padding:
|
|
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 .
|
|
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,
|
|
@@ -4117,7 +4143,12 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
4117
4143
|
.pro-edit-table .ant-table-tbody > .ant-table-placeholder > td {
|
|
4118
4144
|
background-color: var(--zaui-base-bg, #ffffff);
|
|
4119
4145
|
}
|
|
4120
|
-
.pro-edit-table .ant-table-tbody > tr:hover:not(.ant-table-expanded-row
|
|
4146
|
+
.pro-edit-table .ant-table-tbody > tr:hover:not(.ant-table-expanded-row) > td,
|
|
4147
|
+
.pro-edit-table .ant-table-tbody .ant-table-row-hover,
|
|
4148
|
+
.pro-edit-table .ant-table-tbody .ant-table-row-hover > td {
|
|
4149
|
+
background: #FAFAFA;
|
|
4150
|
+
}
|
|
4151
|
+
.pro-edit-table .ant-table-tbody > tr:hover:not(.ant-table-placeholder) > td,
|
|
4121
4152
|
.pro-edit-table .ant-table-tbody .ant-table-row-hover,
|
|
4122
4153
|
.pro-edit-table .ant-table-tbody .ant-table-row-hover > td {
|
|
4123
4154
|
background: #FAFAFA;
|
|
@@ -5002,6 +5033,9 @@ input[type='button'] {
|
|
|
5002
5033
|
font-size: calc(var(--zaui-font-size, 14px) + var(--zaui-base-font-size, 0px));
|
|
5003
5034
|
color: var(--zaui-text, #464646);
|
|
5004
5035
|
}
|
|
5036
|
+
.ant-table .ant-empty-normal {
|
|
5037
|
+
margin: calc(var(--zaui-space-size-lg, 32px) * var(--zaui-size, 1)) 0;
|
|
5038
|
+
}
|
|
5005
5039
|
.ant-table.pro-table-no-stripe .ant-table-tbody .ant-table-row {
|
|
5006
5040
|
background: #fff !important;
|
|
5007
5041
|
}
|
|
@@ -5069,13 +5103,18 @@ input[type='button'] {
|
|
|
5069
5103
|
.ant-table table .ant-table-tbody > tr > td,
|
|
5070
5104
|
.ant-table table .ant-table tfoot > tr > th,
|
|
5071
5105
|
.ant-table table .ant-table tfoot > tr > td {
|
|
5072
|
-
padding: calc(
|
|
5106
|
+
padding: calc(4px + var(--zaui-size) * 8px);
|
|
5107
|
+
}
|
|
5108
|
+
.ant-table table .ant-table-tbody > tr > td > .ant-table-wrapper:only-child .ant-table,
|
|
5109
|
+
.ant-table table .ant-table-tbody > tr > td > .ant-table-expanded-row-fixed > .ant-table-wrapper:only-child .ant-table {
|
|
5110
|
+
margin-top: calc(var(--zaui-size) * -16px);
|
|
5111
|
+
margin-bottom: calc(var(--zaui-size) * -16px);
|
|
5073
5112
|
}
|
|
5074
5113
|
.ant-table.ant-table-scroll-horizontal table .ant-table-thead > tr > th,
|
|
5075
5114
|
.ant-table.ant-table-scroll-horizontal table .ant-table-tbody > tr > td,
|
|
5076
5115
|
.ant-table.ant-table-scroll-horizontal table .ant-table tfoot > tr > th,
|
|
5077
5116
|
.ant-table.ant-table-scroll-horizontal table .ant-table tfoot > tr > td {
|
|
5078
|
-
padding: calc(
|
|
5117
|
+
padding: calc(4px + var(--zaui-size) * 8px);
|
|
5079
5118
|
}
|
|
5080
5119
|
.ant-table.ant-table-scroll-horizontal table .ant-table-tbody .ant-table-row:nth-child(even) {
|
|
5081
5120
|
background-color: var(--zaui-table-strip-bg, #fafafa);
|
package/es/ProAction/index.less
CHANGED
package/es/ProDownload/index.js
CHANGED
|
@@ -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", "
|
|
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
|
|
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
|
|
122
|
+
return _ref2.apply(this, arguments);
|
|
120
123
|
};
|
|
121
124
|
}();
|
|
122
125
|
var cls = classNames(className, {
|
|
@@ -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
|
-
|
|
94
|
+
.@{ant-prefix}-drawer-body {
|
|
92
95
|
height: 100vh;
|
|
93
96
|
padding: 0;
|
|
94
97
|
overflow-y: hidden;
|
|
95
98
|
}
|
|
96
99
|
|
|
97
|
-
|
|
100
|
+
.@{ant-prefix}-drawer-content {
|
|
98
101
|
position: static;
|
|
99
102
|
}
|
|
100
103
|
|
|
101
|
-
|
|
104
|
+
.@{ant-prefix}-drawer-close {
|
|
102
105
|
display: none;
|
|
103
106
|
}
|
|
104
107
|
}
|
|
105
108
|
|
|
106
109
|
.pro-modal {
|
|
107
|
-
|
|
108
|
-
|
|
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
|
-
|
|
122
|
+
.@{ant-prefix}-modal-header {
|
|
120
123
|
padding: var(--zaui-space-size-md, 16px);
|
|
121
124
|
border-bottom: none;
|
|
122
125
|
|
|
123
|
-
|
|
126
|
+
.@{ant-prefix}-modal-title {
|
|
124
127
|
font-weight: 600;
|
|
125
128
|
}
|
|
126
129
|
}
|
|
127
130
|
|
|
128
|
-
|
|
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
|
-
|
|
139
|
-
|
|
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
|
-
|
|
150
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
8
|
+
.@{ant-prefix}-row {
|
|
6
9
|
display: block;
|
|
7
10
|
}
|
|
8
11
|
}
|
|
@@ -54,8 +57,8 @@
|
|
|
54
57
|
|
|
55
58
|
}
|
|
56
59
|
|
|
57
|
-
|
|
58
|
-
|
|
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
|
-
|
|
76
|
+
.@{ant-prefix}-popover-message {
|
|
74
77
|
display: block;
|
|
75
78
|
}
|
|
76
79
|
|
|
77
|
-
|
|
80
|
+
.@{ant-prefix}-popover-message-title {
|
|
78
81
|
padding-left: 0;
|
|
79
82
|
}
|
|
80
83
|
|
|
81
|
-
|
|
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
|
-
|
|
115
|
+
.@{ant-prefix}-form-item-label {
|
|
113
116
|
display: none;
|
|
114
117
|
}
|
|
115
118
|
}
|
|
116
119
|
}
|
|
117
120
|
|
|
118
|
-
|
|
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
|
-
|
|
133
|
+
.@{ant-prefix}-select {
|
|
131
134
|
width: 100%;
|
|
132
135
|
}
|
|
133
136
|
|
package/es/ProEditTable/index.js
CHANGED
|
@@ -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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
77
|
+
.@{ant-prefix}-space {
|
|
75
78
|
gap: var(--zaui-space-size-sm, 8px);
|
|
76
79
|
|
|
77
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
136
|
+
.@{ant-prefix}-table-content {
|
|
134
137
|
>table {
|
|
135
|
-
|
|
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
|
-
|
|
141
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
208
|
-
|
|
210
|
+
.@{ant-prefix}-table-cell {
|
|
211
|
+
.@{ant-prefix}-form-item {
|
|
209
212
|
margin-bottom: 0px !important;
|
|
210
213
|
}
|
|
211
214
|
}
|
|
212
215
|
|
|
213
|
-
|
|
216
|
+
.@{ant-prefix}-table.@{ant-prefix}-table-bordered>.@{ant-prefix}-table-container {
|
|
214
217
|
border: 0;
|
|
215
218
|
}
|
|
216
219
|
|
|
217
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
241
|
+
.@{ant-prefix}-table-tbody tr:nth-child(n)>td {
|
|
239
242
|
background-color: var(--zaui-base-bg, #ffffff);
|
|
240
243
|
}
|
|
241
244
|
|
|
242
|
-
|
|
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
|
-
|
|
249
|
+
.@{ant-prefix}-table-tbody>.@{ant-prefix}-table-placeholder>td {
|
|
247
250
|
background-color: var(--zaui-base-bg, #ffffff);
|
|
248
251
|
}
|
|
249
252
|
|
|
250
|
-
|
|
253
|
+
.@{ant-prefix}-table-tbody {
|
|
251
254
|
|
|
252
|
-
>tr:hover:not(
|
|
253
|
-
|
|
254
|
-
|
|
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
|
-
|
|
267
|
+
.@{ant-prefix}-table-fixed {
|
|
260
268
|
|
|
261
|
-
|
|
262
|
-
|
|
269
|
+
.@{ant-prefix}-table-row-hover,
|
|
270
|
+
.@{ant-prefix}-table-row-hover>td {
|
|
263
271
|
background: #FAFAFA;
|
|
264
272
|
}
|
|
265
273
|
}
|
|
266
274
|
|
|
267
|
-
|
|
268
|
-
|
|
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
|
-
|
|
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
|
-
|
|
285
|
+
.@{ant-prefix}-table-summary>tr>td {
|
|
278
286
|
border-bottom: none;
|
|
279
287
|
}
|
|
280
288
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
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
|
-
|
|
310
|
+
.@{ant-prefix}-space {
|
|
303
311
|
gap: var(--zaui-space-size-sm, 8px);
|
|
304
312
|
|
|
305
|
-
|
|
306
|
-
|
|
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
|
|
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(
|
|
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
|
});
|