@zat-design/sisyphus-react 3.4.2 → 3.4.3
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 +286 -240
- package/dist/less.esm.css +5022 -0
- package/dist/less.esm.js +3 -0
- package/es/ProConfigProvider/index.js +2 -1
- package/es/ProEditLabel/style/index.less +1 -1
- package/es/ProEditTable/components/RenderField/index.js +28 -20
- package/es/ProEditTable/index.js +3 -3
- package/es/ProEditTable/propsType.d.ts +1 -1
- package/es/ProEditTable/style/index.less +1 -1
- package/es/ProEditTable/utils/config.js +5 -5
- package/es/ProEditTable/utils/index.js +67 -30
- package/es/ProEditTable/utils/tools.js +3 -1
- package/es/ProEnum/components/Group.d.ts +2 -0
- package/es/ProEnum/components/Group.js +26 -8
- package/es/ProEnum/index.js +4 -3
- package/es/ProEnum/style/index.less +12 -3
- package/es/ProForm/components/base/DatePicker/index.js +2 -2
- package/es/ProForm/components/combination/FormList/index.js +6 -3
- package/es/ProForm/components/combination/FormList/utils.d.ts +2 -1
- package/es/ProForm/components/combination/FormList/utils.js +5 -3
- package/es/ProForm/components/combination/Group/index.js +28 -15
- package/es/ProForm/components/combination/Group/propsType.d.ts +6 -0
- package/es/ProForm/components/combination/Group/style/index.less +4 -4
- package/es/ProForm/components/combination/Group/utils.d.ts +2 -0
- package/es/ProForm/components/combination/Group/utils.js +10 -0
- package/es/ProForm/components/combination/ProTimeLimit/index.js +8 -2
- package/es/ProForm/components/combination/ProTimeLimit/style/index.less +1 -1
- package/es/ProForm/components/index.d.ts +0 -1
- package/es/ProForm/components/index.js +1 -1
- package/es/ProForm/components/render/ConfirmWrapper.js +1 -1
- package/es/ProForm/components/render/Render.js +21 -13
- package/es/ProForm/components/render/RenderFields.d.ts +2 -1
- package/es/ProForm/components/render/RenderFields.js +7 -3
- package/es/ProForm/components/render/propsType.d.ts +1 -4
- package/es/ProForm/index.js +8 -6
- package/es/ProForm/propsType.d.ts +5 -1
- package/es/ProForm/style/index.less +17 -13
- package/es/ProForm/utils/{contrastOriginal.d.ts → diffOriginal.d.ts} +2 -1
- package/es/ProForm/utils/diffOriginal.js +61 -0
- package/es/ProForm/utils/index.d.ts +1 -1
- package/es/ProForm/utils/index.js +1 -1
- package/es/ProForm/utils/transformNames.d.ts +1 -1
- package/es/ProForm/utils/transformNames.js +11 -4
- package/es/ProForm/utils/transformValue.js +2 -2
- package/es/ProForm/utils/useChanged.js +4 -3
- package/es/ProForm/utils/useListChanged.d.ts +1 -1
- package/es/ProForm/utils/useListChanged.js +5 -3
- package/es/ProForm/utils/valueType.d.ts +10 -5
- package/es/ProForm/utils/valueType.js +20 -10
- package/es/ProIcon/config/index.d.ts +2 -1
- package/es/ProIcon/config/index.js +191 -133
- package/es/ProIcon/index.d.ts +0 -1
- package/es/ProIcon/index.js +21 -36
- package/es/ProIcon/propsTypes.d.ts +2 -1
- package/es/ProLayout/components/Layout/Header/style/index.less +1 -1
- package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +58 -55
- package/es/ProLayout/components/Layout/Menu/SideMenu/style/index.less +25 -20
- package/es/ProLayout/components/Layout/Menu/style/index.less +52 -56
- package/es/ProLayout/components/ProCollapse/PropTypes.d.ts +5 -0
- package/es/ProLayout/components/ProCollapse/index.js +22 -3
- package/es/ProLayout/components/ProCollapse/style/index.less +29 -11
- package/es/ProLayout/components/ProFooter/index.js +1 -1
- package/es/ProLayout/components/ProFooter/style/index.less +1 -1
- package/es/ProLayout/components/ProHeader/style/index.less +6 -5
- package/es/ProLayout/style/index.less +176 -88
- package/es/ProStep/components/Item/index.js +2 -1
- package/es/ProStep/style/index.less +71 -70
- package/es/ProTable/components/RenderColumn/index.d.ts +1 -1
- package/es/ProTable/components/RenderColumn/index.js +3 -3
- package/es/ProTable/propsType.d.ts +1 -1
- package/es/ProTable/style/index.less +2 -2
- package/es/ProTable/utils.js +9 -9
- package/es/ProTabs/style/index.less +3 -1
- package/es/ProThemeTools/component/PrdTools/index.d.ts +1 -1
- package/es/ProThemeTools/component/PrdTools/index.js +2 -2
- package/es/ProThemeTools/component/PrdTools/style/index.less +1 -1
- package/es/ProThemeTools/index.js +21 -28
- package/es/ProThemeTools/propsType.d.ts +1 -1
- package/es/ProThemeTools/style/index.less +25 -8
- package/es/{ProTreeSelect → ProTree/components/ProTreeSelect}/index.js +7 -11
- package/es/{ProTreeSelect → ProTree/components/ProTreeSelect}/propsType.d.ts +1 -1
- package/es/ProTree/index.js +1 -1
- package/es/ProTreeModal/style/index.less +2 -2
- package/es/ProUpload/style/fileItem.less +2 -2
- package/es/ProUpload/style/index.less +2 -2
- package/es/assets/catalog.svg +30 -1
- package/es/assets/fold.svg +27 -0
- package/es/assets/setting.svg +14 -0
- 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 +3 -0
- package/es/style/components.less +0 -1
- package/es/style/less.less +2 -0
- package/es/style/theme/antd.less +1 -2
- package/es/style/theme/index.less +2 -2
- package/es/style/theme/tokens.less +2 -2
- package/es/tokens.js +2 -2
- package/lib/ProConfigProvider/index.js +2 -1
- package/lib/ProEditLabel/style/index.less +1 -1
- package/lib/ProEditTable/components/RenderField/index.js +27 -19
- package/lib/ProEditTable/index.js +3 -3
- package/lib/ProEditTable/propsType.d.ts +1 -1
- package/lib/ProEditTable/style/index.less +1 -1
- package/lib/ProEditTable/utils/config.js +5 -5
- package/lib/ProEditTable/utils/index.js +67 -30
- package/lib/ProEditTable/utils/tools.js +3 -1
- package/lib/ProEnum/components/Group.d.ts +2 -0
- package/lib/ProEnum/components/Group.js +26 -8
- package/lib/ProEnum/index.js +4 -3
- package/lib/ProEnum/style/index.less +12 -3
- package/lib/ProForm/components/base/DatePicker/index.js +1 -1
- package/lib/ProForm/components/combination/FormList/index.js +6 -3
- package/lib/ProForm/components/combination/FormList/utils.d.ts +2 -1
- package/lib/ProForm/components/combination/FormList/utils.js +5 -3
- package/lib/ProForm/components/combination/Group/index.js +25 -12
- package/lib/ProForm/components/combination/Group/propsType.d.ts +6 -0
- package/lib/ProForm/components/combination/Group/style/index.less +4 -4
- package/lib/ProForm/components/combination/Group/utils.d.ts +2 -0
- package/lib/ProForm/components/combination/Group/utils.js +11 -1
- package/lib/ProForm/components/combination/ProTimeLimit/index.js +7 -1
- package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +1 -1
- package/lib/ProForm/components/index.d.ts +0 -1
- package/lib/ProForm/components/index.js +0 -7
- package/lib/ProForm/components/render/ConfirmWrapper.js +1 -1
- package/lib/ProForm/components/render/Render.js +21 -13
- package/lib/ProForm/components/render/RenderFields.d.ts +2 -1
- package/lib/ProForm/components/render/RenderFields.js +7 -3
- package/lib/ProForm/components/render/propsType.d.ts +1 -4
- package/lib/ProForm/index.js +7 -5
- package/lib/ProForm/propsType.d.ts +5 -1
- package/lib/ProForm/style/index.less +17 -13
- package/lib/ProForm/utils/{contrastOriginal.d.ts → diffOriginal.d.ts} +2 -1
- package/lib/ProForm/utils/diffOriginal.js +68 -0
- package/lib/ProForm/utils/index.d.ts +1 -1
- package/lib/ProForm/utils/index.js +2 -2
- package/lib/ProForm/utils/transformNames.d.ts +1 -1
- package/lib/ProForm/utils/transformNames.js +10 -3
- package/lib/ProForm/utils/transformValue.js +1 -1
- package/lib/ProForm/utils/useChanged.js +4 -3
- package/lib/ProForm/utils/useListChanged.d.ts +1 -1
- package/lib/ProForm/utils/useListChanged.js +5 -3
- package/lib/ProForm/utils/valueType.d.ts +10 -5
- package/lib/ProForm/utils/valueType.js +20 -10
- package/lib/ProIcon/config/index.d.ts +2 -1
- package/lib/ProIcon/config/index.js +191 -133
- package/lib/ProIcon/index.d.ts +0 -1
- package/lib/ProIcon/index.js +21 -37
- package/lib/ProIcon/propsTypes.d.ts +2 -1
- package/lib/ProLayout/components/Layout/Header/style/index.less +1 -1
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +58 -55
- package/lib/ProLayout/components/Layout/Menu/SideMenu/style/index.less +25 -20
- package/lib/ProLayout/components/Layout/Menu/style/index.less +52 -56
- package/lib/ProLayout/components/ProCollapse/PropTypes.d.ts +5 -0
- package/lib/ProLayout/components/ProCollapse/index.js +20 -3
- package/lib/ProLayout/components/ProCollapse/style/index.less +29 -11
- package/lib/ProLayout/components/ProFooter/index.js +1 -1
- package/lib/ProLayout/components/ProFooter/style/index.less +1 -1
- package/lib/ProLayout/components/ProHeader/style/index.less +6 -5
- package/lib/ProLayout/style/index.less +176 -88
- package/lib/ProStep/components/Item/index.js +2 -1
- package/lib/ProStep/style/index.less +71 -70
- package/lib/ProTable/components/RenderColumn/index.d.ts +1 -1
- package/lib/ProTable/components/RenderColumn/index.js +3 -3
- package/lib/ProTable/propsType.d.ts +1 -1
- package/lib/ProTable/style/index.less +2 -2
- package/lib/ProTable/utils.js +9 -9
- package/lib/ProTabs/style/index.less +3 -1
- package/lib/ProThemeTools/component/PrdTools/index.d.ts +1 -1
- package/lib/ProThemeTools/component/PrdTools/index.js +2 -2
- package/lib/ProThemeTools/component/PrdTools/style/index.less +1 -1
- package/lib/ProThemeTools/index.js +19 -27
- package/lib/ProThemeTools/propsType.d.ts +1 -1
- package/lib/ProThemeTools/style/index.less +25 -8
- package/lib/{ProTreeSelect → ProTree/components/ProTreeSelect}/index.js +7 -11
- package/lib/{ProTreeSelect → ProTree/components/ProTreeSelect}/propsType.d.ts +1 -1
- package/lib/ProTree/index.js +1 -1
- package/lib/ProTreeModal/style/index.less +2 -2
- package/lib/ProUpload/style/fileItem.less +2 -2
- package/lib/ProUpload/style/index.less +2 -2
- package/lib/assets/catalog.svg +30 -1
- package/lib/assets/fold.svg +27 -0
- package/lib/assets/setting.svg +14 -0
- 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 +3 -0
- package/lib/style/components.less +0 -1
- package/lib/style/less.less +2 -0
- package/lib/style/theme/antd.less +1 -2
- package/lib/style/theme/index.less +2 -2
- package/lib/style/theme/tokens.less +2 -2
- package/lib/tokens.js +2 -2
- package/package.json +1 -1
- package/es/ProForm/utils/contrastOriginal.js +0 -24
- package/es/ProIcon/symbolIcon.js +0 -43
- package/lib/ProForm/utils/contrastOriginal.js +0 -30
- package/lib/ProIcon/symbolIcon.js +0 -45
- /package/es/{ProTreeSelect → ProTree/components/ProTreeSelect}/index.d.ts +0 -0
- /package/es/{ProTreeSelect → ProTree/components/ProTreeSelect}/propsType.js +0 -0
- /package/es/{ProTreeSelect → ProTree/components/ProTreeSelect}/style/index.less +0 -0
- /package/lib/{ProTreeSelect → ProTree/components/ProTreeSelect}/index.d.ts +0 -0
- /package/lib/{ProTreeSelect → ProTree/components/ProTreeSelect}/propsType.js +0 -0
- /package/lib/{ProTreeSelect → ProTree/components/ProTreeSelect}/style/index.less +0 -0
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
.pro-upload-dragger {
|
|
9
9
|
.pro-upload-handle-box {
|
|
10
10
|
background : #F8F9FA;
|
|
11
|
-
border-radius: var(--zaui-border-radius,
|
|
11
|
+
border-radius: var(--zaui-border-radius, 8px);
|
|
12
12
|
padding : var(--zaui-space-size-sm, 8px);
|
|
13
13
|
|
|
14
14
|
.@{ant-prefix}-upload.@{ant-prefix}-upload-drag {
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
text-align : center;
|
|
179
179
|
line-height : 32px;
|
|
180
180
|
background : #FFFFFF;
|
|
181
|
-
border-radius: var(--zaui-border-radius,
|
|
181
|
+
border-radius: var(--zaui-border-radius, 8px);
|
|
182
182
|
border : 1px solid #DCDCDC;
|
|
183
183
|
|
|
184
184
|
}
|
package/es/assets/catalog.svg
CHANGED
|
@@ -1 +1,30 @@
|
|
|
1
|
-
<?xml version="1.0"
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>编组 52@1x</title>
|
|
4
|
+
<defs>
|
|
5
|
+
<rect id="path-1" x="0" y="4" width="24" height="18" rx="2"></rect>
|
|
6
|
+
<filter x="-14.6%" y="-13.9%" width="129.2%" height="138.9%" filterUnits="objectBoundingBox" id="filter-2">
|
|
7
|
+
<feOffset dx="0" dy="1" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
|
|
8
|
+
<feGaussianBlur stdDeviation="1" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
|
|
9
|
+
<feColorMatrix values="0 0 0 0 0.653997356 0 0 0 0 0.779247182 0 0 0 0 1 0 0 0 1 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
|
|
10
|
+
</filter>
|
|
11
|
+
</defs>
|
|
12
|
+
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
13
|
+
<g id="画板备份-17" transform="translate(-1367, -56)">
|
|
14
|
+
<g id="编组-81" transform="translate(1359, 48)">
|
|
15
|
+
<g id="编组-52" transform="translate(8, 8)">
|
|
16
|
+
<rect id="矩形" x="0" y="0" width="32" height="32"></rect>
|
|
17
|
+
<g id="编组-13" transform="translate(4, 5)">
|
|
18
|
+
<path d="M5.33152162,0 L15,0 C16.1045695,7.78148667e-16 17,0.8954305 17,2 L17,19 C17,20.1045695 16.1045695,21 15,21 L2,21 C0.8954305,21 6.76353751e-17,20.1045695 0,19 L-4.4408921e-16,5.64678021 C-5.05225217e-16,5.14756683 0.186696218,4.666401 0.523402611,4.29783242 L3.85492423,0.651052206 C4.233839,0.236281109 4.76972854,9.91378134e-16 5.33152162,8.8817842e-16 Z" id="矩形" fill="#87F1FC" transform="translate(8.5, 10.5) scale(-1, 1) translate(-8.5, -10.5)"></path>
|
|
19
|
+
<g id="矩形">
|
|
20
|
+
<use fill="black" fill-opacity="1" filter="url(#filter-2)" xlink:href="#path-1"></use>
|
|
21
|
+
<use fill="#4181FF" fill-rule="evenodd" xlink:href="#path-1"></use>
|
|
22
|
+
</g>
|
|
23
|
+
<circle id="椭圆形" fill="#FFFFFF" cx="7.16666667" cy="12.8333333" r="1.5"></circle>
|
|
24
|
+
<circle id="椭圆形" fill="#FFFFFF" cx="16.5" cy="12.8333333" r="1.5"></circle>
|
|
25
|
+
</g>
|
|
26
|
+
</g>
|
|
27
|
+
</g>
|
|
28
|
+
</g>
|
|
29
|
+
</g>
|
|
30
|
+
</svg>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="16px" height="15px" viewBox="0 0 16 15" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>编组 2</title>
|
|
4
|
+
<defs>
|
|
5
|
+
<linearGradient x1="100%" y1="50%" x2="0%" y2="50%" id="linearGradient-1">
|
|
6
|
+
<stop stop-color="#ADDDFF" stop-opacity="0" offset="0%"></stop>
|
|
7
|
+
<stop stop-color="#5FB3D8" stop-opacity="0" offset="13.9259178%"></stop>
|
|
8
|
+
<stop stop-color="#4181FF" offset="100%"></stop>
|
|
9
|
+
</linearGradient>
|
|
10
|
+
</defs>
|
|
11
|
+
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
12
|
+
<g id="画板备份-17" transform="translate(-81, -162)" fill="url(#linearGradient-1)">
|
|
13
|
+
<g id="编组-27" transform="translate(64, 146)">
|
|
14
|
+
<g id="Card_Tittle/带icon备份-4" transform="translate(1, 0)">
|
|
15
|
+
<g id="编组-2" transform="translate(16, 16)">
|
|
16
|
+
<g id="编组">
|
|
17
|
+
<rect id="矩形" x="0" y="0" width="16" height="6" rx="3"></rect>
|
|
18
|
+
</g>
|
|
19
|
+
<g id="编组备份" transform="translate(8, 12) scale(-1, 1) translate(-8, -12)translate(0, 9)">
|
|
20
|
+
<rect id="矩形" x="0" y="0" width="16" height="6" rx="3"></rect>
|
|
21
|
+
</g>
|
|
22
|
+
</g>
|
|
23
|
+
</g>
|
|
24
|
+
</g>
|
|
25
|
+
</g>
|
|
26
|
+
</g>
|
|
27
|
+
</svg>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="21px" height="21px" viewBox="0 0 22 21" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>icon-settings</title>
|
|
4
|
+
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
+
<g id="画板备份-17" transform="translate(-1223, -14)" fill="#231F20" fill-rule="nonzero" stroke="#333333" stroke-width="0.3">
|
|
6
|
+
<g id="编组-2" transform="translate(1209.2372, 0)">
|
|
7
|
+
<g id="icon-settings" transform="translate(14.4202, 15)">
|
|
8
|
+
<path d="M20.3848055,7.53659573 C20.2624144,6.90517801 19.8656126,6.49687157 19.3574341,6.49687157 L19.2693187,6.49687157 C17.8961096,6.49687157 16.7791849,5.40670117 16.7791849,4.0659785 C16.7791849,3.64243545 16.9874064,3.15949962 16.9954426,3.14030349 C17.2488001,2.58384094 17.0543916,1.90192685 16.5418484,1.55193559 L13.9650884,0.151544503 L13.9272182,0.133451014 C13.4117224,-0.0847484644 12.7061572,0.0549122231 12.3217819,0.445776738 C12.0436226,0.725799811 11.0846741,1.52424401 10.3529464,1.52424401 C9.61169334,1.52424401 8.65061387,0.709786336 8.37104252,0.424450467 C7.98733476,0.0307290821 7.28906108,-0.117076194 6.76773716,0.100747395 L4.09924158,1.52780256 L4.05918911,1.55268737 C3.54659457,1.90127525 3.35146717,2.5831643 3.60341257,3.13749673 C3.61211629,3.15777047 3.82110799,3.63677181 3.82110799,4.06600356 C3.82110799,5.40672622 2.70418334,6.49689663 1.33099995,6.49689663 L1.2268892,6.49689663 C0.73468034,6.49689663 0.337852817,6.90517801 0.215538765,7.53662079 C0.206424254,7.58105259 0,8.64957096 0,9.50630527 C0,10.3619369 0.206424254,11.4300794 0.215538765,11.4741603 C0.337852842,12.105979 0.73468034,12.5146363 1.24288452,12.5146363 L1.33099995,12.5146363 C2.70418336,12.5146363 3.82110799,13.6048318 3.82110799,14.9451535 C3.82110799,15.3715534 3.61214195,15.8526849 3.60413145,15.8711543 C3.35149282,16.4286944 3.54518244,17.1095309 4.05628784,17.457768 L6.58426601,18.8421957 L6.62285501,18.8592617 C7.1456424,19.0838515 7.85261977,18.9374246 8.23488975,18.5295191 C8.58799332,18.1570989 9.54475946,17.3838403 10.2473465,17.3838403 C11.0089339,17.3838403 11.9897315,18.249471 12.2722554,18.5536271 C12.5328788,18.8322217 12.9333521,19 13.3432737,19 C13.5347553,19 13.7160441,18.962986 13.8820564,18.8933687 L16.5032593,17.4834046 L16.5418483,17.4591713 C17.0543915,17.109556 17.2495446,16.4287195 16.9969316,15.8740362 C16.9881766,15.8534116 16.7792105,15.3743852 16.7792105,14.9451785 C16.7792105,13.6048568 17.8961352,12.5146614 19.2693442,12.5146614 L19.3720429,12.5146614 C19.8649193,12.5146614 20.26244,12.1060041 20.3848054,11.4741854 C20.3935348,11.4301045 20.6002928,10.361962 20.6002928,9.50633035 C20.6002928,8.64954589 20.3935349,7.58102751 20.3848055,7.53659573 M19.1062589,9.50628019 C19.1062589,10.0598859 18.9933931,10.7712959 18.9416844,11.0683599 C16.8818579,11.2332312 15.2851253,12.9132945 15.2851253,14.9451284 C15.2851253,15.518657 15.471549,16.0680024 15.5705761,16.3206848 L13.3345445,17.5259819 C13.2245799,17.413712 12.8998469,17.0938682 12.457909,16.7726211 C11.6817384,16.2111966 10.9375841,15.9244072 10.2473209,15.9244072 C9.56291156,15.9244072 8.82463676,16.2040795 8.05211198,16.7584119 C7.61233077,17.0711135 7.29198807,17.3823867 7.17984115,17.4975135 L5.0290237,16.3220881 C5.13387902,16.056625 5.31519344,15.5143716 5.31519344,14.9451284 C5.31519344,12.9132945 3.71846079,11.2332312 1.65937889,11.0683599 C1.60695125,10.7712959 1.49408545,10.0599109 1.49408545,9.50628019 C1.49408545,8.95157185 1.60695125,8.23983608 1.65937889,7.94277203 C3.71846079,7.77825158 5.31519344,6.09783742 5.31519344,4.06600356 C5.31519344,3.4956827 5.12879543,2.94455798 5.02976827,2.69225151 L7.32112879,1.46312209 C7.42087485,1.56050617 7.74779025,1.8728319 8.1948374,2.18340342 C8.95645045,2.71392862 9.68168251,2.98257437 10.3529721,2.98257437 C11.0177147,2.98257437 11.7378118,2.71891561 12.4943156,2.19869017 C12.9450086,1.8895471 13.2712051,1.58148161 13.3658419,1.49442234 L15.5712693,2.69012142 C15.4715233,2.94099944 15.2850996,3.4903449 15.2850996,4.06600358 C15.2850996,6.09783744 16.8818322,7.7782516 18.9416587,7.94277205 C18.9933931,8.2405127 19.1062589,8.95513042 19.1062589,9.50628019" id="形状"></path>
|
|
9
|
+
<path d="M10.3001356,6.5 C8.59640655,6.5 7.21010249,7.84598945 7.21010249,9.50014713 C7.21010249,11.1545781 8.5964282,12.5 10.3001356,12.5 C12.0038646,12.5 13.3901903,11.1545781 13.3901903,9.50014713 C13.3901903,7.84598945 12.0038646,6.5 10.3001356,6.5 M12.1303626,9.50014713 C12.1303626,10.4798072 11.3095002,11.276765 10.3001356,11.276765 C9.29079259,11.276765 8.47053634,10.4798072 8.47053634,9.50014713 C8.47053634,8.52105462 9.29079259,7.72378156 10.3001356,7.72378156 C11.3095002,7.72378156 12.1303626,8.52105462 12.1303626,9.50014713" id="形状"></path>
|
|
10
|
+
</g>
|
|
11
|
+
</g>
|
|
12
|
+
</g>
|
|
13
|
+
</g>
|
|
14
|
+
</svg>
|
package/es/locale/en_US.d.ts
CHANGED
package/es/locale/en_US.js
CHANGED
package/es/locale/zh_CN.d.ts
CHANGED
package/es/locale/zh_CN.js
CHANGED
package/es/style/components.less
CHANGED
package/es/style/theme/antd.less
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
// label 超过130px换行
|
|
25
25
|
.@{ant-prefix}-form-item-label {
|
|
26
26
|
flex: 0 0 @zaui-form-label-width;
|
|
27
|
-
padding-right: @zaui-space-size-
|
|
27
|
+
padding-right: @zaui-space-size-md;
|
|
28
28
|
overflow: initial;
|
|
29
29
|
line-height: 1;
|
|
30
30
|
white-space: pre-wrap;
|
|
@@ -673,7 +673,6 @@
|
|
|
673
673
|
width: calc(100% - 18px);
|
|
674
674
|
margin-bottom: 0;
|
|
675
675
|
text-align: right;
|
|
676
|
-
// background: #fff;
|
|
677
676
|
}
|
|
678
677
|
}
|
|
679
678
|
}
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
--zaui-table-nested-bg : #fafcfe;
|
|
57
57
|
--zaui-contract-bg : #fffaa1; // 对比背景色
|
|
58
58
|
--zaui-form-label-width : 130px; // 8个全角字符宽度
|
|
59
|
-
--zaui-border-radius :
|
|
60
|
-
--zaui-border-radius-card :
|
|
59
|
+
--zaui-border-radius : 8px;
|
|
60
|
+
--zaui-border-radius-card : 4px;
|
|
61
61
|
--zaui-font-size-title : 16px;
|
|
62
62
|
--zaui-font-size-card-title : var(--zaui-font-size-title);
|
|
63
63
|
--zaui-font-size : 14px;
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
@zaui-form-required-after: var(--zaui-form-required-after; inline);
|
|
57
57
|
@zaui-form-required-before: var(--zaui-form-required-before; none);
|
|
58
58
|
@zaui-form-label-width: var(--zaui-form-label-width; 130px);
|
|
59
|
-
@zaui-border-radius: var(--zaui-border-radius;
|
|
60
|
-
@zaui-border-radius-card: var(--zaui-border-radius-card;
|
|
59
|
+
@zaui-border-radius: var(--zaui-border-radius; 8px);
|
|
60
|
+
@zaui-border-radius-card: var(--zaui-border-radius-card; 4px);
|
|
61
61
|
@zaui-font-size-title:
|
|
62
62
|
calc(var(--zaui-font-size-title; 16px) + var(--zaui-base-font-size; 0px));
|
|
63
63
|
@zaui-font-size-card-title:
|
package/es/tokens.js
CHANGED
|
@@ -53,8 +53,8 @@ var tokens = {
|
|
|
53
53
|
'@zaui-form-required-after': 'var(--zaui-form-required-after, inline)',
|
|
54
54
|
'@zaui-form-required-before': 'var(--zaui-form-required-before, none)',
|
|
55
55
|
'@zaui-form-label-width': 'var(--zaui-form-label-width, 130px)',
|
|
56
|
-
'@zaui-border-radius': 'var(--zaui-border-radius,
|
|
57
|
-
'@zaui-border-radius-card': 'var(--zaui-border-radius-card,
|
|
56
|
+
'@zaui-border-radius': 'var(--zaui-border-radius, 8px)',
|
|
57
|
+
'@zaui-border-radius-card': 'var(--zaui-border-radius-card, 4px)',
|
|
58
58
|
'@zaui-font-size-title': 'calc(var(--zaui-font-size-title, 16px) + var(--zaui-base-font-size, 0px))',
|
|
59
59
|
'@zaui-font-size-card-title': 'calc(var(--zaui-font-size-card-title, 16px) + var(--zaui-base-font-size, 0px))',
|
|
60
60
|
'@zaui-font-size': 'calc(var(--zaui-font-size, 14px) + var(--zaui-base-font-size, 0px))',
|
|
@@ -28,12 +28,11 @@ var _useFieldProps = require("../../../ProForm/utils/useFieldProps");
|
|
|
28
28
|
var _useListChanged3 = require("../../../ProForm/utils/useListChanged");
|
|
29
29
|
var _useRules = _interopRequireDefault(require("../../../ProForm/utils/useRules"));
|
|
30
30
|
var _utils = require("../../../ProForm/utils");
|
|
31
|
-
var _locale = _interopRequireDefault(require("../../../locale"));
|
|
32
31
|
var _excluded = ["type", "valueType", "names", "fieldProps", "labelRequired", "editRender", "component", "viewRender", "title", "originTitle", "label", "dataIndex", "formItemProps", "isEditable", "required", "rules", "equalWith", "className"];
|
|
33
32
|
/* eslint-disable prefer-destructuring */
|
|
34
33
|
/* eslint-disable prefer-const */
|
|
35
34
|
var RenderField = function RenderField(_ref) {
|
|
36
|
-
var _type, _type$replace, _fieldProps2, _fieldProps3, _fieldProps4, _names,
|
|
35
|
+
var _type, _type$replace, _fieldProps2, _fieldProps3, _fieldProps4, _names, _TargetComponent4, _componentProps;
|
|
37
36
|
var value = _ref.text,
|
|
38
37
|
record = _ref.record,
|
|
39
38
|
index = _ref.index,
|
|
@@ -76,7 +75,7 @@ var RenderField = function RenderField(_ref) {
|
|
|
76
75
|
virtualKey = config.virtualKey,
|
|
77
76
|
viewEmpty = config.viewEmpty,
|
|
78
77
|
originalValues = config.originalValues,
|
|
79
|
-
|
|
78
|
+
originalDiffTip = config.originalDiffTip;
|
|
80
79
|
var _fieldProps = fieldProps || formItemProps || {};
|
|
81
80
|
var _rules = rules || [];
|
|
82
81
|
var _required = required;
|
|
@@ -144,7 +143,7 @@ var RenderField = function RenderField(_ref) {
|
|
|
144
143
|
var formItemChildProps = (0, _objectSpread2.default)({}, _fieldProps);
|
|
145
144
|
// 允许formItem的属性放在column最外层
|
|
146
145
|
var _formItemProps = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, resetProps), internalRule);
|
|
147
|
-
if (['Switch', '
|
|
146
|
+
if (['Switch', 'SwitchCheckbox'].includes(type)) {
|
|
148
147
|
_formItemProps.valuePropName = 'checked';
|
|
149
148
|
valueType = 'switch';
|
|
150
149
|
}
|
|
@@ -214,7 +213,7 @@ var RenderField = function RenderField(_ref) {
|
|
|
214
213
|
if (valueType) {
|
|
215
214
|
transform = valueTypeTransform();
|
|
216
215
|
}
|
|
217
|
-
return (0, _transformNames.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, _formItemProps), transform), form, names, namesStr);
|
|
216
|
+
return (0, _transformNames.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, _formItemProps), transform), form, names, namesStr, type);
|
|
218
217
|
};
|
|
219
218
|
if (!_editRender && typeof type === 'string') {
|
|
220
219
|
var _componentMap$type;
|
|
@@ -244,8 +243,6 @@ var RenderField = function RenderField(_ref) {
|
|
|
244
243
|
TargetComponent = viewRender;
|
|
245
244
|
}
|
|
246
245
|
}
|
|
247
|
-
var defaultPlaceholder = ['Select', 'EnumSelect', 'DatePicker', 'RangePicker', 'Cascader', 'ProSelect', 'ProEnum', 'ProTimeLimit'].includes(type) ? "".concat(_locale.default.ProEditTable.select).concat((0, _lodash.isString)(label) ? label || title : '') : "".concat(_locale.default.ProEditTable.enter).concat((0, _lodash.isString)(label) ? label || title : '');
|
|
248
|
-
var _placeholder = (_formItemChildProps$p = formItemChildProps === null || formItemChildProps === void 0 ? void 0 : formItemChildProps.placeholder) !== null && _formItemChildProps$p !== void 0 ? _formItemChildProps$p : defaultPlaceholder;
|
|
249
246
|
var onChange = formItemChildProps === null || formItemChildProps === void 0 ? void 0 : formItemChildProps.onChange;
|
|
250
247
|
var onFieldChange = formItemChildProps === null || formItemChildProps === void 0 ? void 0 : formItemChildProps.onFieldChange;
|
|
251
248
|
var onBlur = formItemChildProps === null || formItemChildProps === void 0 ? void 0 : formItemChildProps.onBlur;
|
|
@@ -306,7 +303,7 @@ var RenderField = function RenderField(_ref) {
|
|
|
306
303
|
}
|
|
307
304
|
_args = [].concat(args);
|
|
308
305
|
rowPath = [].concat((0, _toConsumableArray2.default)(namePath), [index]);
|
|
309
|
-
row = form.getFieldValue(rowPath);
|
|
306
|
+
row = type === 'Group' ? _args[1] : form.getFieldValue(rowPath, true);
|
|
310
307
|
orgRow = (0, _lodash.cloneDeep)(row);
|
|
311
308
|
if (!onFieldChange) {
|
|
312
309
|
_context.next = 18;
|
|
@@ -351,14 +348,16 @@ var RenderField = function RenderField(_ref) {
|
|
|
351
348
|
return onChange.apply(void 0, (0, _toConsumableArray2.default)(_args));
|
|
352
349
|
case 27:
|
|
353
350
|
// 判断属性是否变动
|
|
354
|
-
form.setFieldValue(rowPath, row);
|
|
351
|
+
type !== 'Group' && form.setFieldValue(rowPath, row);
|
|
355
352
|
if (!(0, _lodash.isEqual)(orgRow, row)) {
|
|
356
353
|
diff = (0, _tools.difference)(row, orgRow) || {};
|
|
357
354
|
validateFieldKeys = (_Object$keys = Object.keys(diff)) === null || _Object$keys === void 0 ? void 0 : (_Object$keys$map = _Object$keys.map) === null || _Object$keys$map === void 0 ? void 0 : _Object$keys$map.call(_Object$keys, function (key) {
|
|
358
355
|
return [].concat((0, _toConsumableArray2.default)(rowPath), [key]);
|
|
359
356
|
});
|
|
360
357
|
if (validateFieldKeys === null || validateFieldKeys === void 0 ? void 0 : validateFieldKeys.length) {
|
|
361
|
-
|
|
358
|
+
setTimeout(function () {
|
|
359
|
+
form.validateFields(validateFieldKeys);
|
|
360
|
+
}, 100);
|
|
362
361
|
}
|
|
363
362
|
}
|
|
364
363
|
setState({
|
|
@@ -471,12 +470,13 @@ var RenderField = function RenderField(_ref) {
|
|
|
471
470
|
originalValue = _useListChanged2[1];
|
|
472
471
|
var componentProps = (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
473
472
|
form: form,
|
|
474
|
-
name: cellName
|
|
475
|
-
placeholder: _placeholder
|
|
473
|
+
name: cellName
|
|
476
474
|
}, _fieldProps), (_TargetComponent4 = TargetComponent) === null || _TargetComponent4 === void 0 ? void 0 : _TargetComponent4.props), {}, {
|
|
475
|
+
namePath: [].concat((0, _toConsumableArray2.default)(namePath), [index]),
|
|
477
476
|
disabled: _disabled,
|
|
478
477
|
onChange: _onchange,
|
|
479
478
|
onBlur: _onblur,
|
|
479
|
+
index: index,
|
|
480
480
|
otherProps: {
|
|
481
481
|
form: form,
|
|
482
482
|
names: names,
|
|
@@ -486,11 +486,16 @@ var RenderField = function RenderField(_ref) {
|
|
|
486
486
|
isView: isView
|
|
487
487
|
}
|
|
488
488
|
});
|
|
489
|
+
if (type === 'Group') {
|
|
490
|
+
componentProps.onFieldChange = _onchange;
|
|
491
|
+
} else {
|
|
492
|
+
componentProps = (0, _lodash.omit)(componentProps, ['onFieldChange', 'namePath', 'index']);
|
|
493
|
+
}
|
|
489
494
|
// 单元格编辑时,设置各个单元格disabled属性
|
|
490
495
|
if (isCell) {
|
|
491
496
|
record["".concat(dataIndex, "-Disabled")] = _disabled;
|
|
492
497
|
}
|
|
493
|
-
if (['Switch', '
|
|
498
|
+
if (['Switch', 'SwitchCheckbox'].includes(type)) {
|
|
494
499
|
_formItemProps.valuePropName = 'checked';
|
|
495
500
|
}
|
|
496
501
|
(0, _react.useEffect)(function () {
|
|
@@ -510,12 +515,12 @@ var RenderField = function RenderField(_ref) {
|
|
|
510
515
|
delete _formItemProps.rules;
|
|
511
516
|
}
|
|
512
517
|
var _className = (0, _classnames.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, className, className), 'pro-form-item-changed', changed));
|
|
513
|
-
var originalTitle =
|
|
514
|
-
children: ["\u521D\u59CB\u503C\uFF1A", /*#__PURE__*/_react.default.isValidElement(TargetComponent) ? ( /*#__PURE__*/_react.default.cloneElement(TargetComponent, (0, _objectSpread2.default)((0, _objectSpread2.default)({},
|
|
518
|
+
var originalTitle = originalDiffTip ? (0, _jsxRuntime.jsxs)(_antd.Space, {
|
|
519
|
+
children: ["\u521D\u59CB\u503C\uFF1A", /*#__PURE__*/_react.default.isValidElement(TargetComponent) ? ( /*#__PURE__*/_react.default.cloneElement(TargetComponent, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, componentProps), {}, {
|
|
515
520
|
isView: true,
|
|
516
521
|
value: originalValue,
|
|
517
522
|
checked: type === 'Switch' ? originalValue : undefined
|
|
518
|
-
}))) : (0, _jsxRuntime.jsx)(TargetComponent, (0, _objectSpread2.default)((0, _objectSpread2.default)({},
|
|
523
|
+
}))) : (0, _jsxRuntime.jsx)(TargetComponent, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, componentProps), {}, {
|
|
519
524
|
isView: true,
|
|
520
525
|
value: originalValue,
|
|
521
526
|
checked: type === 'Switch' ? originalValue : undefined
|
|
@@ -526,15 +531,18 @@ var RenderField = function RenderField(_ref) {
|
|
|
526
531
|
}, (0, _lodash.omit)(_formItemProps, ['render', 'cache', 'key', 'width', 'hiddenNames', 'name'])), {}, {
|
|
527
532
|
className: _className,
|
|
528
533
|
name: cellName,
|
|
529
|
-
children: /*#__PURE__*/_react.default.isValidElement(TargetComponent) ? ( /*#__PURE__*/_react.default.cloneElement(TargetComponent,
|
|
534
|
+
children: /*#__PURE__*/_react.default.isValidElement(TargetComponent) ? ( /*#__PURE__*/_react.default.cloneElement(TargetComponent, componentProps)) : (0, _jsxRuntime.jsx)(TargetComponent, (0, _objectSpread2.default)({}, componentProps))
|
|
530
535
|
})) : (0, _jsxRuntime.jsx)(_Container.default, {
|
|
531
536
|
viewEmpty: viewEmpty
|
|
532
537
|
});
|
|
533
538
|
return (0, _jsxRuntime.jsx)(_useFieldProps.FieldProvider, {
|
|
534
|
-
value: componentProps === null ||
|
|
535
|
-
children: !
|
|
539
|
+
value: (_componentProps = componentProps) === null || _componentProps === void 0 ? void 0 : _componentProps.otherProps,
|
|
540
|
+
children: !originalDiffTip || ['FormList', 'ProEditTable'].includes(type) ? FormItem : (0, _jsxRuntime.jsx)(_antd.Tooltip, {
|
|
536
541
|
title: originalTitle,
|
|
537
542
|
open: changed ? undefined : false,
|
|
543
|
+
getPopupContainer: function getPopupContainer(target) {
|
|
544
|
+
return target.parentElement;
|
|
545
|
+
},
|
|
538
546
|
children: FormItem
|
|
539
547
|
})
|
|
540
548
|
});
|
|
@@ -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", "
|
|
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", "originalDiffTip", "rowKey"];
|
|
27
27
|
var ProEditTable = function ProEditTable(_ref, ref) {
|
|
28
28
|
var _resetProps$id, _resetProps$id$split, _themeConfig$data2, _value$2;
|
|
29
29
|
var value = _ref.value,
|
|
@@ -52,7 +52,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
52
52
|
headerRender = _ref.headerRender,
|
|
53
53
|
pagination = _ref.pagination,
|
|
54
54
|
originalValues = _ref.originalValues,
|
|
55
|
-
|
|
55
|
+
originalDiffTip = _ref.originalDiffTip,
|
|
56
56
|
rowKey = _ref.rowKey,
|
|
57
57
|
resetProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
58
58
|
// 上下文form
|
|
@@ -154,7 +154,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
154
154
|
tableLength: value === null || value === void 0 ? void 0 : value.length,
|
|
155
155
|
page: page,
|
|
156
156
|
originalValues: originalValues,
|
|
157
|
-
|
|
157
|
+
originalDiffTip: originalDiffTip,
|
|
158
158
|
prefixCls: prefixCls
|
|
159
159
|
};
|
|
160
160
|
// 编辑行设置下样式
|
|
@@ -130,7 +130,7 @@ export interface ProEditTableProps<T = any> extends Omit<TableProps<T>, 'onChang
|
|
|
130
130
|
* @description 原始数据源,是否tooltip显示
|
|
131
131
|
* @default -
|
|
132
132
|
*/
|
|
133
|
-
|
|
133
|
+
originalDiffTip?: boolean;
|
|
134
134
|
/**
|
|
135
135
|
* @description 可编辑表格的类型,单行、多行、单元格编辑
|
|
136
136
|
* @default false
|
|
@@ -196,11 +196,6 @@ var actions = exports.actions = {
|
|
|
196
196
|
addData.isEditing = true;
|
|
197
197
|
}
|
|
198
198
|
insertType === 'before' ? nextData.unshift(addData) : nextData.push(addData);
|
|
199
|
-
form.setFieldValue(name, nextData);
|
|
200
|
-
(_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, {
|
|
201
|
-
top: 10000,
|
|
202
|
-
behavior: 'smooth'
|
|
203
|
-
});
|
|
204
199
|
// 当单选情况下,存储正在编辑值
|
|
205
200
|
if (virtualKey) {
|
|
206
201
|
nextEditingKeys = (0, _toConsumableArray2.default)(editingKeys); // 开启编辑状态
|
|
@@ -210,6 +205,11 @@ var actions = exports.actions = {
|
|
|
210
205
|
editingKeys: nextEditingKeys
|
|
211
206
|
});
|
|
212
207
|
}
|
|
208
|
+
form.setFieldValue(name, nextData);
|
|
209
|
+
(_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, {
|
|
210
|
+
top: insertType === 'before' ? -10000 : 10000,
|
|
211
|
+
behavior: 'smooth'
|
|
212
|
+
});
|
|
213
213
|
_context2.next = 14;
|
|
214
214
|
return form.validateFields([name]);
|
|
215
215
|
case 14:
|
|
@@ -89,40 +89,77 @@ var getActionColumn = function getActionColumn(config) {
|
|
|
89
89
|
index = _utils.tools.calc(firstIndex, '+', index);
|
|
90
90
|
rowName = [].concat((0, _toConsumableArray2.default)(virtualRowName), [index]);
|
|
91
91
|
if (!(type === 'save')) {
|
|
92
|
-
_context.next =
|
|
92
|
+
_context.next = 12;
|
|
93
93
|
break;
|
|
94
94
|
}
|
|
95
|
-
_context.
|
|
95
|
+
_context.prev = 3;
|
|
96
|
+
_context.next = 6;
|
|
96
97
|
return (0, _tools.customValidate)(validateKeys, form, rowName);
|
|
97
|
-
case
|
|
98
|
+
case 6:
|
|
99
|
+
_context.next = 12;
|
|
100
|
+
break;
|
|
101
|
+
case 8:
|
|
102
|
+
_context.prev = 8;
|
|
103
|
+
_context.t0 = _context["catch"](3);
|
|
104
|
+
setTimeout(function () {
|
|
105
|
+
var errorDom = document.querySelector('.ant-form-item-has-error');
|
|
106
|
+
if (errorDom) {
|
|
107
|
+
var tableBody = errorDom.closest('.ant-table-content') || errorDom.closest('.ant-table-body');
|
|
108
|
+
var tableCell = errorDom.closest('.ant-table-cell');
|
|
109
|
+
if (tableBody && tableCell) {
|
|
110
|
+
var previousSibling = tableCell.previousElementSibling;
|
|
111
|
+
var childOffsetLeft = 0;
|
|
112
|
+
var childFixedLeft = 0;
|
|
113
|
+
while (previousSibling) {
|
|
114
|
+
if (previousSibling.nodeType === 1) {
|
|
115
|
+
var _previousSibling, _previousSibling$clas, _previousSibling$clas2, _previousSibling$clas3;
|
|
116
|
+
var _ref2 = previousSibling.getBoundingClientRect() || {},
|
|
117
|
+
_ref2$width = _ref2.width,
|
|
118
|
+
width = _ref2$width === void 0 ? 0 : _ref2$width;
|
|
119
|
+
childOffsetLeft += width;
|
|
120
|
+
if ((_previousSibling = previousSibling) === null || _previousSibling === void 0 ? void 0 : (_previousSibling$clas = _previousSibling.classList) === null || _previousSibling$clas === void 0 ? void 0 : (_previousSibling$clas2 = (_previousSibling$clas3 = _previousSibling$clas).contains) === null || _previousSibling$clas2 === void 0 ? void 0 : _previousSibling$clas2.call(_previousSibling$clas3, 'ant-table-cell-fix-left')) {
|
|
121
|
+
childFixedLeft += width;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
previousSibling = previousSibling.previousElementSibling;
|
|
125
|
+
}
|
|
126
|
+
tableBody.scrollTo({
|
|
127
|
+
left: childOffsetLeft - childFixedLeft,
|
|
128
|
+
behavior: 'smooth'
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}, 0);
|
|
133
|
+
return _context.abrupt("return", Promise.reject(_context.t0));
|
|
134
|
+
case 12:
|
|
98
135
|
// 编辑状态使用自定义form值,非编辑状态直接使用行数据
|
|
99
136
|
_record = (_form$getFieldValue = form.getFieldValue(rowName)) !== null && _form$getFieldValue !== void 0 ? _form$getFieldValue : record; // 新增事件可以设置初始默认值,当做函数的出参导出
|
|
100
137
|
onEvent = onClick || onHandle;
|
|
101
|
-
_context.next =
|
|
138
|
+
_context.next = 16;
|
|
102
139
|
return onEvent === null || onEvent === void 0 ? void 0 : onEvent(_record, index, {
|
|
103
140
|
form: form,
|
|
104
141
|
namePath: virtualRowName
|
|
105
142
|
});
|
|
106
|
-
case
|
|
107
|
-
_context.
|
|
108
|
-
_context.
|
|
109
|
-
if (!_context.
|
|
110
|
-
_context.next =
|
|
143
|
+
case 16:
|
|
144
|
+
_context.t2 = _yield$onEvent = _context.sent;
|
|
145
|
+
_context.t1 = _context.t2 !== null;
|
|
146
|
+
if (!_context.t1) {
|
|
147
|
+
_context.next = 20;
|
|
111
148
|
break;
|
|
112
149
|
}
|
|
113
|
-
_context.
|
|
114
|
-
case
|
|
115
|
-
if (!_context.
|
|
116
|
-
_context.next =
|
|
150
|
+
_context.t1 = _yield$onEvent !== void 0;
|
|
151
|
+
case 20:
|
|
152
|
+
if (!_context.t1) {
|
|
153
|
+
_context.next = 24;
|
|
117
154
|
break;
|
|
118
155
|
}
|
|
119
|
-
_context.
|
|
120
|
-
_context.next =
|
|
156
|
+
_context.t3 = _yield$onEvent;
|
|
157
|
+
_context.next = 25;
|
|
121
158
|
break;
|
|
122
|
-
case
|
|
123
|
-
_context.
|
|
124
|
-
case
|
|
125
|
-
result = _context.
|
|
159
|
+
case 24:
|
|
160
|
+
_context.t3 = true;
|
|
161
|
+
case 25:
|
|
162
|
+
result = _context.t3;
|
|
126
163
|
if (result && type !== 'custom') {
|
|
127
164
|
_config.actions[type]((0, _objectSpread2.default)((0, _objectSpread2.default)({}, config), {}, {
|
|
128
165
|
rowName: [].concat((0, _toConsumableArray2.default)(name), [index]),
|
|
@@ -132,11 +169,11 @@ var getActionColumn = function getActionColumn(config) {
|
|
|
132
169
|
validateKeys: validateKeys
|
|
133
170
|
}));
|
|
134
171
|
}
|
|
135
|
-
case
|
|
172
|
+
case 27:
|
|
136
173
|
case "end":
|
|
137
174
|
return _context.stop();
|
|
138
175
|
}
|
|
139
|
-
}, _callee);
|
|
176
|
+
}, _callee, null, [[3, 8]]);
|
|
140
177
|
}));
|
|
141
178
|
return function (_x, _x2) {
|
|
142
179
|
return _ref.apply(this, arguments);
|
|
@@ -214,10 +251,10 @@ var transformColumns = exports.transformColumns = function transformColumns() {
|
|
|
214
251
|
if (typeof columnTitle === 'string') {
|
|
215
252
|
item.originTitle = columnTitle;
|
|
216
253
|
if (tooltip) {
|
|
217
|
-
var
|
|
218
|
-
tooltipTitle =
|
|
219
|
-
icon =
|
|
220
|
-
resetProps = (0, _objectWithoutProperties2.default)(
|
|
254
|
+
var _ref3 = tooltip || {},
|
|
255
|
+
tooltipTitle = _ref3.title,
|
|
256
|
+
icon = _ref3.icon,
|
|
257
|
+
resetProps = (0, _objectWithoutProperties2.default)(_ref3, _excluded2);
|
|
221
258
|
item.title = (0, _jsxRuntime.jsxs)("span", {
|
|
222
259
|
className: "pro-edit-table-title pro-edit-table-tooltip",
|
|
223
260
|
children: [before, columnTitle, (0, _jsxRuntime.jsx)(_antd.Tooltip, (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
@@ -284,7 +321,7 @@ var transformColumns = exports.transformColumns = function transformColumns() {
|
|
|
284
321
|
(_item$fieldProps3 = item.fieldProps) === null || _item$fieldProps3 === void 0 ? true : delete _item$fieldProps3.useRequest;
|
|
285
322
|
}
|
|
286
323
|
var _render = function _render(text, record, index) {
|
|
287
|
-
var isEditing = !virtualKey || editingKeys.includes(record.rowKey);
|
|
324
|
+
var isEditing = !virtualKey || editingKeys.includes(record.rowKey) || record.addFlag;
|
|
288
325
|
var namePath = (0, _lodash.isArray)(name) ? name : [name];
|
|
289
326
|
if (virtualKey && editingKeys.includes(record.rowKey)) {
|
|
290
327
|
namePath = (0, _tools.getNamePath)(name, virtualKey);
|
|
@@ -369,13 +406,13 @@ var transformColumns = exports.transformColumns = function transformColumns() {
|
|
|
369
406
|
// cacheMap 用来存储缓存值,若有值后不再请求
|
|
370
407
|
if (JSON.stringify(cacheMap.current) === '{}') {
|
|
371
408
|
Promise.all(Object.entries(_cacheMap).map( /*#__PURE__*/function () {
|
|
372
|
-
var
|
|
373
|
-
var _item, key, value,
|
|
409
|
+
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee2(item) {
|
|
410
|
+
var _item, key, value, _ref5, service, option;
|
|
374
411
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee2$(_context2) {
|
|
375
412
|
while (1) switch (_context2.prev = _context2.next) {
|
|
376
413
|
case 0:
|
|
377
414
|
_item = (0, _slicedToArray2.default)(item, 2), key = _item[0], value = _item[1];
|
|
378
|
-
|
|
415
|
+
_ref5 = (value === null || value === void 0 ? void 0 : value.useRequest) || {}, service = _ref5.service, option = _ref5.option;
|
|
379
416
|
if (!service) {
|
|
380
417
|
_context2.next = 8;
|
|
381
418
|
break;
|
|
@@ -395,7 +432,7 @@ var transformColumns = exports.transformColumns = function transformColumns() {
|
|
|
395
432
|
}, _callee2);
|
|
396
433
|
}));
|
|
397
434
|
return function (_x3) {
|
|
398
|
-
return
|
|
435
|
+
return _ref4.apply(this, arguments);
|
|
399
436
|
};
|
|
400
437
|
}())).then(function (res) {
|
|
401
438
|
res.forEach(function (item) {
|
|
@@ -12,7 +12,9 @@ var getRandom = exports.getRandom = function getRandom() {
|
|
|
12
12
|
var difference = exports.difference = function difference(object, base) {
|
|
13
13
|
var changes = function changes(object, base) {
|
|
14
14
|
return (0, _lodash.transform)(object, function (result, value, key) {
|
|
15
|
-
if (
|
|
15
|
+
if (key.indexOf('-') > -1) {
|
|
16
|
+
result[key] = true;
|
|
17
|
+
} else if (!(0, _lodash.isEqual)(value, base[key])) {
|
|
16
18
|
result[key] = (0, _lodash.isObject)(value) && (0, _lodash.isObject)(base[key]) ? changes(value, base[key]) : value;
|
|
17
19
|
}
|
|
18
20
|
});
|