@zat-design/sisyphus-react 3.1.5 → 3.2.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/dist/index.esm.css +190 -265
- package/es/ProAction/index.js +7 -5
- package/es/ProAction/index.less +3 -2
- package/es/ProConfigProvider/index.d.ts +2 -0
- package/es/ProConfigProvider/index.js +23 -2
- package/es/ProDownload/utils.js +6 -3
- package/es/ProDrawerForm/components/ProDrawer/index.js +6 -4
- package/es/ProDrawerForm/index.js +5 -3
- package/es/ProDrawerForm/style/index.less +15 -11
- package/es/ProEditLabel/style/index.less +2 -2
- package/es/ProEditTable/components/ActionButton/index.js +3 -2
- package/es/ProEditTable/components/RenderField/index.js +2 -1
- package/es/ProEditTable/index.js +7 -6
- package/es/ProEditTable/style/index.less +15 -8
- package/es/ProEditTable/utils/config.d.ts +8 -8
- package/es/ProEditTable/utils/config.js +20 -12
- package/es/ProEditTable/utils/index.js +3 -2
- package/es/ProEnum/hooks/useEnumRequest.js +17 -10
- package/es/ProEnum/index.js +9 -4
- package/es/ProEnum/style/index.less +1 -1
- package/es/ProForm/components/FormFooter/index.js +16 -20
- package/es/ProForm/components/base/Input/index.js +4 -3
- package/es/ProForm/components/base/InputNumber/index.js +4 -3
- package/es/ProForm/components/base/RangePicker/index.js +0 -3
- package/es/ProForm/components/base/Select/index.js +2 -1
- package/es/ProForm/components/base/Switch/index.js +9 -5
- package/es/ProForm/components/base/SwitchCheckbox/index.js +2 -1
- package/es/ProForm/components/base/TextArea/index.js +4 -2
- package/es/ProForm/components/base/TextArea/index.less +1 -1
- package/es/ProForm/components/combination/Container/style/index.less +0 -1
- package/es/ProForm/components/combination/FormList/components/ActionButton.js +13 -17
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +2 -1
- package/es/ProForm/components/combination/FormList/style/index.less +20 -19
- package/es/ProForm/components/combination/Group/index.js +2 -2
- package/es/ProForm/components/combination/ProAddressBar/index.js +83 -63
- package/es/ProForm/components/combination/ProAddressBar/propsType.d.ts +3 -2
- package/es/ProForm/components/combination/ProModalSelect/index.js +76 -15
- package/es/ProForm/components/combination/ProModalSelect/propsType.d.ts +1 -0
- package/es/ProForm/components/combination/ProModalSelect/style/index.less +3 -3
- package/es/ProForm/components/combination/ProNumberRange/index.js +3 -2
- package/es/ProForm/components/combination/ProNumberRange/style/index.less +1 -1
- package/es/ProForm/components/combination/ProRangeLimit/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProRangeLimit/index.js +3 -7
- package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +10 -5
- package/es/ProForm/components/combination/ProTimeLimit/index.js +4 -11
- package/es/ProForm/components/combination/ProTimeLimit/style/index.less +18 -1
- package/es/ProForm/components/old/EnumSelect/style/index.less +7 -8
- package/es/ProForm/components/render/Render.js +4 -2
- package/es/ProForm/components/render/RenderFields.js +10 -6
- package/es/ProForm/components/render/propsType.d.ts +5 -4
- package/es/ProForm/index.js +14 -2
- package/es/ProForm/style/index.less +76 -168
- package/es/ProForm/utils/index.d.ts +1 -1
- package/es/ProForm/utils/index.js +7 -2
- package/es/ProForm/utils/rulesCreator.js +2 -1
- package/es/ProForm/utils/useRules.js +4 -3
- package/es/ProForm/utils/useShouldUpdate.js +16 -16
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +6 -0
- package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +7 -8
- package/es/ProLayout/components/Layout/Notice/index.js +3 -2
- package/es/ProLayout/components/ProCollapse/style/index.less +4 -4
- package/es/ProLayout/components/ProHeader/components/Copy/index.js +2 -1
- package/es/{old → ProLayout/components/ProHeader/components}/ProBackBtn/index.js +2 -1
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +21 -0
- package/es/ProLayout/components/ProHeader/components/index.d.ts +1 -0
- package/es/ProLayout/components/ProHeader/components/index.js +2 -1
- package/es/ProLayout/components/ProHeader/index.js +9 -6
- package/es/ProLayout/components/ProHeader/style/index.less +16 -7
- package/es/ProLayout/utils/index.js +1 -1
- package/es/ProSelect/index.d.ts +3 -3
- package/es/ProSelect/index.js +4 -2
- package/es/ProStep/components/Step/index.js +3 -1
- package/es/ProStep/style/index.less +0 -1
- package/es/ProTable/components/RenderColumn/index.d.ts +5 -5
- package/es/ProTable/components/RenderColumn/index.js +41 -25
- package/es/ProTable/index.js +10 -8
- package/es/ProTable/propsType.d.ts +2 -0
- package/es/ProTable/style/index.less +14 -1
- package/es/ProTable/useAntdTable.d.ts +12 -4
- package/es/ProTable/useAntdTable.js +18 -6
- package/es/ProTable/utils.d.ts +1 -1
- package/es/ProTable/utils.js +258 -201
- package/es/ProTabs/style/index.less +1 -1
- package/es/ProThemeTools/component/PrdTools/index.js +1 -1
- package/es/ProThemeTools/component/PrdTools/style/index.less +3 -3
- package/es/ProThemeTools/index.d.ts +2 -2
- package/es/ProThemeTools/index.js +24 -17
- package/es/ProThemeTools/propsType.d.ts +8 -6
- package/es/ProThemeTools/style/index.less +2 -2
- package/es/ProThemeTools/utils/index.d.ts +7 -0
- package/es/ProThemeTools/utils/index.js +19 -1
- package/es/ProTree/components/ProTree.js +6 -5
- package/es/ProTree/components/SearchTitle.d.ts +2 -2
- package/es/ProTree/components/SearchTitle.js +11 -1
- package/es/ProTree/components/Tree.js +9 -2
- package/es/ProTree/style/index.less +194 -142
- package/es/ProTreeModal/components/List.js +0 -14
- package/es/ProTreeModal/components/Trigger.js +9 -3
- package/es/ProTreeModal/index.js +29 -13
- package/es/ProTreeModal/style/index.less +15 -19
- package/es/ProUpload/components/ButtonRender.js +5 -2
- package/es/ProUpload/components/DragRender.js +8 -8
- package/es/ProUpload/components/Example.js +3 -1
- package/es/ProUpload/components/ImageRender.js +8 -6
- package/es/ProUpload/index.js +8 -6
- package/es/ProUpload/style/index.less +41 -39
- package/es/index.d.ts +2 -1
- package/es/index.js +2 -1
- package/es/locale/en_US.d.ts +138 -0
- package/es/locale/en_US.js +137 -0
- package/es/locale/index.d.ts +13 -0
- package/es/locale/index.js +32 -0
- package/es/locale/zh_CN.d.ts +137 -0
- package/es/locale/zh_CN.js +136 -0
- package/es/old/ProEditableTable/style/index.less +1 -2
- package/es/style/components.less +0 -1
- package/es/style/core/normalize.less +1 -2
- package/es/style/theme/antd.less +3 -4
- package/es/style/theme/index.less +80 -79
- package/es/style/theme/tokens.less +1 -0
- package/lib/ProAction/index.js +7 -5
- package/lib/ProAction/index.less +3 -2
- package/lib/ProConfigProvider/index.d.ts +2 -0
- package/lib/ProConfigProvider/index.js +22 -2
- package/lib/ProDownload/utils.js +4 -3
- package/lib/ProDrawerForm/components/ProDrawer/index.js +6 -4
- package/lib/ProDrawerForm/index.js +5 -3
- package/lib/ProDrawerForm/style/index.less +15 -11
- package/lib/ProEditLabel/style/index.less +2 -2
- package/lib/ProEditTable/components/ActionButton/index.js +3 -2
- package/lib/ProEditTable/components/RenderField/index.js +4 -1
- package/lib/ProEditTable/index.js +7 -6
- package/lib/ProEditTable/style/index.less +15 -8
- package/lib/ProEditTable/utils/config.d.ts +8 -8
- package/lib/ProEditTable/utils/config.js +20 -12
- package/lib/ProEditTable/utils/index.js +3 -2
- package/lib/ProEnum/hooks/useEnumRequest.js +17 -10
- package/lib/ProEnum/index.js +9 -4
- package/lib/ProEnum/style/index.less +1 -1
- package/lib/ProForm/components/FormFooter/index.js +16 -19
- package/lib/ProForm/components/base/Input/index.js +4 -3
- package/lib/ProForm/components/base/InputNumber/index.js +4 -3
- package/lib/ProForm/components/base/RangePicker/index.js +1 -4
- package/lib/ProForm/components/base/Select/index.js +2 -1
- package/lib/ProForm/components/base/Switch/index.js +8 -5
- package/lib/ProForm/components/base/SwitchCheckbox/index.js +2 -1
- package/lib/ProForm/components/base/TextArea/index.js +4 -2
- package/lib/ProForm/components/base/TextArea/index.less +1 -1
- package/lib/ProForm/components/combination/Container/style/index.less +0 -1
- package/lib/ProForm/components/combination/FormList/components/ActionButton.js +13 -17
- package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +2 -1
- package/lib/ProForm/components/combination/FormList/style/index.less +20 -19
- package/lib/ProForm/components/combination/Group/index.js +2 -2
- package/lib/ProForm/components/combination/ProAddressBar/index.js +78 -60
- package/lib/ProForm/components/combination/ProAddressBar/propsType.d.ts +3 -2
- package/lib/ProForm/components/combination/ProModalSelect/index.js +76 -15
- package/lib/ProForm/components/combination/ProModalSelect/propsType.d.ts +1 -0
- package/lib/ProForm/components/combination/ProModalSelect/style/index.less +3 -3
- package/lib/ProForm/components/combination/ProNumberRange/index.js +3 -2
- package/lib/ProForm/components/combination/ProNumberRange/style/index.less +1 -1
- package/lib/ProForm/components/combination/ProRangeLimit/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProRangeLimit/index.js +3 -7
- package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +10 -5
- package/lib/ProForm/components/combination/ProTimeLimit/index.js +4 -11
- package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +18 -1
- package/lib/ProForm/components/old/EnumSelect/style/index.less +7 -8
- package/lib/ProForm/components/old/InputRange/index.js +0 -1
- package/lib/ProForm/components/old/ProCertValidity/index.js +1 -1
- package/lib/ProForm/components/render/Render.js +5 -2
- package/lib/ProForm/components/render/RenderFields.js +9 -5
- package/lib/ProForm/components/render/propsType.d.ts +5 -4
- package/lib/ProForm/index.js +14 -2
- package/lib/ProForm/style/index.less +76 -168
- package/lib/ProForm/utils/index.d.ts +1 -1
- package/lib/ProForm/utils/index.js +7 -2
- package/lib/ProForm/utils/rulesCreator.js +2 -1
- package/lib/ProForm/utils/useRules.js +4 -3
- package/lib/ProForm/utils/useShouldUpdate.js +16 -16
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +6 -0
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +7 -8
- package/lib/ProLayout/components/Layout/Notice/index.js +3 -2
- package/lib/ProLayout/components/ProCollapse/style/index.less +4 -4
- package/lib/ProLayout/components/ProHeader/components/Copy/index.js +2 -1
- package/lib/{old → ProLayout/components/ProHeader/components}/ProBackBtn/index.js +3 -1
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +21 -0
- package/lib/ProLayout/components/ProHeader/components/index.d.ts +1 -0
- package/lib/ProLayout/components/ProHeader/components/index.js +8 -1
- package/lib/ProLayout/components/ProHeader/index.js +9 -6
- package/lib/ProLayout/components/ProHeader/style/index.less +16 -7
- package/lib/ProLayout/utils/index.js +1 -1
- package/lib/ProSelect/index.d.ts +3 -3
- package/lib/ProSelect/index.js +4 -2
- package/lib/ProStep/components/Step/index.js +3 -1
- package/lib/ProStep/style/index.less +0 -1
- package/lib/ProTable/components/RenderColumn/index.d.ts +5 -5
- package/lib/ProTable/components/RenderColumn/index.js +38 -24
- package/lib/ProTable/components/TableResizable/index.js +8 -0
- package/lib/ProTable/index.js +10 -8
- package/lib/ProTable/propsType.d.ts +2 -0
- package/lib/ProTable/style/index.less +14 -1
- package/lib/ProTable/useAntdTable.d.ts +12 -4
- package/lib/ProTable/useAntdTable.js +19 -6
- package/lib/ProTable/utils.d.ts +1 -1
- package/lib/ProTable/utils.js +258 -201
- package/lib/ProTabs/index.js +1 -0
- package/lib/ProTabs/style/index.less +1 -1
- package/lib/ProThemeTools/component/PrdTools/index.js +1 -1
- package/lib/ProThemeTools/component/PrdTools/style/index.less +3 -3
- package/lib/ProThemeTools/index.d.ts +2 -2
- package/lib/ProThemeTools/index.js +24 -16
- package/lib/ProThemeTools/propsType.d.ts +8 -6
- package/lib/ProThemeTools/style/index.less +2 -2
- package/lib/ProThemeTools/utils/index.d.ts +7 -0
- package/lib/ProThemeTools/utils/index.js +20 -2
- package/lib/ProTree/components/ProTree.js +6 -5
- package/lib/ProTree/components/SearchTitle.d.ts +2 -2
- package/lib/ProTree/components/SearchTitle.js +11 -1
- package/lib/ProTree/components/Tree.js +16 -2
- package/lib/ProTree/index.js +0 -1
- package/lib/ProTree/style/index.less +194 -142
- package/lib/ProTreeModal/components/List.js +0 -14
- package/lib/ProTreeModal/components/Tree.js +1 -0
- package/lib/ProTreeModal/components/Trigger.js +10 -3
- package/lib/ProTreeModal/index.js +29 -13
- package/lib/ProTreeModal/style/index.less +15 -19
- package/lib/ProUpload/components/ButtonRender.js +5 -2
- package/lib/ProUpload/components/DragRender.js +8 -8
- package/lib/ProUpload/components/Example.js +3 -1
- package/lib/ProUpload/components/ImageRender.js +8 -6
- package/lib/ProUpload/index.js +14 -5
- package/lib/ProUpload/style/index.less +41 -39
- package/lib/index.d.ts +2 -1
- package/lib/index.js +13 -1
- package/lib/locale/en_US.d.ts +138 -0
- package/lib/locale/en_US.js +143 -0
- package/lib/locale/index.d.ts +13 -0
- package/lib/locale/index.js +41 -0
- package/lib/locale/zh_CN.d.ts +137 -0
- package/lib/locale/zh_CN.js +142 -0
- package/lib/old/ProCertValidity/index.js +1 -1
- package/lib/old/ProEditableTable/style/index.less +1 -2
- package/lib/style/components.less +0 -1
- package/lib/style/core/normalize.less +1 -2
- package/lib/style/theme/antd.less +3 -4
- package/lib/style/theme/index.less +80 -79
- package/lib/style/theme/tokens.less +1 -0
- package/package.json +1 -1
- package/typings.d.ts +2 -0
- package/es/old/ProBackBtn/style/index.less +0 -19
- package/lib/old/ProBackBtn/style/index.less +0 -19
- /package/es/{old → ProLayout/components/ProHeader/components}/ProBackBtn/index.d.ts +0 -0
- /package/es/{old → ProLayout/components/ProHeader/components}/ProBackBtn/propsType.d.ts +0 -0
- /package/es/{old → ProLayout/components/ProHeader/components}/ProBackBtn/propsType.js +0 -0
- /package/lib/{old → ProLayout/components/ProHeader/components}/ProBackBtn/index.d.ts +0 -0
- /package/lib/{old → ProLayout/components/ProHeader/components}/ProBackBtn/propsType.d.ts +0 -0
- /package/lib/{old → ProLayout/components/ProHeader/components}/ProBackBtn/propsType.js +0 -0
|
@@ -4,16 +4,16 @@ import { useRef, useState } from 'react';
|
|
|
4
4
|
import { isFunction, isEqualWith } from 'lodash';
|
|
5
5
|
import { customEqualForFun } from './index';
|
|
6
6
|
// 代理shouldUpdate事件, 执行函数值的[show, disabled], 当[show, disabled]与上一次值不相同时更新状态
|
|
7
|
-
var useShouldUpdate = function useShouldUpdate(
|
|
8
|
-
var show =
|
|
9
|
-
formItemProps =
|
|
10
|
-
form =
|
|
11
|
-
disabled =
|
|
12
|
-
rules =
|
|
13
|
-
required =
|
|
14
|
-
fieldProps =
|
|
15
|
-
component =
|
|
16
|
-
originComponent =
|
|
7
|
+
var useShouldUpdate = function useShouldUpdate(props) {
|
|
8
|
+
var show = props.show,
|
|
9
|
+
formItemProps = props.formItemProps,
|
|
10
|
+
form = props.form,
|
|
11
|
+
disabled = props.disabled,
|
|
12
|
+
rules = props.rules,
|
|
13
|
+
required = props.required,
|
|
14
|
+
fieldProps = props.fieldProps,
|
|
15
|
+
component = props.component,
|
|
16
|
+
originComponent = props.originComponent;
|
|
17
17
|
var _shouldUpdate = formItemProps.shouldUpdate,
|
|
18
18
|
name = formItemProps.name,
|
|
19
19
|
clearNotShow = formItemProps.clearNotShow,
|
|
@@ -32,12 +32,6 @@ var useShouldUpdate = function useShouldUpdate(_ref) {
|
|
|
32
32
|
_useState2 = _slicedToArray(_useState, 2),
|
|
33
33
|
reRender = _useState2[1];
|
|
34
34
|
var values = {};
|
|
35
|
-
if (namePath) {
|
|
36
|
-
// formList场景values取当前行数据
|
|
37
|
-
values = form.getFieldValue(namePath) || {};
|
|
38
|
-
} else {
|
|
39
|
-
values = form.getFieldsValue(true);
|
|
40
|
-
}
|
|
41
35
|
// 不是动态函数直接返回
|
|
42
36
|
if (!isFunction(show) && !isFunction(disabled) && !isFunction(required) && !isFunction(rules) && !isFunction(fieldProps) && !isFunction(originComponent)) {
|
|
43
37
|
return {
|
|
@@ -50,6 +44,12 @@ var useShouldUpdate = function useShouldUpdate(_ref) {
|
|
|
50
44
|
component: newComponent
|
|
51
45
|
};
|
|
52
46
|
}
|
|
47
|
+
if (namePath) {
|
|
48
|
+
// formList场景values取当前行数据
|
|
49
|
+
values = form.getFieldValue(namePath) || {};
|
|
50
|
+
} else {
|
|
51
|
+
values = form.getFieldsValue(true);
|
|
52
|
+
}
|
|
53
53
|
if (isFunction(show)) {
|
|
54
54
|
showRef.current = Boolean(show(values, {
|
|
55
55
|
form: form,
|
|
@@ -122,6 +122,12 @@ var OpenMenu = function OpenMenu(props) {
|
|
|
122
122
|
});
|
|
123
123
|
}
|
|
124
124
|
}, [sideMenu]);
|
|
125
|
+
useEffect(function () {
|
|
126
|
+
// 同步路由,解决进入详情页后router没有变化,点击相同router菜单无效问题
|
|
127
|
+
setState({
|
|
128
|
+
router: window.location.pathname
|
|
129
|
+
});
|
|
130
|
+
}, [window.location.pathname]);
|
|
125
131
|
useEffect(function () {
|
|
126
132
|
// 路由变更,且不再demo文档中
|
|
127
133
|
if (router && !window.location.href.includes('~demos/prolayout')) {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
&>.ant-menu-item-only-child {
|
|
25
25
|
min-height : 48px;
|
|
26
26
|
padding-top : 12px;
|
|
27
|
-
padding-bottom:
|
|
27
|
+
padding-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1) - var(--zaui-space-size-xs; 4px) * var(--zaui-size; 1));
|
|
28
28
|
margin : 0;
|
|
29
29
|
height : auto;
|
|
30
30
|
|
|
@@ -89,13 +89,12 @@
|
|
|
89
89
|
|
|
90
90
|
.ant-menu-sub.ant-menu-inline>.ant-menu-item,
|
|
91
91
|
.ant-menu-submenu-title {
|
|
92
|
-
white-space
|
|
93
|
-
line-height
|
|
94
|
-
height
|
|
95
|
-
margin
|
|
96
|
-
padding-top
|
|
97
|
-
|
|
98
|
-
min-height : 48px;
|
|
92
|
+
white-space: pre-wrap;
|
|
93
|
+
line-height: initial !important;
|
|
94
|
+
height : auto !important;
|
|
95
|
+
margin : 0;
|
|
96
|
+
padding-top: 12px 0;
|
|
97
|
+
min-height : 48px;
|
|
99
98
|
}
|
|
100
99
|
|
|
101
100
|
.ant-menu-title-content {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import tipMsg from '../../../images/tipMsg.png';
|
|
3
3
|
import close from '../../../images/close.png';
|
|
4
|
+
import locale from '../../../../locale';
|
|
4
5
|
var Notice = function Notice(props) {
|
|
5
6
|
var headerHeight = props.headerHeight,
|
|
6
7
|
notice = props.notice,
|
|
@@ -15,13 +16,13 @@ var Notice = function Notice(props) {
|
|
|
15
16
|
},
|
|
16
17
|
children: [_jsx("img", {
|
|
17
18
|
src: tipMsg,
|
|
18
|
-
alt: "
|
|
19
|
+
alt: "".concat(locale.ProLayout.tipAlt)
|
|
19
20
|
}), " ", notice, _jsx("span", {
|
|
20
21
|
className: "pro-layout-header-notice-close",
|
|
21
22
|
onClick: onCancel,
|
|
22
23
|
children: _jsx("img", {
|
|
23
24
|
src: close,
|
|
24
|
-
alt: "
|
|
25
|
+
alt: "".concat(locale.ProLayout.closeAlt)
|
|
25
26
|
})
|
|
26
27
|
})]
|
|
27
28
|
});
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
|
|
10
10
|
&.ant-collapse {
|
|
11
11
|
.pro-collapse-panel {
|
|
12
|
-
margin-bottom: var(--zaui-space-size-md
|
|
12
|
+
margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.ant-collapse-header {
|
|
17
17
|
align-items: center !important;
|
|
18
|
-
padding :
|
|
18
|
+
padding : 12px var(--zaui-space-size-md, 16px) !important;
|
|
19
19
|
background : var(--zaui-area, #fafafa);
|
|
20
20
|
}
|
|
21
21
|
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
background : var(--zaui-base-bg, #ffffff);
|
|
50
50
|
|
|
51
51
|
.ant-collapse-header {
|
|
52
|
-
margin-bottom: var(--zaui-space-size-md
|
|
52
|
+
margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
|
|
53
53
|
padding : 0 !important;
|
|
54
54
|
background : var(--zaui-base-bg, #ffffff);
|
|
55
55
|
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
.ant-descriptions {
|
|
157
|
-
margin-bottom: var(--zaui-space-size-md
|
|
157
|
+
margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
}
|
|
@@ -4,6 +4,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
4
4
|
import { ReactSVG } from 'react-svg';
|
|
5
5
|
import { CheckOutlined } from '@ant-design/icons';
|
|
6
6
|
import copySvg from '../../../../../assets/copy.svg';
|
|
7
|
+
import locale from '../../../../../locale';
|
|
7
8
|
var Paragraph = _Typography.Paragraph;
|
|
8
9
|
var Copy = function Copy(_ref) {
|
|
9
10
|
var text = _ref.text;
|
|
@@ -15,7 +16,7 @@ var Copy = function Copy(_ref) {
|
|
|
15
16
|
className: "drag-icon",
|
|
16
17
|
src: copySvg
|
|
17
18
|
}, "copy-icon"), _jsx(CheckOutlined, {}, "copied-icon")],
|
|
18
|
-
tooltips: [
|
|
19
|
+
tooltips: ["".concat(locale.ProHeader.copyTooltips[0]), "".concat(locale.ProHeader.copyTooltips[1])]
|
|
19
20
|
}
|
|
20
21
|
});
|
|
21
22
|
};
|
|
@@ -2,6 +2,7 @@ import "antd/es/button/style";
|
|
|
2
2
|
import _Button from "antd/es/button";
|
|
3
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
4
|
import { ArrowLeftOutlined } from '@ant-design/icons';
|
|
5
|
+
import locale from '../../../../../locale';
|
|
5
6
|
/**
|
|
6
7
|
* 页面返回按钮
|
|
7
8
|
* @param onBack 自定义返回方法
|
|
@@ -10,7 +11,7 @@ import { ArrowLeftOutlined } from '@ant-design/icons';
|
|
|
10
11
|
var ProBackBtn = function ProBackBtn(_ref) {
|
|
11
12
|
var onBack = _ref.onBack,
|
|
12
13
|
_ref$text = _ref.text,
|
|
13
|
-
text = _ref$text === void 0 ?
|
|
14
|
+
text = _ref$text === void 0 ? "".concat(locale.ProHeader.backText) : _ref$text;
|
|
14
15
|
var handleClick = function handleClick() {
|
|
15
16
|
if (onBack) {
|
|
16
17
|
onBack();
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
.back-button-container {
|
|
2
|
+
&.ant-btn {
|
|
3
|
+
color : var(--zaui-text);
|
|
4
|
+
font-weight: 400;
|
|
5
|
+
background : var(--zaui-disabled-bg);
|
|
6
|
+
border : none;
|
|
7
|
+
|
|
8
|
+
&:hover {
|
|
9
|
+
color : var(--zaui-aide-text);
|
|
10
|
+
background: var(--zaui-disabled-bg);
|
|
11
|
+
border : none;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&:active,
|
|
15
|
+
&:focus {
|
|
16
|
+
color : var(--zaui-text);
|
|
17
|
+
font-weight: 400;
|
|
18
|
+
background : var(--zaui-disabled-bg);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default as Copy } from './Copy';
|
|
1
|
+
export { default as Copy } from './Copy';
|
|
2
|
+
export { default as ProBackBtn } from './ProBackBtn';
|
|
@@ -22,9 +22,9 @@ import { useToggle } from 'ahooks';
|
|
|
22
22
|
import { isFunction, isEmpty, isNumber, isString } from 'lodash';
|
|
23
23
|
import { ReactSVG } from 'react-svg';
|
|
24
24
|
import foldSvg from '../../../assets/arrow.svg';
|
|
25
|
-
import { Copy } from './components';
|
|
25
|
+
import { Copy, ProBackBtn } from './components';
|
|
26
26
|
import getEnumLabel from '../../../ProEnum/utils/getEnumLabel';
|
|
27
|
-
import
|
|
27
|
+
import locale from '../../../locale';
|
|
28
28
|
var formatAmount = tools.formatAmount;
|
|
29
29
|
var ProHeader = function ProHeader(props) {
|
|
30
30
|
var _props$breadcrumbList = props.breadcrumbList,
|
|
@@ -319,7 +319,7 @@ var ProHeader = function ProHeader(props) {
|
|
|
319
319
|
// value为null或者undefined返回'-'
|
|
320
320
|
var val = String(value).includes('undefined') || !value ? '-' : value;
|
|
321
321
|
if (type === 'version' && val) {
|
|
322
|
-
val = "
|
|
322
|
+
val = "".concat(locale.ProHeader.versionTitle).concat(val);
|
|
323
323
|
}
|
|
324
324
|
// 面包屑样式
|
|
325
325
|
var breadcrumbCls = classnames({
|
|
@@ -389,12 +389,15 @@ var ProHeader = function ProHeader(props) {
|
|
|
389
389
|
var onConfirm = function onConfirm() {
|
|
390
390
|
if (!isConfirmBack) {
|
|
391
391
|
onBack && onBack();
|
|
392
|
+
if (!onBack) {
|
|
393
|
+
window.history.back();
|
|
394
|
+
}
|
|
392
395
|
return false;
|
|
393
396
|
}
|
|
394
397
|
_Modal.confirm(_objectSpread({
|
|
395
|
-
title:
|
|
396
|
-
okText:
|
|
397
|
-
cancelText:
|
|
398
|
+
title: "".concat(locale.ProHeader.confirmTitle),
|
|
399
|
+
okText: "".concat(locale.ProHeader.confirm),
|
|
400
|
+
cancelText: "".concat(locale.ProHeader.cancel),
|
|
398
401
|
onOk: function onOk() {
|
|
399
402
|
onBack && onBack();
|
|
400
403
|
}
|
|
@@ -1,16 +1,25 @@
|
|
|
1
|
+
@import '../components/ProBackBtn/style/index';
|
|
2
|
+
|
|
1
3
|
.pro-header {
|
|
2
4
|
background-color: var(--zaui-base-bg, #ffffff);
|
|
3
|
-
padding :
|
|
5
|
+
padding : 24px 0 0 0;
|
|
4
6
|
|
|
5
7
|
&.pro-header-no-back {
|
|
6
8
|
.pro-header-top {
|
|
7
9
|
padding-left: 0;
|
|
8
10
|
}
|
|
11
|
+
|
|
12
|
+
.pro-header-left {
|
|
13
|
+
&.pro-header-left-space {
|
|
14
|
+
margin-left: 0 !important;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
}
|
|
9
18
|
}
|
|
10
19
|
|
|
11
20
|
&.pro-header-no-describe {
|
|
12
21
|
box-shadow : none;
|
|
13
|
-
margin-bottom: var(--zaui-space-size-md
|
|
22
|
+
margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
|
|
14
23
|
|
|
15
24
|
.pro-header-title,
|
|
16
25
|
.pro-header-top {
|
|
@@ -21,7 +30,7 @@
|
|
|
21
30
|
|
|
22
31
|
&.pro-header-fixed.pro-header-no-describe {
|
|
23
32
|
.pro-header-top {
|
|
24
|
-
padding-bottom:
|
|
33
|
+
padding-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1) - var(--zaui-space-size-xs; 4px) * var(--zaui-size; 1));
|
|
25
34
|
}
|
|
26
35
|
}
|
|
27
36
|
|
|
@@ -111,7 +120,7 @@
|
|
|
111
120
|
display : flex;
|
|
112
121
|
justify-content: space-between;
|
|
113
122
|
align-items : center;
|
|
114
|
-
margin-bottom : var(--zaui-space-size-sm
|
|
123
|
+
margin-bottom : calc(var(--zaui-space-size-sm; 8px) * var(--zaui-size; 1));
|
|
115
124
|
padding : 0 var(--zaui-space-size-md, 16px);
|
|
116
125
|
|
|
117
126
|
.pro-header-left {
|
|
@@ -265,7 +274,7 @@
|
|
|
265
274
|
li {
|
|
266
275
|
margin-right : 52px;
|
|
267
276
|
margin-top : 4px;
|
|
268
|
-
margin-bottom:
|
|
277
|
+
margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
|
|
269
278
|
|
|
270
279
|
&:last-child {
|
|
271
280
|
margin-right: 0;
|
|
@@ -303,9 +312,9 @@
|
|
|
303
312
|
.pro-header-describe {
|
|
304
313
|
display : flex;
|
|
305
314
|
flex-wrap : wrap;
|
|
306
|
-
font-size : 14px;
|
|
315
|
+
font-size : var(--zaui-font-size, 14px);
|
|
307
316
|
padding : 0 var(--zaui-space-size-md, 16px);
|
|
308
|
-
padding-bottom:
|
|
317
|
+
padding-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1) - var(--zaui-space-size-xs; 4px) * var(--zaui-size; 1));
|
|
309
318
|
|
|
310
319
|
li {
|
|
311
320
|
margin-left: var(--zaui-space-card, 32px);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
3
|
-
/* eslint-disable no-mixed-operators */
|
|
4
3
|
/* eslint-disable prefer-destructuring */
|
|
4
|
+
/* eslint-disable no-mixed-operators */
|
|
5
5
|
import { isPlainObject } from 'lodash';
|
|
6
6
|
/**
|
|
7
7
|
* 通过URL获取对应keyIdPath
|
package/es/ProSelect/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { PropSelectProps } from './propsType';
|
|
2
|
+
import { PropSelectProps, ProSelectAction } from './propsType';
|
|
3
3
|
import './index.less';
|
|
4
|
-
export declare const ProSelect: (props: PropSelectProps, ref: React.Ref<
|
|
5
|
-
declare const _default: React.ForwardRefExoticComponent<PropSelectProps & React.RefAttributes<
|
|
4
|
+
export declare const ProSelect: (props: PropSelectProps, ref: React.Ref<ProSelectAction> | undefined) => JSX.Element;
|
|
5
|
+
declare const _default: React.ForwardRefExoticComponent<PropSelectProps & React.RefAttributes<ProSelectAction>>;
|
|
6
6
|
export default _default;
|
package/es/ProSelect/index.js
CHANGED
|
@@ -16,10 +16,12 @@ import React, { useImperativeHandle, useState, forwardRef } from 'react';
|
|
|
16
16
|
import { isFunction, isObject, isString, omit, cloneDeep } from 'lodash';
|
|
17
17
|
import { useProConfig } from '../ProConfigProvider';
|
|
18
18
|
import Container from '../ProForm/components/Container';
|
|
19
|
-
import './index.less';
|
|
20
19
|
import AdaptiveTooltip from './components/AdaptiveTooltip';
|
|
20
|
+
import locale from '../locale';
|
|
21
|
+
import './index.less';
|
|
21
22
|
var Option = _Select.Option;
|
|
22
23
|
export var ProSelect = function ProSelect(props, ref) {
|
|
24
|
+
var _locale$ProSelect;
|
|
23
25
|
var _ref = useProConfig('ProSelect') || {},
|
|
24
26
|
_ref$fieldNames = _ref.fieldNames,
|
|
25
27
|
proSelectFieldNames = _ref$fieldNames === void 0 ? {} : _ref$fieldNames;
|
|
@@ -261,7 +263,7 @@ export var ProSelect = function ProSelect(props, ref) {
|
|
|
261
263
|
return value;
|
|
262
264
|
};
|
|
263
265
|
return _jsx(_Select, _objectSpread(_objectSpread({
|
|
264
|
-
placeholder:
|
|
266
|
+
placeholder: locale === null || locale === void 0 ? void 0 : (_locale$ProSelect = locale.ProSelect) === null || _locale$ProSelect === void 0 ? void 0 : _locale$ProSelect.select,
|
|
265
267
|
allowClear: true,
|
|
266
268
|
showArrow: true,
|
|
267
269
|
loading: fetchFunction === null || fetchFunction === void 0 ? void 0 : fetchFunction.loading,
|
|
@@ -6,7 +6,9 @@ import { cloneDeep } from 'lodash';
|
|
|
6
6
|
import { ReactSVG } from 'react-svg';
|
|
7
7
|
import catalogSvg from '../../../assets/catalog.svg';
|
|
8
8
|
import Anchor from '../Anchor';
|
|
9
|
+
import locale from '../../../locale';
|
|
9
10
|
export var Step = function Step(_ref) {
|
|
11
|
+
var _locale$ProStep;
|
|
10
12
|
var fixedTop = _ref.fixedTop,
|
|
11
13
|
_ref$dataSource = _ref.dataSource,
|
|
12
14
|
dataSource = _ref$dataSource === void 0 ? [] : _ref$dataSource,
|
|
@@ -61,7 +63,7 @@ export var Step = function Step(_ref) {
|
|
|
61
63
|
className: "menu-icon",
|
|
62
64
|
src: catalogSvg
|
|
63
65
|
}), onOff && _jsx("div", {
|
|
64
|
-
children:
|
|
66
|
+
children: locale === null || locale === void 0 ? void 0 : (_locale$ProStep = locale.ProStep) === null || _locale$ProStep === void 0 ? void 0 : _locale$ProStep.catalogue
|
|
65
67
|
})]
|
|
66
68
|
}), options.map(function (item) {
|
|
67
69
|
return _jsx(React.Fragment, {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { ProTableValueType } from '../../propsType';
|
|
3
2
|
interface Props {
|
|
4
|
-
valueType?:
|
|
5
|
-
|
|
3
|
+
valueType?: string;
|
|
4
|
+
node?: any;
|
|
6
5
|
value?: any;
|
|
7
|
-
|
|
6
|
+
currentValue?: any;
|
|
8
7
|
copyable?: boolean;
|
|
8
|
+
originalTip?: boolean;
|
|
9
9
|
ellipsis?: any;
|
|
10
10
|
width?: number | string;
|
|
11
|
-
|
|
11
|
+
originalValue?: any;
|
|
12
12
|
}
|
|
13
13
|
declare const RenderColumn: FC<Props>;
|
|
14
14
|
export default RenderColumn;
|
|
@@ -1,35 +1,55 @@
|
|
|
1
|
+
import "antd/es/tooltip/style";
|
|
2
|
+
import _Tooltip from "antd/es/tooltip";
|
|
1
3
|
import "antd/es/typography/style";
|
|
2
4
|
import _Typography from "antd/es/typography";
|
|
3
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
6
|
import { CheckOutlined } from '@ant-design/icons';
|
|
5
7
|
import { ReactSVG } from 'react-svg';
|
|
6
|
-
import ProForm from '../../../ProForm';
|
|
7
|
-
import getEnumLabel from '../../../ProEnum/utils/getEnumLabel';
|
|
8
8
|
import copySvg from '../../../assets/copy.svg';
|
|
9
9
|
var Paragraph = _Typography.Paragraph,
|
|
10
10
|
Text = _Typography.Text;
|
|
11
11
|
// @ts-ignore
|
|
12
12
|
var RenderColumn = function RenderColumn(props) {
|
|
13
13
|
var valueType = props.valueType,
|
|
14
|
-
code = props.code,
|
|
15
14
|
value = props.value,
|
|
16
|
-
|
|
15
|
+
node = props.node,
|
|
16
|
+
currentValue = props.currentValue,
|
|
17
17
|
copyable = props.copyable,
|
|
18
18
|
ellipsis = props.ellipsis,
|
|
19
19
|
width = props.width,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
var
|
|
24
|
-
if (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
originalValue = props.originalValue,
|
|
21
|
+
originalTip = props.originalTip;
|
|
22
|
+
if (originalValue !== undefined) {
|
|
23
|
+
var renderNode = value ? node : '-';
|
|
24
|
+
if (ellipsis || originalTip) {
|
|
25
|
+
if (ellipsis) {
|
|
26
|
+
renderNode = _jsx(Text, {
|
|
27
|
+
style: {
|
|
28
|
+
width: currentValue === '-' ? 32.5 : width
|
|
29
|
+
},
|
|
30
|
+
ellipsis: {
|
|
31
|
+
tooltip: false
|
|
32
|
+
},
|
|
33
|
+
children: ellipsis ? currentValue : renderNode
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
return _jsx(_Tooltip, {
|
|
37
|
+
className: "varied-cell",
|
|
38
|
+
style: {
|
|
39
|
+
width: width
|
|
40
|
+
},
|
|
41
|
+
title: originalTip ? _jsxs(_Fragment, {
|
|
42
|
+
children: ["\u521D\u59CB\u503C\uFF1A", originalValue, _jsx("br", {}), ellipsis ? "\u5F53\u524D\u503C\uFF1A".concat(currentValue) : undefined]
|
|
43
|
+
}) : node,
|
|
44
|
+
children: renderNode
|
|
45
|
+
});
|
|
28
46
|
}
|
|
29
|
-
return _jsx(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
47
|
+
return _jsx("span", {
|
|
48
|
+
className: "varied-cell",
|
|
49
|
+
style: {
|
|
50
|
+
width: width
|
|
51
|
+
},
|
|
52
|
+
children: renderNode
|
|
33
53
|
});
|
|
34
54
|
}
|
|
35
55
|
if (copyable) {
|
|
@@ -40,25 +60,21 @@ var RenderColumn = function RenderColumn(props) {
|
|
|
40
60
|
width: width
|
|
41
61
|
} : undefined,
|
|
42
62
|
ellipsis: ellipsis ? {
|
|
43
|
-
tooltip:
|
|
63
|
+
tooltip: node
|
|
44
64
|
} : false,
|
|
45
65
|
copyable: {
|
|
46
|
-
text:
|
|
66
|
+
text: node,
|
|
47
67
|
icon: [_jsx(ReactSVG, {
|
|
48
68
|
className: "drag-icon",
|
|
49
69
|
src: copySvg
|
|
50
70
|
}, "copy-icon"), _jsx(CheckOutlined, {}, "copied-icon")],
|
|
51
71
|
tooltips: ['复制', '复制成功']
|
|
52
72
|
},
|
|
53
|
-
children:
|
|
73
|
+
children: node
|
|
54
74
|
})
|
|
55
75
|
});
|
|
56
76
|
}
|
|
57
77
|
if (ellipsis) {
|
|
58
|
-
var node = value;
|
|
59
|
-
if (['enumName', 'enumCodeName'].includes(valueType)) {
|
|
60
|
-
node = getEnumLabel(typeof code === 'function' ? code() : code, value, valueType === 'enumCodeName');
|
|
61
|
-
}
|
|
62
78
|
return value ? _jsx(Text, {
|
|
63
79
|
style: {
|
|
64
80
|
width: width
|
|
@@ -70,6 +86,6 @@ var RenderColumn = function RenderColumn(props) {
|
|
|
70
86
|
children: node
|
|
71
87
|
}) : '-';
|
|
72
88
|
}
|
|
73
|
-
return
|
|
89
|
+
return value ? node : '-';
|
|
74
90
|
};
|
|
75
91
|
export default RenderColumn;
|
package/es/ProTable/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
|
8
8
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
9
9
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
10
10
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
11
|
-
var _excluded = ["tableId", "headerRender", "footerRender", "quickConfig", "stripe", "columns", "className", "summary", "emptyText"],
|
|
11
|
+
var _excluded = ["tableId", "headerRender", "footerRender", "quickConfig", "stripe", "columns", "className", "summary", "emptyText", "originalDataSource"],
|
|
12
12
|
_excluded2 = ["resizeColumn", "columnConfig", "cacheTime", "storage"];
|
|
13
13
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
import { useEffect, useMemo, useState, createContext } from 'react';
|
|
@@ -25,6 +25,7 @@ import empty from '../assets/empty.png';
|
|
|
25
25
|
import resetSvg from '../assets/reset.svg';
|
|
26
26
|
import customColumnSvg from '../assets/customColumn.svg';
|
|
27
27
|
import { formatColumn, getColumnDataIndex } from './utils';
|
|
28
|
+
import locale from '../locale';
|
|
28
29
|
var defaultCacheTime = 1; // columns 配置保存时间为一天
|
|
29
30
|
// 全局上下文
|
|
30
31
|
export var TableContext = /*#__PURE__*/createContext({});
|
|
@@ -33,7 +34,7 @@ export var defaultPage = {
|
|
|
33
34
|
pageSize: 10
|
|
34
35
|
};
|
|
35
36
|
function ProTable(props) {
|
|
36
|
-
var _curTableConfig$pathK;
|
|
37
|
+
var _locale$ProTable, _curTableConfig$pathK, _locale$ProTable2, _locale$ProTable3, _locale$ProTable4, _locale$ProTable5;
|
|
37
38
|
var _ref = useProConfig('globalConfig') || {},
|
|
38
39
|
configStorage = _ref.storage; // 获取全局缓存位置配置
|
|
39
40
|
var _ref2 = useProConfig('ProTable') || {},
|
|
@@ -50,7 +51,8 @@ function ProTable(props) {
|
|
|
50
51
|
className = props.className,
|
|
51
52
|
summary = props.summary,
|
|
52
53
|
_props$emptyText = props.emptyText,
|
|
53
|
-
emptyText = _props$emptyText === void 0 ?
|
|
54
|
+
emptyText = _props$emptyText === void 0 ? locale === null || locale === void 0 ? void 0 : (_locale$ProTable = locale.ProTable) === null || _locale$ProTable === void 0 ? void 0 : _locale$ProTable.noData : _props$emptyText,
|
|
55
|
+
originalDataSource = props.originalDataSource,
|
|
54
56
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
55
57
|
var quickTableConfig = quickConfig ? _objectSpread({
|
|
56
58
|
// resizeColumn: true,
|
|
@@ -161,7 +163,7 @@ function ProTable(props) {
|
|
|
161
163
|
return !(item === null || item === void 0 ? void 0 : item.delete);
|
|
162
164
|
});
|
|
163
165
|
newColumns === null || newColumns === void 0 ? void 0 : newColumns.forEach(function (item) {
|
|
164
|
-
formatColumn(item);
|
|
166
|
+
formatColumn(item, originalDataSource);
|
|
165
167
|
});
|
|
166
168
|
return newColumns;
|
|
167
169
|
}, [curColumns, handleResize]);
|
|
@@ -280,9 +282,9 @@ function ProTable(props) {
|
|
|
280
282
|
src: resetSvg
|
|
281
283
|
}),
|
|
282
284
|
onClick: resetColumnWidth,
|
|
283
|
-
children:
|
|
285
|
+
children: locale === null || locale === void 0 ? void 0 : (_locale$ProTable2 = locale.ProTable) === null || _locale$ProTable2 === void 0 ? void 0 : _locale$ProTable2.resetColumnWidth
|
|
284
286
|
}), columnConfig && _jsx(ProTreeModal, {
|
|
285
|
-
title:
|
|
287
|
+
title: locale === null || locale === void 0 ? void 0 : (_locale$ProTable3 = locale.ProTable) === null || _locale$ProTable3 === void 0 ? void 0 : _locale$ProTable3.customColumns,
|
|
286
288
|
span: 8,
|
|
287
289
|
mode: "list",
|
|
288
290
|
draggable: true,
|
|
@@ -297,7 +299,7 @@ function ProTable(props) {
|
|
|
297
299
|
wrapper: "span",
|
|
298
300
|
src: customColumnSvg
|
|
299
301
|
}),
|
|
300
|
-
children:
|
|
302
|
+
children: locale === null || locale === void 0 ? void 0 : (_locale$ProTable4 = locale.ProTable) === null || _locale$ProTable4 === void 0 ? void 0 : _locale$ProTable4.customColumns
|
|
301
303
|
})
|
|
302
304
|
})]
|
|
303
305
|
})]
|
|
@@ -314,7 +316,7 @@ function ProTable(props) {
|
|
|
314
316
|
className: "ant-empty-image",
|
|
315
317
|
children: _jsx("img", {
|
|
316
318
|
src: empty,
|
|
317
|
-
alt:
|
|
319
|
+
alt: locale === null || locale === void 0 ? void 0 : (_locale$ProTable5 = locale.ProTable) === null || _locale$ProTable5 === void 0 ? void 0 : _locale$ProTable5.noData
|
|
318
320
|
})
|
|
319
321
|
}), _jsx("div", {
|
|
320
322
|
className: "ant-empty-description",
|
|
@@ -26,6 +26,7 @@ export interface ProTableColumn extends Omit<ColumnType<any>, 'dataIndex'> {
|
|
|
26
26
|
precision?: number;
|
|
27
27
|
code?: string | string[] | (() => string);
|
|
28
28
|
copyable?: boolean;
|
|
29
|
+
originalTip?: boolean;
|
|
29
30
|
prefix?: string | ReactNode | ((value: any, record?: any, index?: number) => any);
|
|
30
31
|
suffix?: string | ReactNode | ((value: any, record?: any, index?: number) => any);
|
|
31
32
|
tooltip?: ReactNode | {
|
|
@@ -53,6 +54,7 @@ export interface ProTableProps extends Omit<TableProps<any>, 'summary' | 'column
|
|
|
53
54
|
*/
|
|
54
55
|
stripe?: boolean;
|
|
55
56
|
columns: ProTableColumn[];
|
|
57
|
+
originalDataSource?: any[];
|
|
56
58
|
}
|
|
57
59
|
export type ProTableValueType = 'percentage' | 'permillage' | 'thousandth' | 'datePicker' | 'enumName' | 'enumCodeName' | 'address' | 'thousandthCNY' | 'date' | 'dateTime' | 'dateStartTime' | 'dateEndTime' | 'dateStartEndTime';
|
|
58
60
|
export interface Response<T = any> {
|
|
@@ -54,6 +54,19 @@
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
.ant-table-body {
|
|
58
|
+
.ant-table-cell .varied-cell {
|
|
59
|
+
margin-left: -8px;
|
|
60
|
+
background: var(--zaui-contract-bg, #fffaa1);
|
|
61
|
+
padding: var(--zaui-space-size-xs, 4px) var(--zaui-space-size-sm, 8px);
|
|
62
|
+
border-radius: var(--zaui-border-radius, 4px);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.varied-cell.empty-cell {
|
|
66
|
+
width: 24.5px;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
57
70
|
.copyable-table-cell {
|
|
58
71
|
|
|
59
72
|
|
|
@@ -140,7 +153,7 @@
|
|
|
140
153
|
.column-config {
|
|
141
154
|
display : flex;
|
|
142
155
|
justify-content: space-between;
|
|
143
|
-
margin-bottom : var(--zaui-space-size-md
|
|
156
|
+
margin-bottom : calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
|
|
144
157
|
|
|
145
158
|
.right-actions {
|
|
146
159
|
display : flex;
|