@zat-design/sisyphus-react 3.2.2 → 3.3.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/index.esm.css +82 -37
- 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/index.js +1 -15
- package/es/ProDrawerForm/style/index.less +76 -73
- package/es/ProEditLabel/style/index.less +12 -9
- package/es/ProEditTable/components/RenderField/index.js +6 -4
- package/es/ProEditTable/index.js +34 -20
- package/es/ProEditTable/style/index.less +57 -47
- 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.d.ts +2 -2
- package/es/ProForm/components/base/DatePicker/index.js +5 -8
- package/es/ProForm/components/base/RangePicker/index.d.ts +3 -2
- package/es/ProForm/components/base/RangePicker/index.js +3 -5
- 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/index.js +3 -3
- package/es/ProForm/components/base/TimePicker/style/index.less +4 -1
- package/es/ProForm/components/combination/Container/style/index.less +6 -3
- package/es/ProForm/components/combination/FormList/style/index.less +20 -24
- package/es/ProForm/components/combination/Group/style/index.less +18 -15
- package/es/ProForm/components/combination/ProAddressBar/style/index.less +6 -3
- package/es/ProForm/components/combination/ProCombination/style/index.less +5 -2
- package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +6 -1
- package/es/ProForm/components/combination/ProModalSelect/index.js +22 -24
- package/es/ProForm/components/combination/ProModalSelect/style/index.less +32 -11
- package/es/ProForm/components/combination/ProNumberRange/style/index.less +13 -10
- package/es/ProForm/components/combination/ProRangeLimit/index.d.ts +2 -2
- package/es/ProForm/components/combination/ProRangeLimit/index.js +6 -6
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.d.ts +2 -2
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +2 -2
- package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +2 -2
- package/es/ProForm/components/combination/ProTimeLimit/index.js +4 -4
- package/es/ProForm/components/combination/ProTimeLimit/style/index.less +9 -6
- package/es/ProForm/components/old/ProCertValidity/index.js +16 -16
- package/es/ProForm/components/old/ProCertValidity/propsType.d.ts +4 -4
- package/es/ProForm/components/render/RenderFields.js +4 -5
- 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 +10 -7
- package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +31 -28
- package/es/ProLayout/components/Layout/Menu/SideMenu/style/index.less +14 -11
- package/es/ProLayout/components/Layout/Menu/style/index.less +2 -0
- package/es/ProLayout/components/Layout/Notice/style/index.less +3 -0
- package/es/ProLayout/components/ProCollapse/style/index.less +27 -24
- package/es/ProLayout/components/ProFooter/style/index.less +11 -7
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +4 -1
- package/es/ProLayout/components/ProHeader/index.js +4 -4
- package/es/ProLayout/components/ProHeader/style/index.less +12 -11
- package/es/ProLayout/style/index.less +10 -7
- package/es/ProSelect/index.less +3 -0
- package/es/ProStep/index.js +2 -2
- package/es/ProStep/style/index.less +3 -0
- package/es/ProTable/index.js +15 -7
- package/es/ProTable/style/index.less +76 -54
- package/es/ProTable/utils.d.ts +1 -1
- package/es/ProTable/utils.js +52 -33
- package/es/ProTabs/style/index.less +25 -23
- 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/components/ProTree.js +27 -11
- package/es/ProTree/components/Tree.js +1 -1
- package/es/ProTree/propsType.d.ts +2 -2
- package/es/ProTree/style/index.less +29 -26
- package/es/ProTree/utils.d.ts +6 -0
- package/es/ProTree/utils.js +11 -0
- 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 +38 -6
- package/es/ProTreeModal/propsType.d.ts +5 -2
- package/es/ProTreeModal/style/index.less +11 -8
- package/es/ProTreeSelect/index.js +6 -4
- package/es/ProTreeSelect/propsType.d.ts +2 -0
- package/es/ProTreeSelect/style/index.less +25 -22
- package/es/ProUpload/components/DragRender.js +7 -4
- package/es/ProUpload/components/ImageRender.js +5 -1
- package/es/ProUpload/index.js +11 -7
- package/es/ProUpload/style/index.less +13 -4
- package/es/ProViewer/index.js +3 -1
- package/es/ProViewer/style/index.less +6 -3
- package/es/locale/en_US.d.ts +4 -0
- package/es/locale/en_US.js +5 -1
- package/es/locale/index.js +2 -2
- package/es/locale/zh_CN.d.ts +4 -0
- package/es/locale/zh_CN.js +6 -2
- package/es/old/ProCertValidity/index.js +16 -16
- package/es/old/ProCertValidity/propsType.d.ts +4 -4
- package/es/old/ProEditableTable/utils.d.ts +5 -5
- package/es/old/ProEditableTable/utils.js +5 -5
- package/es/style/core/compatible.less +6 -6
- package/es/style/theme/antd.less +272 -253
- 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/index.js +0 -14
- package/lib/ProDrawerForm/style/index.less +76 -73
- package/lib/ProEditLabel/style/index.less +12 -9
- package/lib/ProEditTable/components/RenderField/index.js +6 -4
- package/lib/ProEditTable/index.js +32 -18
- package/lib/ProEditTable/style/index.less +57 -47
- 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.d.ts +2 -2
- package/lib/ProForm/components/base/DatePicker/index.js +5 -8
- package/lib/ProForm/components/base/RangePicker/index.d.ts +3 -2
- package/lib/ProForm/components/base/RangePicker/index.js +4 -4
- 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/index.js +3 -3
- package/lib/ProForm/components/base/TimePicker/style/index.less +4 -1
- package/lib/ProForm/components/combination/Container/style/index.less +6 -3
- package/lib/ProForm/components/combination/FormList/style/index.less +20 -24
- package/lib/ProForm/components/combination/Group/style/index.less +18 -15
- package/lib/ProForm/components/combination/ProAddressBar/style/index.less +6 -3
- package/lib/ProForm/components/combination/ProCombination/style/index.less +5 -2
- package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +7 -1
- package/lib/ProForm/components/combination/ProModalSelect/index.js +22 -24
- package/lib/ProForm/components/combination/ProModalSelect/style/index.less +32 -11
- package/lib/ProForm/components/combination/ProNumberRange/style/index.less +13 -10
- package/lib/ProForm/components/combination/ProRangeLimit/index.d.ts +2 -2
- package/lib/ProForm/components/combination/ProRangeLimit/index.js +6 -6
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.d.ts +2 -2
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +2 -2
- package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +2 -2
- package/lib/ProForm/components/combination/ProTimeLimit/index.js +4 -4
- package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +9 -6
- package/lib/ProForm/components/old/ProCertValidity/index.js +16 -16
- package/lib/ProForm/components/old/ProCertValidity/propsType.d.ts +4 -4
- package/lib/ProForm/components/render/RenderFields.js +4 -5
- 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 +10 -7
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +31 -28
- package/lib/ProLayout/components/Layout/Menu/SideMenu/style/index.less +14 -11
- package/lib/ProLayout/components/Layout/Menu/style/index.less +2 -0
- package/lib/ProLayout/components/Layout/Notice/style/index.less +3 -0
- package/lib/ProLayout/components/ProCollapse/style/index.less +27 -24
- package/lib/ProLayout/components/ProFooter/style/index.less +11 -7
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +4 -1
- package/lib/ProLayout/components/ProHeader/index.js +4 -4
- package/lib/ProLayout/components/ProHeader/style/index.less +12 -11
- package/lib/ProLayout/style/index.less +10 -7
- package/lib/ProSelect/index.less +3 -0
- package/lib/ProStep/index.js +1 -1
- package/lib/ProStep/style/index.less +3 -0
- package/lib/ProTable/index.js +14 -6
- package/lib/ProTable/style/index.less +76 -54
- package/lib/ProTable/utils.d.ts +1 -1
- package/lib/ProTable/utils.js +52 -33
- package/lib/ProTabs/style/index.less +25 -23
- 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/components/ProTree.js +26 -10
- package/lib/ProTree/components/Tree.js +1 -1
- package/lib/ProTree/propsType.d.ts +2 -2
- package/lib/ProTree/style/index.less +29 -26
- package/lib/ProTree/utils.d.ts +6 -0
- package/lib/ProTree/utils.js +12 -0
- 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 +38 -6
- package/lib/ProTreeModal/propsType.d.ts +5 -2
- package/lib/ProTreeModal/style/index.less +11 -8
- package/lib/ProTreeSelect/index.js +6 -4
- package/lib/ProTreeSelect/propsType.d.ts +2 -0
- package/lib/ProTreeSelect/style/index.less +25 -22
- package/lib/ProUpload/components/DragRender.js +7 -4
- package/lib/ProUpload/components/ImageRender.js +5 -1
- package/lib/ProUpload/index.js +11 -7
- package/lib/ProUpload/style/index.less +13 -4
- package/lib/ProViewer/index.js +4 -3
- package/lib/ProViewer/style/index.less +6 -3
- package/lib/locale/en_US.d.ts +4 -0
- package/lib/locale/en_US.js +5 -1
- package/lib/locale/index.js +2 -2
- package/lib/locale/zh_CN.d.ts +4 -0
- package/lib/locale/zh_CN.js +6 -2
- package/lib/old/ProCertValidity/index.js +16 -16
- package/lib/old/ProCertValidity/propsType.d.ts +4 -4
- package/lib/old/ProEditableTable/utils.d.ts +5 -5
- package/lib/old/ProEditableTable/utils.js +5 -5
- package/lib/style/core/compatible.less +6 -6
- package/lib/style/theme/antd.less +272 -253
- package/package.json +3 -2
- package/typings.d.ts +0 -6
package/lib/ProAction/index.less
CHANGED
package/lib/ProDownload/index.js
CHANGED
|
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
10
9
|
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
|
|
11
10
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
12
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
13
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -17,7 +17,8 @@ var _antd = require("antd");
|
|
|
17
17
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
18
18
|
var _lodash = _interopRequireWildcard(require("lodash"));
|
|
19
19
|
var _utils = require("./utils");
|
|
20
|
-
var
|
|
20
|
+
var _ProConfigProvider = require("../ProConfigProvider");
|
|
21
|
+
var _excluded = ["source", "action", "url", "method", "params", "fileName", "children", "onFinish", "beforeDownload", "className", "transformResponse"];
|
|
21
22
|
var ProDownload = function ProDownload(props) {
|
|
22
23
|
var source = props.source,
|
|
23
24
|
action = props.action,
|
|
@@ -25,7 +26,6 @@ var ProDownload = function ProDownload(props) {
|
|
|
25
26
|
method = props.method,
|
|
26
27
|
params = props.params,
|
|
27
28
|
fileName = props.fileName,
|
|
28
|
-
headers = props.headers,
|
|
29
29
|
children = props.children,
|
|
30
30
|
onFinish = props.onFinish,
|
|
31
31
|
beforeDownload = props.beforeDownload,
|
|
@@ -38,8 +38,11 @@ var ProDownload = function ProDownload(props) {
|
|
|
38
38
|
_useSetState2 = (0, _slicedToArray2.default)(_useSetState, 2),
|
|
39
39
|
loading = _useSetState2[0].loading,
|
|
40
40
|
setState = _useSetState2[1];
|
|
41
|
+
var _ref = (0, _ProConfigProvider.useProConfig)('ProDownload') || {},
|
|
42
|
+
headers = _ref.headers;
|
|
43
|
+
defaultProps.headers = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, headers), defaultProps.headers);
|
|
41
44
|
var handDownload = /*#__PURE__*/function () {
|
|
42
|
-
var
|
|
45
|
+
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
|
|
43
46
|
var _params;
|
|
44
47
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
|
45
48
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -94,7 +97,7 @@ var ProDownload = function ProDownload(props) {
|
|
|
94
97
|
return (0, _utils.DownloadRequest)({
|
|
95
98
|
url: url || action,
|
|
96
99
|
method: method,
|
|
97
|
-
headers: headers,
|
|
100
|
+
headers: defaultProps.headers,
|
|
98
101
|
params: _params,
|
|
99
102
|
transformResponse: transformResponse,
|
|
100
103
|
fileName: fileName,
|
|
@@ -123,7 +126,7 @@ var ProDownload = function ProDownload(props) {
|
|
|
123
126
|
}, _callee, null, [[14, 19, 23, 26]]);
|
|
124
127
|
}));
|
|
125
128
|
return function handDownload() {
|
|
126
|
-
return
|
|
129
|
+
return _ref2.apply(this, arguments);
|
|
127
130
|
};
|
|
128
131
|
}();
|
|
129
132
|
var cls = (0, _classnames.default)(className, {
|
|
@@ -57,20 +57,6 @@ var ProDrawerForm = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
57
57
|
Modal: _components.ProModal
|
|
58
58
|
}[showType];
|
|
59
59
|
}, [showType]);
|
|
60
|
-
var removeStyle = function removeStyle() {
|
|
61
|
-
var styleTags = document.getElementsByTagName('style');
|
|
62
|
-
for (var i = 0; i < styleTags.length; i++) {
|
|
63
|
-
var rcUtilKey = styleTags[i].getAttribute('rc-util-key');
|
|
64
|
-
if ((rcUtilKey === null || rcUtilKey === void 0 ? void 0 : rcUtilKey.indexOf('rc-util-locker')) === 0) {
|
|
65
|
-
styleTags[i].remove();
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
(0, _react.useEffect)(function () {
|
|
70
|
-
if (!visible) {
|
|
71
|
-
removeStyle();
|
|
72
|
-
}
|
|
73
|
-
}, [visible]);
|
|
74
60
|
return (0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
75
61
|
children: visible ? (0, _jsxRuntime.jsx)(Com, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
76
62
|
isView: isView,
|
|
@@ -1,82 +1,86 @@
|
|
|
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
|
-
position
|
|
4
|
-
top
|
|
5
|
-
left
|
|
6
|
-
display
|
|
7
|
-
align-items
|
|
6
|
+
position: absolute;
|
|
7
|
+
top: 6px;
|
|
8
|
+
left: -34px;
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
8
11
|
justify-content: center;
|
|
9
|
-
width
|
|
10
|
-
height
|
|
11
|
-
color
|
|
12
|
-
cursor
|
|
12
|
+
width: 32px;
|
|
13
|
+
height: 38px;
|
|
14
|
+
color: var(--zaui-global-bg, #fff);
|
|
15
|
+
cursor: pointer;
|
|
13
16
|
|
|
14
17
|
.close-icon {
|
|
15
|
-
position
|
|
16
|
-
left
|
|
17
|
-
z-index
|
|
18
|
+
position: relative;
|
|
19
|
+
left: 2px;
|
|
20
|
+
z-index: 1;
|
|
18
21
|
font-size: var(--zaui-font-size-lg, 16px);
|
|
19
22
|
transform: translateZ(100px);
|
|
20
|
-
fill
|
|
23
|
+
fill: var(--zaui-aide-text, #909090);
|
|
21
24
|
|
|
22
25
|
&:hover {
|
|
23
|
-
fill: var(--zaui-brand-active, #
|
|
26
|
+
fill: var(--zaui-brand-active, #005ad9);
|
|
24
27
|
}
|
|
25
28
|
|
|
26
|
-
>div {
|
|
29
|
+
> div {
|
|
27
30
|
height: 20px;
|
|
28
31
|
}
|
|
29
32
|
}
|
|
30
33
|
}
|
|
31
34
|
|
|
32
35
|
.pro-drawer-close::after {
|
|
33
|
-
position
|
|
34
|
-
top
|
|
35
|
-
right
|
|
36
|
-
bottom
|
|
37
|
-
left
|
|
36
|
+
position: absolute;
|
|
37
|
+
top: 0;
|
|
38
|
+
right: 0;
|
|
39
|
+
bottom: 0;
|
|
40
|
+
left: 0;
|
|
38
41
|
background-color: var(--zaui-global-bg, #fff);
|
|
39
|
-
border-radius
|
|
40
|
-
transform
|
|
41
|
-
content
|
|
42
|
+
border-radius: 4px 0px 0px 4px;
|
|
43
|
+
transform: perspective(0.15em) rotateY(-2deg);
|
|
44
|
+
content: '';
|
|
42
45
|
}
|
|
43
46
|
|
|
44
47
|
.pro-drawer-title {
|
|
45
|
-
position
|
|
46
|
-
top
|
|
47
|
-
left
|
|
48
|
-
width
|
|
49
|
-
height
|
|
50
|
-
padding
|
|
51
|
-
color
|
|
52
|
-
font-weight
|
|
53
|
-
font-size
|
|
48
|
+
position: absolute;
|
|
49
|
+
top: 0;
|
|
50
|
+
left: 0;
|
|
51
|
+
width: 100%;
|
|
52
|
+
height: 64px;
|
|
53
|
+
padding: var(--zaui-space-size-md, 16px) var(--zaui-space-size-lg, 32px);
|
|
54
|
+
color: var(--zaui-text, #343434);
|
|
55
|
+
font-weight: 600;
|
|
56
|
+
font-size: var(--zaui-font-size-xxl, 20px);
|
|
54
57
|
background-color: var(--zaui-global-bg, #fff);
|
|
55
58
|
}
|
|
56
59
|
|
|
57
60
|
.pro-drawer-scrolling {
|
|
58
|
-
z-index
|
|
61
|
+
z-index: 1;
|
|
59
62
|
box-shadow: -12px 14px 14px -18px var(--zaui-shadow, rgba(56, 56, 56, 0.15));
|
|
60
63
|
}
|
|
61
64
|
|
|
62
65
|
.pro-drawer-content {
|
|
63
|
-
flex
|
|
64
|
-
width
|
|
65
|
-
padding
|
|
66
|
+
flex: 1;
|
|
67
|
+
width: 100%;
|
|
68
|
+
padding: var(--zaui-space-size-md, 16px) var(--zaui-space-size-lg, 32px);
|
|
66
69
|
padding-top: 0;
|
|
67
|
-
overflow-x
|
|
68
|
-
overflow-y
|
|
70
|
+
overflow-x: hidden;
|
|
71
|
+
overflow-y: auto;
|
|
69
72
|
}
|
|
70
73
|
|
|
71
74
|
.pro-drawer-footer {
|
|
72
|
-
position
|
|
73
|
-
bottom
|
|
74
|
-
left
|
|
75
|
-
z-index
|
|
76
|
-
width
|
|
77
|
-
padding
|
|
75
|
+
position: absolute;
|
|
76
|
+
bottom: 0;
|
|
77
|
+
left: 0;
|
|
78
|
+
z-index: 101;
|
|
79
|
+
width: 100%;
|
|
80
|
+
padding: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1))
|
|
81
|
+
var(--zaui-space-size-lg, 32px);
|
|
78
82
|
background-color: var(--zaui-global-bg, #fff);
|
|
79
|
-
box-shadow
|
|
83
|
+
box-shadow: 8px 2px 8px 0 var(--zaui-shadow, rgba(56, 56, 56, 0.15));
|
|
80
84
|
|
|
81
85
|
button {
|
|
82
86
|
margin-right: var(--zaui-space-size-sm, 8px);
|
|
@@ -87,24 +91,24 @@
|
|
|
87
91
|
}
|
|
88
92
|
}
|
|
89
93
|
|
|
90
|
-
|
|
91
|
-
height
|
|
92
|
-
padding
|
|
94
|
+
.@{ant-prefix}-drawer-body {
|
|
95
|
+
height: 100vh;
|
|
96
|
+
padding: 0;
|
|
93
97
|
overflow-y: hidden;
|
|
94
98
|
}
|
|
95
99
|
|
|
96
|
-
|
|
100
|
+
.@{ant-prefix}-drawer-content {
|
|
97
101
|
position: static;
|
|
98
102
|
}
|
|
99
103
|
|
|
100
|
-
|
|
104
|
+
.@{ant-prefix}-drawer-close {
|
|
101
105
|
display: none;
|
|
102
106
|
}
|
|
103
107
|
}
|
|
104
108
|
|
|
105
109
|
.pro-modal {
|
|
106
|
-
|
|
107
|
-
|
|
110
|
+
.@{ant-prefix}-modal-close {
|
|
111
|
+
.@{ant-prefix}-modal-close-x {
|
|
108
112
|
.close-icon {
|
|
109
113
|
fill: var(--zaui-aide-text, #909090);
|
|
110
114
|
|
|
@@ -115,40 +119,39 @@
|
|
|
115
119
|
}
|
|
116
120
|
}
|
|
117
121
|
|
|
118
|
-
|
|
119
|
-
padding
|
|
122
|
+
.@{ant-prefix}-modal-header {
|
|
123
|
+
padding: var(--zaui-space-size-md, 16px);
|
|
120
124
|
border-bottom: none;
|
|
121
125
|
|
|
122
|
-
|
|
126
|
+
.@{ant-prefix}-modal-title {
|
|
123
127
|
font-weight: 600;
|
|
124
128
|
}
|
|
125
129
|
}
|
|
126
130
|
|
|
127
|
-
|
|
128
|
-
padding
|
|
131
|
+
.@{ant-prefix}-modal-footer {
|
|
132
|
+
padding: var(--zaui-space-size-md, 16px);
|
|
129
133
|
border-top: none;
|
|
130
134
|
|
|
131
135
|
.pro-modal-footer {
|
|
132
|
-
display
|
|
136
|
+
display: flex;
|
|
133
137
|
justify-content: space-between;
|
|
134
138
|
}
|
|
135
139
|
}
|
|
136
140
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
max-height
|
|
140
|
-
padding
|
|
141
|
+
.@{ant-prefix}-modal-content {
|
|
142
|
+
.@{ant-prefix}-modal-body {
|
|
143
|
+
max-height: 450px;
|
|
144
|
+
padding: 0 var(--zaui-space-size-md, 16px);
|
|
141
145
|
padding-top: 0;
|
|
142
|
-
overflow
|
|
146
|
+
overflow: auto;
|
|
143
147
|
}
|
|
144
148
|
}
|
|
145
|
-
|
|
146
149
|
}
|
|
147
150
|
|
|
148
151
|
.pro-modal-no-footer {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
padding-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1))
|
|
152
|
+
.@{ant-prefix}-modal-content {
|
|
153
|
+
.@{ant-prefix}-modal-body {
|
|
154
|
+
padding-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
|
|
152
155
|
}
|
|
153
156
|
}
|
|
154
157
|
}
|
|
@@ -156,17 +159,17 @@
|
|
|
156
159
|
.pro-modal-scrolling {
|
|
157
160
|
z-index: 1;
|
|
158
161
|
|
|
159
|
-
|
|
162
|
+
.@{ant-prefix}-modal-header {
|
|
163
|
+
position: relative;
|
|
164
|
+
z-index: 1;
|
|
160
165
|
box-shadow: -12px 14px 14px -18px var(--zaui-shadow, rgba(56, 56, 56, 0.15));
|
|
161
|
-
position : relative;
|
|
162
|
-
z-index : 1;
|
|
163
166
|
}
|
|
164
167
|
}
|
|
165
168
|
|
|
166
169
|
.pro-modal-footer-shadow {
|
|
167
|
-
|
|
168
|
-
position
|
|
169
|
-
z-index
|
|
170
|
+
.@{ant-prefix}-modal-footer {
|
|
171
|
+
position: relative;
|
|
172
|
+
z-index: 1;
|
|
170
173
|
box-shadow: 3px 2px 12px 0px var(--zaui-shadow, rgba(56, 56, 56, 0.15));
|
|
171
174
|
}
|
|
172
175
|
}
|
|
@@ -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
|
|
|
@@ -509,7 +509,7 @@ var RenderField = function RenderField(_ref) {
|
|
|
509
509
|
delete _formItemProps.rules;
|
|
510
510
|
}
|
|
511
511
|
var _className = (0, _classnames.default)((_classNames = {}, (0, _defineProperty2.default)(_classNames, className, className), (0, _defineProperty2.default)(_classNames, 'pro-form-item-changed', changed), _classNames));
|
|
512
|
-
var originalTitle = (0, _jsxRuntime.jsxs)(_antd.Space, {
|
|
512
|
+
var originalTitle = originalTip ? (0, _jsxRuntime.jsxs)(_antd.Space, {
|
|
513
513
|
children: ["\u521D\u59CB\u503C\uFF1A", /*#__PURE__*/_react.default.isValidElement(TargetComponent) ? /*#__PURE__*/_react.default.cloneElement(TargetComponent, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _lodash.omit)(componentProps, ['onFieldChange'])), {}, {
|
|
514
514
|
isView: true,
|
|
515
515
|
value: originalValue,
|
|
@@ -519,14 +519,16 @@ var RenderField = function RenderField(_ref) {
|
|
|
519
519
|
value: originalValue,
|
|
520
520
|
checked: type === 'Switch' ? originalValue : undefined
|
|
521
521
|
}))]
|
|
522
|
-
});
|
|
523
|
-
var FormItem = (0, _jsxRuntime.jsx)(_antd.Form.Item, (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
522
|
+
}) : null;
|
|
523
|
+
var FormItem = TargetComponent ? (0, _jsxRuntime.jsx)(_antd.Form.Item, (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
524
524
|
validateFirst: true
|
|
525
525
|
}, (0, _lodash.omit)(_formItemProps, ['render', 'cache', 'key', 'width', 'hiddenNames', 'name'])), {}, {
|
|
526
526
|
className: _className,
|
|
527
527
|
name: cellName,
|
|
528
528
|
children: /*#__PURE__*/_react.default.isValidElement(TargetComponent) ? /*#__PURE__*/_react.default.cloneElement(TargetComponent, (0, _objectSpread2.default)({}, (0, _lodash.omit)(componentProps, ['onFieldChange']))) : (0, _jsxRuntime.jsx)(TargetComponent, (0, _objectSpread2.default)({}, (0, _lodash.omit)(componentProps, ['onFieldChange'])))
|
|
529
|
-
}))
|
|
529
|
+
})) : (0, _jsxRuntime.jsx)(_Container.default, {
|
|
530
|
+
viewEmpty: viewEmpty
|
|
531
|
+
});
|
|
530
532
|
return (0, _jsxRuntime.jsx)(_useFieldProps.FieldProvider, {
|
|
531
533
|
value: componentProps === null || componentProps === void 0 ? void 0 : componentProps.otherProps,
|
|
532
534
|
children: !originalTip || ['FormList', 'ProEditTable'].includes(type) ? FormItem : (0, _jsxRuntime.jsx)(_antd.Tooltip, {
|
|
@@ -13,7 +13,7 @@ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/obje
|
|
|
13
13
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
14
14
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
15
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
-
var _react = require("react");
|
|
16
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
17
17
|
var _lodash = require("lodash");
|
|
18
18
|
var _ahooks = require("ahooks");
|
|
19
19
|
var _antd = require("antd");
|
|
@@ -23,7 +23,7 @@ var _tools = require("./utils/tools");
|
|
|
23
23
|
var _components = require("./components");
|
|
24
24
|
var _empty = _interopRequireDefault(require("../assets/empty.png"));
|
|
25
25
|
var _locale = _interopRequireWildcard(require("../locale"));
|
|
26
|
-
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"];
|
|
26
|
+
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"];
|
|
27
27
|
var ProEditTable = function ProEditTable(_ref, ref) {
|
|
28
28
|
var _resetProps$id, _resetProps$id$split, _value$2;
|
|
29
29
|
var value = _ref.value,
|
|
@@ -53,6 +53,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
53
53
|
pagination = _ref.pagination,
|
|
54
54
|
originalValues = _ref.originalValues,
|
|
55
55
|
originalTip = _ref.originalTip,
|
|
56
|
+
rowKey = _ref.rowKey,
|
|
56
57
|
resetProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
57
58
|
// 上下文form
|
|
58
59
|
var contentForm = _antd.Form.useFormInstance();
|
|
@@ -63,6 +64,9 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
63
64
|
_otherProps$viewEmpty = otherProps.viewEmpty,
|
|
64
65
|
viewEmpty = _otherProps$viewEmpty === void 0 ? '-' : _otherProps$viewEmpty;
|
|
65
66
|
var tableRef = (0, _react.useRef)(null);
|
|
67
|
+
var _React$useContext = _react.default.useContext(_antd.ConfigProvider.ConfigContext),
|
|
68
|
+
getPrefixCls = _React$useContext.getPrefixCls;
|
|
69
|
+
var prefixCls = getPrefixCls();
|
|
66
70
|
disabled = (otherProps === null || otherProps === void 0 ? void 0 : otherProps.disabled) || disabled;
|
|
67
71
|
var _useSetState = (0, _ahooks.useSetState)({
|
|
68
72
|
_columns: columns,
|
|
@@ -97,21 +101,13 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
97
101
|
'pro-table-no-stripe': !stripe,
|
|
98
102
|
className: className
|
|
99
103
|
});
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
// 复选框
|
|
105
|
-
var _rowSelection = (0, _objectSpread2.default)({
|
|
106
|
-
fixed: true,
|
|
107
|
-
selectedRowKeys: selectedRowKeys,
|
|
108
|
-
onChange: function onChange(selectedRowKeys, selectedRows) {
|
|
109
|
-
setState({
|
|
110
|
-
selectedRowKeys: selectedRowKeys,
|
|
111
|
-
selectedRows: selectedRows
|
|
112
|
-
});
|
|
104
|
+
var getRowKey = function getRowKey(record) {
|
|
105
|
+
var key = record.rowKey || (0, _tools.getRandom)();
|
|
106
|
+
if (rowKey) {
|
|
107
|
+
key = typeof rowKey === 'function' ? rowKey(record) : record[rowKey];
|
|
113
108
|
}
|
|
114
|
-
|
|
109
|
+
return key;
|
|
110
|
+
};
|
|
115
111
|
var config = {
|
|
116
112
|
form: form,
|
|
117
113
|
mode: mode,
|
|
@@ -141,8 +137,26 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
141
137
|
tableLength: value === null || value === void 0 ? void 0 : value.length,
|
|
142
138
|
page: page,
|
|
143
139
|
originalValues: originalValues,
|
|
144
|
-
originalTip: originalTip
|
|
140
|
+
originalTip: originalTip,
|
|
141
|
+
prefixCls: prefixCls
|
|
145
142
|
};
|
|
143
|
+
// 编辑行设置下样式
|
|
144
|
+
var _rowClassName = function _rowClassName(record) {
|
|
145
|
+
var isEdit = !virtualKey || editingKeys.includes(record.rowKey);
|
|
146
|
+
var className = isEdit ? 'is-editing' : '';
|
|
147
|
+
return className;
|
|
148
|
+
};
|
|
149
|
+
// 复选框
|
|
150
|
+
var _rowSelection = (0, _objectSpread2.default)({
|
|
151
|
+
fixed: true,
|
|
152
|
+
selectedRowKeys: selectedRowKeys,
|
|
153
|
+
onChange: function onChange(selectedRowKeys, selectedRows) {
|
|
154
|
+
setState({
|
|
155
|
+
selectedRowKeys: selectedRowKeys,
|
|
156
|
+
selectedRows: selectedRows
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
}, rowSelection);
|
|
146
160
|
// 判断是否禁止添加、批量删除
|
|
147
161
|
var isForbiddenBtn = (0, _react.useCallback)(function (type) {
|
|
148
162
|
// 当工具栏不渲染时,都不渲染
|
|
@@ -236,7 +250,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
236
250
|
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)) {
|
|
237
251
|
var nextValues = value === null || value === void 0 ? void 0 : value.map(function (item) {
|
|
238
252
|
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), {}, {
|
|
239
|
-
rowKey: (
|
|
253
|
+
rowKey: getRowKey(item)
|
|
240
254
|
});
|
|
241
255
|
});
|
|
242
256
|
onChange(nextValues);
|