@zat-design/sisyphus-react 3.2.0 → 3.2.1-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 +25 -21
- package/es/ProDownload/utils.js +0 -2
- package/es/ProForm/components/base/Checkbox/index.d.ts +1 -0
- package/es/ProForm/components/base/Checkbox/index.js +5 -3
- package/es/ProForm/components/base/DatePicker/index.js +3 -2
- package/es/ProForm/components/base/Input/index.js +4 -2
- package/es/ProForm/components/base/Input/propsType.d.ts +1 -0
- package/es/ProForm/components/base/InputNumber/index.d.ts +1 -0
- package/es/ProForm/components/base/InputNumber/index.js +5 -3
- package/es/ProForm/components/base/ProCascader/index.js +6 -6
- package/es/ProForm/components/base/Radio/index.d.ts +1 -0
- package/es/ProForm/components/base/Radio/index.js +4 -2
- package/es/ProForm/components/base/RangePicker/index.d.ts +1 -0
- package/es/ProForm/components/base/RangePicker/index.js +5 -3
- package/es/ProForm/components/base/Select/index.d.ts +1 -0
- package/es/ProForm/components/base/Select/index.js +4 -2
- package/es/ProForm/components/base/Switch/index.d.ts +1 -0
- package/es/ProForm/components/base/Switch/index.js +4 -2
- package/es/ProForm/components/base/SwitchCheckbox/index.d.ts +1 -0
- package/es/ProForm/components/base/SwitchCheckbox/index.js +4 -2
- package/es/ProForm/components/base/TextArea/index.d.ts +1 -0
- package/es/ProForm/components/base/TextArea/index.js +4 -3
- package/es/ProForm/components/base/TimePicker/index.d.ts +1 -0
- package/es/ProForm/components/base/TimePicker/index.js +4 -2
- package/es/ProForm/components/combination/Container/index.js +7 -5
- package/es/ProForm/components/combination/FormList/index.js +6 -5
- package/es/ProForm/components/combination/FormList/style/index.less +1 -1
- package/es/ProForm/components/combination/Group/index.js +6 -3
- package/es/ProForm/components/combination/ProAddressBar/index.js +29 -30
- package/es/ProForm/components/combination/ProCombination/index.js +10 -11
- package/es/ProForm/components/combination/ProModalSelect/index.js +4 -5
- package/es/ProForm/components/combination/ProNumberRange/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProNumberRange/index.js +7 -7
- package/es/ProForm/components/combination/ProRangeLimit/index.d.ts +1 -0
- package/es/ProForm/components/combination/ProRangeLimit/index.js +4 -2
- package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +1 -0
- package/es/ProForm/components/combination/ProTimeLimit/index.js +4 -2
- package/es/ProForm/components/render/Render.js +47 -18
- package/es/ProForm/components/render/RenderFields.d.ts +1 -0
- package/es/ProForm/components/render/RenderFields.js +4 -2
- package/es/ProForm/index.js +5 -2
- package/es/ProForm/propsType.d.ts +1 -0
- package/es/ProForm/style/index.less +43 -42
- package/es/ProForm/utils/useChanged.d.ts +1 -1
- package/es/ProForm/utils/useChanged.js +8 -7
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +7 -13
- package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +6 -7
- package/es/ProLayout/components/ProHeader/style/index.less +1 -1
- package/es/ProSelect/index.js +6 -3
- package/es/ProTree/style/index.less +2 -2
- package/es/ProTreeModal/style/index.less +13 -13
- package/lib/ProEditTable/components/RenderField/index.js +0 -2
- package/lib/ProForm/components/base/Checkbox/index.d.ts +1 -0
- package/lib/ProForm/components/base/Checkbox/index.js +5 -3
- package/lib/ProForm/components/base/DatePicker/index.js +3 -2
- package/lib/ProForm/components/base/Input/index.js +4 -2
- package/lib/ProForm/components/base/Input/propsType.d.ts +1 -0
- package/lib/ProForm/components/base/InputNumber/index.d.ts +1 -0
- package/lib/ProForm/components/base/InputNumber/index.js +5 -3
- package/lib/ProForm/components/base/ProCascader/index.js +6 -6
- package/lib/ProForm/components/base/Radio/index.d.ts +1 -0
- package/lib/ProForm/components/base/Radio/index.js +4 -2
- package/lib/ProForm/components/base/RangePicker/index.d.ts +1 -0
- package/lib/ProForm/components/base/RangePicker/index.js +6 -4
- package/lib/ProForm/components/base/Select/index.d.ts +1 -0
- package/lib/ProForm/components/base/Select/index.js +4 -2
- package/lib/ProForm/components/base/Switch/index.d.ts +1 -0
- package/lib/ProForm/components/base/Switch/index.js +4 -2
- package/lib/ProForm/components/base/SwitchCheckbox/index.d.ts +1 -0
- package/lib/ProForm/components/base/SwitchCheckbox/index.js +4 -2
- package/lib/ProForm/components/base/TextArea/index.d.ts +1 -0
- package/lib/ProForm/components/base/TextArea/index.js +4 -3
- package/lib/ProForm/components/base/TimePicker/index.d.ts +1 -0
- package/lib/ProForm/components/base/TimePicker/index.js +4 -2
- package/lib/ProForm/components/combination/Container/index.js +7 -5
- package/lib/ProForm/components/combination/FormList/index.js +6 -5
- package/lib/ProForm/components/combination/FormList/style/index.less +1 -1
- package/lib/ProForm/components/combination/Group/index.js +6 -3
- package/lib/ProForm/components/combination/ProAddressBar/index.js +29 -30
- package/lib/ProForm/components/combination/ProCombination/index.js +10 -11
- package/lib/ProForm/components/combination/ProModalSelect/index.js +4 -5
- package/lib/ProForm/components/combination/ProNumberRange/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProNumberRange/index.js +7 -7
- package/lib/ProForm/components/combination/ProRangeLimit/index.d.ts +1 -0
- package/lib/ProForm/components/combination/ProRangeLimit/index.js +4 -2
- package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +1 -0
- package/lib/ProForm/components/combination/ProTimeLimit/index.js +4 -2
- package/lib/ProForm/components/old/InputRange/index.js +1 -0
- package/lib/ProForm/components/old/ProCertValidity/index.js +1 -1
- package/lib/ProForm/components/render/Render.js +46 -20
- package/lib/ProForm/components/render/RenderFields.d.ts +1 -0
- package/lib/ProForm/components/render/RenderFields.js +4 -2
- package/lib/ProForm/index.js +5 -2
- package/lib/ProForm/propsType.d.ts +1 -0
- package/lib/ProForm/style/index.less +43 -42
- package/lib/ProForm/utils/useChanged.d.ts +1 -1
- package/lib/ProForm/utils/useChanged.js +8 -7
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +6 -12
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +6 -7
- package/lib/ProLayout/components/ProHeader/style/index.less +1 -1
- package/lib/ProSelect/index.js +6 -3
- package/lib/ProTable/components/TableResizable/index.js +0 -8
- package/lib/ProTabs/index.js +0 -1
- package/lib/ProThemeTools/index.js +0 -1
- package/lib/ProTree/components/Tree.js +0 -7
- package/lib/ProTree/index.js +1 -0
- package/lib/ProTree/style/index.less +2 -2
- package/lib/ProTreeModal/components/Tree.js +0 -1
- package/lib/ProTreeModal/style/index.less +13 -13
- package/lib/ProUpload/index.js +0 -7
- package/lib/old/ProCertValidity/index.js +1 -1
- package/package.json +1 -1
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
.pro-form-custom-footer {
|
|
20
|
-
display
|
|
21
|
-
align-items
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
height: auto;
|
|
22
23
|
margin-bottom: 0;
|
|
23
|
-
|
|
24
|
-
padding-top : 6px;
|
|
24
|
+
padding-top: 6px;
|
|
25
25
|
|
|
26
26
|
.ant-space-align-center {
|
|
27
27
|
align-items: normal;
|
|
@@ -45,17 +45,17 @@
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
span.ant-input-clear-icon {
|
|
48
|
-
display
|
|
48
|
+
display: unset;
|
|
49
49
|
visibility: hidden;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
.ant-input-affix-wrapper:hover span.ant-input-clear-icon {
|
|
53
|
-
display
|
|
53
|
+
display: unset;
|
|
54
54
|
visibility: unset;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
.ant-input-affix-wrapper:hover span.ant-input-clear-icon[class~='ant-input-clear-icon-hidden'] {
|
|
58
|
-
display
|
|
58
|
+
display: unset;
|
|
59
59
|
visibility: hidden;
|
|
60
60
|
}
|
|
61
61
|
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
// 展开折叠按钮
|
|
91
91
|
.expand-button {
|
|
92
92
|
line-height: @zaui-space-card;
|
|
93
|
-
cursor
|
|
93
|
+
cursor: pointer;
|
|
94
94
|
|
|
95
95
|
.rotate-to-top {
|
|
96
96
|
transform: rotate(90deg);
|
|
@@ -116,24 +116,26 @@
|
|
|
116
116
|
|
|
117
117
|
.ant-form-item-tooltip {
|
|
118
118
|
svg {
|
|
119
|
-
width
|
|
120
|
-
height
|
|
119
|
+
width: 14px;
|
|
120
|
+
height: 14px;
|
|
121
121
|
vertical-align: bottom;
|
|
122
|
-
fill
|
|
122
|
+
fill: @zaui-aide-text;
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
// 比较原始值场景下 不同时候的样式
|
|
127
127
|
&.pro-form-item-changed {
|
|
128
|
-
|
|
129
128
|
span.ant-input-affix-wrapper,
|
|
130
129
|
.ant-select-selector,
|
|
131
130
|
.ant-picker {
|
|
132
|
-
background: @zaui-contract-bg;
|
|
131
|
+
background: @zaui-contract-bg !important;
|
|
133
132
|
|
|
134
133
|
input {
|
|
135
134
|
background: @zaui-contract-bg;
|
|
136
135
|
}
|
|
136
|
+
.ant-select-selection-placeholder {
|
|
137
|
+
z-index: 9;
|
|
138
|
+
}
|
|
137
139
|
}
|
|
138
140
|
}
|
|
139
141
|
|
|
@@ -168,9 +170,9 @@
|
|
|
168
170
|
}
|
|
169
171
|
|
|
170
172
|
.range-right {
|
|
171
|
-
width
|
|
172
|
-
border
|
|
173
|
-
border-top-left-radius
|
|
173
|
+
width: 100%;
|
|
174
|
+
border: 1px solid @zaui-form-control-line;
|
|
175
|
+
border-top-left-radius: 0;
|
|
174
176
|
border-bottom-left-radius: 0;
|
|
175
177
|
}
|
|
176
178
|
}
|
|
@@ -182,7 +184,7 @@
|
|
|
182
184
|
}
|
|
183
185
|
|
|
184
186
|
.ant-form-item-label {
|
|
185
|
-
>label {
|
|
187
|
+
> label {
|
|
186
188
|
white-space: pre-wrap;
|
|
187
189
|
}
|
|
188
190
|
}
|
|
@@ -193,7 +195,7 @@
|
|
|
193
195
|
|
|
194
196
|
.ant-form-item-has-error {
|
|
195
197
|
.group-separator {
|
|
196
|
-
color
|
|
198
|
+
color: var(--ant-error-color);
|
|
197
199
|
border-color: var(--ant-error-color);
|
|
198
200
|
}
|
|
199
201
|
|
|
@@ -203,10 +205,9 @@
|
|
|
203
205
|
}
|
|
204
206
|
|
|
205
207
|
.site-input-group-wrapper {
|
|
206
|
-
|
|
207
208
|
// 范围值表单样式
|
|
208
209
|
& .site-input-split {
|
|
209
|
-
text-align
|
|
210
|
+
text-align: center;
|
|
210
211
|
background-color: @zaui-table-strip-bg;
|
|
211
212
|
|
|
212
213
|
&.site-input-split-disabled {
|
|
@@ -252,33 +253,33 @@
|
|
|
252
253
|
}
|
|
253
254
|
}
|
|
254
255
|
|
|
255
|
-
&.ant-input-group.ant-input-group-compact
|
|
256
|
+
&.ant-input-group.ant-input-group-compact > *:not(:last-child) {
|
|
256
257
|
margin-right: 0;
|
|
257
258
|
}
|
|
258
259
|
|
|
259
|
-
|
|
260
|
-
border-top-right-radius
|
|
260
|
+
> *:first-child {
|
|
261
|
+
border-top-right-radius: 0 !important;
|
|
261
262
|
border-bottom-right-radius: 0 !important;
|
|
262
263
|
|
|
263
|
-
|
|
264
|
-
border-top-right-radius
|
|
264
|
+
> .ant-select-selector {
|
|
265
|
+
border-top-right-radius: 0 !important;
|
|
265
266
|
border-bottom-right-radius: 0 !important;
|
|
266
267
|
}
|
|
267
268
|
}
|
|
268
269
|
|
|
269
|
-
|
|
270
|
-
border-top-left-radius
|
|
270
|
+
> *:last-child {
|
|
271
|
+
border-top-left-radius: 0 !important;
|
|
271
272
|
border-bottom-left-radius: 0 !important;
|
|
272
273
|
|
|
273
|
-
|
|
274
|
-
border-top-left-radius
|
|
274
|
+
> .ant-select-selector {
|
|
275
|
+
border-top-left-radius: 0 !important;
|
|
275
276
|
border-bottom-left-radius: 0 !important;
|
|
276
277
|
}
|
|
277
278
|
}
|
|
278
279
|
}
|
|
279
280
|
|
|
280
|
-
.ant-input-group.ant-input-group-compact
|
|
281
|
-
float
|
|
281
|
+
.ant-input-group.ant-input-group-compact > * {
|
|
282
|
+
float: none;
|
|
282
283
|
vertical-align: top;
|
|
283
284
|
}
|
|
284
285
|
|
|
@@ -287,17 +288,17 @@
|
|
|
287
288
|
}
|
|
288
289
|
|
|
289
290
|
.noDisabled {
|
|
290
|
-
color
|
|
291
|
-
font-size
|
|
291
|
+
color: @zaui-disabled-text;
|
|
292
|
+
font-size: var(--zaui-font-size, 14px);
|
|
292
293
|
background-color: transparent;
|
|
293
|
-
border
|
|
294
|
-
cursor
|
|
295
|
-
opacity
|
|
294
|
+
border: none;
|
|
295
|
+
cursor: default;
|
|
296
|
+
opacity: 1;
|
|
296
297
|
}
|
|
297
298
|
|
|
298
299
|
div.pro-form-custom-footer {
|
|
299
|
-
width
|
|
300
|
-
height
|
|
300
|
+
width: unset !important;
|
|
301
|
+
height: @zaui-space-card;
|
|
301
302
|
margin-bottom: calc(var(--zaui-height-size-md, 16px) * var(--zaui-size, 1));
|
|
302
303
|
|
|
303
304
|
&.pro-form-custom-footer-hidden {
|
|
@@ -306,14 +307,14 @@
|
|
|
306
307
|
}
|
|
307
308
|
|
|
308
309
|
.pro-form-view-container {
|
|
309
|
-
display
|
|
310
|
-
color
|
|
310
|
+
display: inline-block;
|
|
311
|
+
color: var(--zaui-text, #343434);
|
|
311
312
|
word-break: break-all;
|
|
312
313
|
}
|
|
313
314
|
|
|
314
315
|
.pro-form-view-container_nowrap {
|
|
315
|
-
overflow
|
|
316
|
-
white-space
|
|
316
|
+
overflow: hidden;
|
|
317
|
+
white-space: nowrap;
|
|
317
318
|
text-overflow: ellipsis;
|
|
318
319
|
}
|
|
319
320
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useChanged: (name: any, names: any, nameStr: any, originalValues: any, form: any, fun: any) => any;
|
|
1
|
+
export declare const useChanged: (name: any, names: any, nameStr: any, originalValues: any, form: any, fun: any) => any[];
|
|
@@ -3,12 +3,13 @@ import _Form from "antd/es/form";
|
|
|
3
3
|
import { get } from 'lodash';
|
|
4
4
|
import { contrastOriginal } from './contrastOriginal';
|
|
5
5
|
export var useChanged = function useChanged(name, names, nameStr, originalValues, form, fun) {
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var value = _Form.useWatch(nameStr || name,
|
|
6
|
+
var originalValue = (names === null || names === void 0 ? void 0 : names.length) ? names.map(function (name) {
|
|
7
|
+
return get(originalValues, name);
|
|
8
|
+
}) : get(originalValues, name);
|
|
9
|
+
var notWatch = !originalValues || originalValue === undefined;
|
|
10
|
+
if (notWatch) form = [];
|
|
11
|
+
var value = _Form.useWatch(nameStr || name, form);
|
|
12
|
+
if (notWatch) return [false];
|
|
12
13
|
var changed = contrastOriginal(name, names, originalValues, value, fun);
|
|
13
|
-
return changed;
|
|
14
|
+
return [changed, originalValue];
|
|
14
15
|
};
|
|
@@ -3,7 +3,7 @@ import _Menu from "antd/es/menu";
|
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
5
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { useMemo, useRef,
|
|
6
|
+
import { useMemo, useRef, useContext } from 'react';
|
|
7
7
|
import { useDeepCompareEffect, useSetState } from 'ahooks';
|
|
8
8
|
import { CaretDownOutlined } from '@ant-design/icons';
|
|
9
9
|
import classnames from 'classnames';
|
|
@@ -122,18 +122,6 @@ 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]);
|
|
131
|
-
useEffect(function () {
|
|
132
|
-
// 路由变更,且不再demo文档中
|
|
133
|
-
if (router && !window.location.href.includes('~demos/prolayout')) {
|
|
134
|
-
linkRef.current.click();
|
|
135
|
-
}
|
|
136
|
-
}, [router]);
|
|
137
125
|
return _jsxs("div", {
|
|
138
126
|
className: cls,
|
|
139
127
|
style: style,
|
|
@@ -162,6 +150,12 @@ var OpenMenu = function OpenMenu(props) {
|
|
|
162
150
|
onSelected({
|
|
163
151
|
selectedPath: item === null || item === void 0 ? void 0 : (_item$props2 = item.props) === null || _item$props2 === void 0 ? void 0 : _item$props2.router
|
|
164
152
|
});
|
|
153
|
+
setTimeout(function () {
|
|
154
|
+
// 路由变更,且不再demo文档中
|
|
155
|
+
if (!window.location.href.includes('~demos/prolayout')) {
|
|
156
|
+
linkRef.current.click();
|
|
157
|
+
}
|
|
158
|
+
}, 100);
|
|
165
159
|
},
|
|
166
160
|
style: {
|
|
167
161
|
height: dataSource.sideMenu ? 'auto' : "calc(100vh - ".concat((dataSource === null || dataSource === void 0 ? void 0 : dataSource.height) || 0, "px)"),
|
|
@@ -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
|
|
97
|
-
|
|
98
|
-
min-height : 48px;
|
|
92
|
+
white-space: pre-wrap;
|
|
93
|
+
line-height: initial !important;
|
|
94
|
+
height : auto !important;
|
|
95
|
+
margin : 0;
|
|
96
|
+
padding: 12px 0;
|
|
97
|
+
min-height : 48px;
|
|
99
98
|
}
|
|
100
99
|
|
|
101
100
|
.ant-menu-title-content {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
.pro-header {
|
|
4
4
|
background-color: var(--zaui-base-bg, #ffffff);
|
|
5
|
-
padding :
|
|
5
|
+
padding : 24px 0 0 0;
|
|
6
6
|
|
|
7
7
|
&.pro-header-no-back {
|
|
8
8
|
.pro-header-top {
|
package/es/ProSelect/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
|
9
9
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
10
10
|
import "antd/es/select/style";
|
|
11
11
|
import _Select from "antd/es/select";
|
|
12
|
-
var _excluded = ["dataSource", "defaultDisableValue", "useRequest", "fieldNames", "tooltip", "otherProps", "labelInValue", "scrollFollowParent", "defaultOne", "onSearch", "optionRender", "onChange", "updateDataSource", "transformResponse"];
|
|
12
|
+
var _excluded = ["dataSource", "defaultDisableValue", "useRequest", "fieldNames", "tooltip", "otherProps", "labelInValue", "scrollFollowParent", "defaultOne", "onSearch", "optionRender", "onChange", "updateDataSource", "transformResponse", "isView"];
|
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
import { useDeepCompareEffect, useRequest as useRequestFunc } from 'ahooks';
|
|
15
15
|
import React, { useImperativeHandle, useState, forwardRef } from 'react';
|
|
@@ -17,6 +17,7 @@ import { isFunction, isObject, isString, omit, cloneDeep } from 'lodash';
|
|
|
17
17
|
import { useProConfig } from '../ProConfigProvider';
|
|
18
18
|
import Container from '../ProForm/components/Container';
|
|
19
19
|
import AdaptiveTooltip from './components/AdaptiveTooltip';
|
|
20
|
+
import { ProForm } from '..';
|
|
20
21
|
import locale from '../locale';
|
|
21
22
|
import './index.less';
|
|
22
23
|
var Option = _Select.Option;
|
|
@@ -48,11 +49,13 @@ export var ProSelect = function ProSelect(props, ref) {
|
|
|
48
49
|
onChange = props.onChange,
|
|
49
50
|
updateDataSource = props.updateDataSource,
|
|
50
51
|
transformResponse = props.transformResponse,
|
|
52
|
+
isViewPro = props.isView,
|
|
51
53
|
selectProps = _objectWithoutProperties(props, _excluded);
|
|
52
54
|
var value = props.value;
|
|
53
|
-
var _ref2 =
|
|
54
|
-
|
|
55
|
+
var _ref2 = ProForm.useFieldProps() || {},
|
|
56
|
+
isViewCon = _ref2.isView,
|
|
55
57
|
viewEmpty = _ref2.viewEmpty;
|
|
58
|
+
var isView = typeof props.isView === 'boolean' ? props.isView : isViewCon; // 组件可直接接收isView参数, 优先级高
|
|
56
59
|
if (fieldNames && Object.keys(fieldNames).length) {
|
|
57
60
|
code = fieldNames.value;
|
|
58
61
|
label = fieldNames.label;
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.ant-tree-switcher {
|
|
21
|
-
width :
|
|
22
|
-
line-height:
|
|
21
|
+
width : 20px;
|
|
22
|
+
line-height: 20px;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.ant-tree-treenode {
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
padding-bottom: var(--zaui-font-size-sm, 12px);
|
|
29
29
|
color : var(--zaui-text);
|
|
30
30
|
font-size : var(--zaui-font-size, 14px);
|
|
31
|
-
line-height :
|
|
31
|
+
line-height : 20px;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
.ant-tree-node-content-wrapper {
|
|
35
|
-
min-height :
|
|
36
|
-
line-height:
|
|
35
|
+
min-height : 20px;
|
|
36
|
+
line-height: 20px;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.ant-tree-node-content-wrapper {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
height : 100%;
|
|
49
49
|
color : var(--zaui-text);
|
|
50
50
|
font-size : var(--zaui-font-size, 14px);
|
|
51
|
-
line-height :
|
|
51
|
+
line-height : 20px;
|
|
52
52
|
border : 1px solid #e6e6e6;
|
|
53
53
|
border-radius : var(--zaui-border-radius, 4px);
|
|
54
54
|
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
align-items : center;
|
|
132
132
|
justify-content: space-between;
|
|
133
133
|
margin-bottom : calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
|
|
134
|
-
line-height :
|
|
134
|
+
line-height : 20px;
|
|
135
135
|
cursor : pointer;
|
|
136
136
|
|
|
137
137
|
&-look {
|
|
@@ -188,17 +188,17 @@
|
|
|
188
188
|
display : flex;
|
|
189
189
|
align-items : center;
|
|
190
190
|
justify-content: center;
|
|
191
|
-
height :
|
|
191
|
+
height : 20px;
|
|
192
192
|
margin-right : var(--zaui-space-size-sm, 8px);
|
|
193
193
|
padding : 0 var(--zaui-space-size-xs);
|
|
194
194
|
font-weight : 400;
|
|
195
|
-
line-height :
|
|
195
|
+
line-height : 24px;
|
|
196
196
|
white-space : nowrap;
|
|
197
197
|
border-radius : var(--zaui-border-radius-card);
|
|
198
198
|
|
|
199
199
|
span {
|
|
200
200
|
font-size : var(--zaui-font-size-sm, 12px);
|
|
201
|
-
line-height:
|
|
201
|
+
line-height: 20px;
|
|
202
202
|
text-align : center;
|
|
203
203
|
transform : scale(0.83, 0.83);
|
|
204
204
|
}
|
|
@@ -228,7 +228,7 @@
|
|
|
228
228
|
align-items : center;
|
|
229
229
|
justify-content: space-between;
|
|
230
230
|
width : 100%;
|
|
231
|
-
height :
|
|
231
|
+
height : 32px;
|
|
232
232
|
padding : 2px var(--zaui-space-size-sm, 8px);
|
|
233
233
|
color : var(--zaui-text, #343434);
|
|
234
234
|
font-size : var(--zaui-font-size, 14px);
|
|
@@ -237,7 +237,7 @@
|
|
|
237
237
|
border-radius : var(--zaui-border-radius, 4px);
|
|
238
238
|
|
|
239
239
|
.drag-icon {
|
|
240
|
-
height :
|
|
240
|
+
height : 20px;
|
|
241
241
|
margin-right: var(--zaui-space-size-xs, 4px);
|
|
242
242
|
cursor : move;
|
|
243
243
|
}
|
|
@@ -248,7 +248,7 @@
|
|
|
248
248
|
}
|
|
249
249
|
|
|
250
250
|
.disabled-icon {
|
|
251
|
-
height :
|
|
251
|
+
height : 20px;
|
|
252
252
|
margin-right: var(--zaui-space-size-xs, 4px);
|
|
253
253
|
}
|
|
254
254
|
|
|
@@ -26,8 +26,6 @@ var _useRules = _interopRequireDefault(require("../../../ProForm/utils/useRules"
|
|
|
26
26
|
var _utils = require("../../../ProForm/utils");
|
|
27
27
|
var _locale = _interopRequireDefault(require("../../../locale"));
|
|
28
28
|
var _excluded = ["type", "valueType", "names", "fieldProps", "labelRequired", "editRender", "component", "viewRender", "title", "originTitle", "label", "dataIndex", "formItemProps", "isEditable", "required", "rules"];
|
|
29
|
-
/* eslint-disable prefer-destructuring */
|
|
30
|
-
/* eslint-disable prefer-const */
|
|
31
29
|
var RenderField = function RenderField(_ref) {
|
|
32
30
|
var _type, _type$replace, _fieldProps2, _fieldProps3, _fieldProps4, _names, _formItemChildProps$p, _TargetComponent4;
|
|
33
31
|
var value = _ref.text,
|
|
@@ -12,16 +12,18 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
12
12
|
var _antd = require("antd");
|
|
13
13
|
var _Container = _interopRequireDefault(require("../../Container"));
|
|
14
14
|
var _ProConfigProvider = require("../../../../ProConfigProvider");
|
|
15
|
+
var _index = _interopRequireDefault(require("../../../index"));
|
|
15
16
|
var _excluded = ["dataSource", "otherProps", "fieldNames"];
|
|
16
17
|
var Checkbox = function Checkbox(props) {
|
|
17
18
|
var dataSource = props.dataSource,
|
|
18
19
|
otherProps = props.otherProps,
|
|
19
20
|
fieldNames = props.fieldNames,
|
|
20
21
|
rest = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
21
|
-
var _ref = otherProps || {},
|
|
22
|
-
isView = _ref.isView,
|
|
23
|
-
viewEmpty = _ref.viewEmpty;
|
|
24
22
|
var initialConfig = (0, _ProConfigProvider.useProConfig)('Checkbox') || {};
|
|
23
|
+
var _ref = _index.default.useFieldProps() || {},
|
|
24
|
+
isViewCon = _ref.isView,
|
|
25
|
+
viewEmpty = _ref.viewEmpty;
|
|
26
|
+
var isView = typeof props.isView === 'boolean' ? props.isView : isViewCon; // 组件可直接接收isView参数, 优先级高
|
|
25
27
|
var _fieldNames = fieldNames || initialConfig.fieldNames || {
|
|
26
28
|
label: 'label',
|
|
27
29
|
value: 'value'
|
|
@@ -23,14 +23,15 @@ var DatePicker = function DatePicker(props) {
|
|
|
23
23
|
format = _props$format === void 0 ? 'YYYY-MM-DD' : _props$format,
|
|
24
24
|
rest = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
25
25
|
var _ref = _ProForm.default.useFieldProps() || {},
|
|
26
|
-
|
|
26
|
+
isViewCon = _ref.isView,
|
|
27
27
|
viewEmpty = _ref.viewEmpty,
|
|
28
28
|
valueType = _ref.valueType;
|
|
29
|
+
var isView = typeof props.isView === 'boolean' ? props.isView : isViewCon; // 组件可直接接收isView参数, 优先级高
|
|
29
30
|
var initialConfig = (0, _ProConfigProvider.useProConfig)('DatePicker');
|
|
30
31
|
var _className = (0, _classnames.default)((0, _defineProperty2.default)({
|
|
31
32
|
'full-form-item': true
|
|
32
33
|
}, className, !!className));
|
|
33
|
-
if (isView
|
|
34
|
+
if (isView) {
|
|
34
35
|
var value = rest.value;
|
|
35
36
|
var viewChildren = null;
|
|
36
37
|
if (!value) {
|
|
@@ -13,6 +13,7 @@ var _lodash = require("lodash");
|
|
|
13
13
|
var _ProConfigProvider = require("../../../../ProConfigProvider");
|
|
14
14
|
var _Container = _interopRequireDefault(require("../../Container"));
|
|
15
15
|
var _locale = _interopRequireDefault(require("../../../../locale"));
|
|
16
|
+
var _index = _interopRequireDefault(require("../../../index"));
|
|
16
17
|
var _excluded = ["label", "form", "placeholder", "fieldName", "otherProps"];
|
|
17
18
|
// 参数优先级
|
|
18
19
|
// 组件内默认值 < config默认值 < props
|
|
@@ -23,9 +24,10 @@ var Input = function Input(props) {
|
|
|
23
24
|
fieldName = props.fieldName,
|
|
24
25
|
otherProps = props.otherProps,
|
|
25
26
|
rest = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
26
|
-
var _ref =
|
|
27
|
-
|
|
27
|
+
var _ref = _index.default.useFieldProps() || {},
|
|
28
|
+
isViewCon = _ref.isView,
|
|
28
29
|
viewEmpty = _ref.viewEmpty;
|
|
30
|
+
var isView = typeof props.isView === 'boolean' ? props.isView : isViewCon; // 组件可直接接收isView参数, 优先级高
|
|
29
31
|
var initialConfig = (0, _ProConfigProvider.useProConfig)('Input');
|
|
30
32
|
if (isView) {
|
|
31
33
|
return (0, _jsxRuntime.jsx)(_Container.default, {
|
|
@@ -5,6 +5,7 @@ export interface Props extends Omit<InputNumberProps, 'onBlur'> {
|
|
|
5
5
|
otherProps?: ProFormOtherProps;
|
|
6
6
|
range?: string;
|
|
7
7
|
onBlur?: (value?: number, record?: any, object?: any) => void;
|
|
8
|
+
isView?: boolean;
|
|
8
9
|
}
|
|
9
10
|
declare const InputNumber: React.FC<Props>;
|
|
10
11
|
export default InputNumber;
|
|
@@ -20,6 +20,7 @@ var _ProConfigProvider = require("../../../../ProConfigProvider");
|
|
|
20
20
|
var _Container = _interopRequireDefault(require("../../Container"));
|
|
21
21
|
var _index = require("../../../utils/index");
|
|
22
22
|
var _locale = _interopRequireDefault(require("../../../../locale"));
|
|
23
|
+
var _ProForm = _interopRequireDefault(require("../../../../ProForm"));
|
|
23
24
|
var _excluded = ["placeholder", "className", "otherProps", "range", "min", "max", "onBlur"];
|
|
24
25
|
var calc = _utils.tools.calc;
|
|
25
26
|
var rangeReg = /^[([](-?\d+(\.\d+)?)?,\s*(-?\d+(\.\d+)?)?[)\]]$/;
|
|
@@ -46,12 +47,13 @@ var InputNumber = function InputNumber(props) {
|
|
|
46
47
|
max = props.max,
|
|
47
48
|
onBlur = props.onBlur,
|
|
48
49
|
rest = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
49
|
-
var _ref2 =
|
|
50
|
-
|
|
50
|
+
var _ref2 = _ProForm.default.useFieldProps() || {},
|
|
51
|
+
isViewCon = _ref2.isView,
|
|
51
52
|
viewEmpty = _ref2.viewEmpty,
|
|
52
|
-
viewType = _ref2.viewType,
|
|
53
53
|
valueType = _ref2.valueType,
|
|
54
|
+
viewType = _ref2.viewType,
|
|
54
55
|
label = _ref2.label;
|
|
56
|
+
var isView = typeof props.isView === 'boolean' ? props.isView : isViewCon; // 组件可直接接收isView参数, 优先级高
|
|
55
57
|
var valueProps = {};
|
|
56
58
|
if (valueType) {
|
|
57
59
|
switch (valueType) {
|
|
@@ -13,7 +13,8 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
13
13
|
var _ahooks = require("ahooks");
|
|
14
14
|
var _antd = require("antd");
|
|
15
15
|
var _Container = _interopRequireDefault(require("../../Container"));
|
|
16
|
-
var
|
|
16
|
+
var _ProForm = _interopRequireDefault(require("../../../../ProForm"));
|
|
17
|
+
var _excluded = ["useRequest", "otherProps", "dataSource", "options"];
|
|
17
18
|
var defaultFieldNames = {
|
|
18
19
|
value: 'value',
|
|
19
20
|
label: 'label',
|
|
@@ -47,19 +48,18 @@ var findTreeTarget = function findTreeTarget(dataSource, value, fieldNames) {
|
|
|
47
48
|
var ProCascader = function ProCascader(props) {
|
|
48
49
|
var _restProps$fieldNames;
|
|
49
50
|
var requestProps = props.useRequest,
|
|
50
|
-
isView = props.isView,
|
|
51
51
|
otherProps = props.otherProps,
|
|
52
52
|
dataSource = props.dataSource,
|
|
53
53
|
options = props.options,
|
|
54
54
|
restProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
55
|
-
var _ref2 =
|
|
56
|
-
|
|
55
|
+
var _ref2 = _ProForm.default.useFieldProps() || {},
|
|
56
|
+
isViewCon = _ref2.isView;
|
|
57
|
+
var isView = typeof props.isView === 'boolean' ? props.isView : isViewCon;
|
|
57
58
|
var _useRequest = (0, _ahooks.useRequest)(requestProps === null || requestProps === void 0 ? void 0 : requestProps.service, requestProps === null || requestProps === void 0 ? void 0 : requestProps.options),
|
|
58
59
|
data = _useRequest.data;
|
|
59
|
-
var _isView = isView || formIsView;
|
|
60
60
|
var _dataSource = data || dataSource || options;
|
|
61
61
|
var _fieldNames = (_restProps$fieldNames = restProps.fieldNames) !== null && _restProps$fieldNames !== void 0 ? _restProps$fieldNames : defaultFieldNames;
|
|
62
|
-
if (
|
|
62
|
+
if (isView) {
|
|
63
63
|
var valueTarget = findTreeTarget(_dataSource, restProps.value, _fieldNames);
|
|
64
64
|
var valueName = _fieldNames.value,
|
|
65
65
|
label = _fieldNames.label;
|
|
@@ -11,6 +11,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
11
11
|
var _antd = require("antd");
|
|
12
12
|
var _ProConfigProvider = require("../../../../ProConfigProvider");
|
|
13
13
|
var _Container = _interopRequireDefault(require("../../Container"));
|
|
14
|
+
var _ProForm = _interopRequireDefault(require("../../../../ProForm"));
|
|
14
15
|
var _excluded = ["dataSource", "fieldNames", "onChange", "value", "otherProps"];
|
|
15
16
|
var Radio = function Radio(props) {
|
|
16
17
|
var dataSource = props.dataSource,
|
|
@@ -19,9 +20,10 @@ var Radio = function Radio(props) {
|
|
|
19
20
|
value = props.value,
|
|
20
21
|
otherProps = props.otherProps,
|
|
21
22
|
rest = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
22
|
-
var _ref =
|
|
23
|
-
|
|
23
|
+
var _ref = _ProForm.default.useFieldProps() || {},
|
|
24
|
+
isViewCon = _ref.isView,
|
|
24
25
|
viewEmpty = _ref.viewEmpty;
|
|
26
|
+
var isView = typeof props.isView === 'boolean' ? props.isView : isViewCon;
|
|
25
27
|
var initialConfig = (0, _ProConfigProvider.useProConfig)('Radio') || {};
|
|
26
28
|
var _fieldNames = fieldNames || initialConfig.fieldNames || {
|
|
27
29
|
label: 'label',
|