@zat-design/sisyphus-react 3.2.1 → 3.2.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 +32 -7
- package/es/ProEditTable/components/RenderField/index.js +66 -21
- package/es/ProEditTable/index.js +11 -4
- package/es/ProEditTable/propsType.d.ts +11 -1
- 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/Group/index.js +6 -3
- package/es/ProForm/components/combination/ProAddressBar/index.js +29 -30
- package/es/ProForm/components/combination/ProCombination/index.js +11 -11
- package/es/ProForm/components/combination/ProModalSelect/index.js +4 -5
- package/es/ProForm/components/combination/ProModalSelect/style/index.less +1 -1
- 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 +54 -20
- package/es/ProForm/components/render/RenderFields.d.ts +1 -0
- package/es/ProForm/components/render/RenderFields.js +12 -11
- package/es/ProForm/index.js +5 -2
- package/es/ProForm/propsType.d.ts +1 -0
- package/es/ProForm/style/index.less +49 -42
- package/es/ProForm/utils/contrastOriginal.d.ts +10 -1
- package/es/ProForm/utils/contrastOriginal.js +15 -18
- package/es/ProForm/utils/useChanged.d.ts +15 -1
- package/es/ProForm/utils/useChanged.js +27 -8
- package/es/ProLayout/components/ProHeader/index.js +1 -0
- package/es/ProLayout/components/ProHeader/style/index.less +7 -0
- package/es/ProSelect/index.js +6 -3
- package/es/ProStep/components/Item/index.js +1 -4
- package/es/ProTable/components/RenderColumn/index.js +1 -1
- package/es/ProTable/style/index.less +6 -0
- package/es/ProTabs/style/index.less +1 -1
- package/es/ProThemeTools/component/PrdTools/index.js +21 -20
- package/es/ProThemeTools/index.js +2 -1
- package/es/ProTree/components/Tree.js +43 -42
- package/es/ProTree/style/index.less +0 -6
- package/es/ProTreeSelect/index.js +3 -2
- package/es/locale/en_US.d.ts +15 -1
- package/es/locale/en_US.js +17 -3
- package/es/locale/zh_CN.d.ts +15 -1
- package/es/locale/zh_CN.js +15 -1
- package/es/style/theme/antd.less +8 -3
- package/lib/ProEditTable/components/RenderField/index.js +61 -20
- package/lib/ProEditTable/index.js +12 -4
- package/lib/ProEditTable/propsType.d.ts +11 -1
- 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 +5 -3
- 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/Group/index.js +6 -3
- package/lib/ProForm/components/combination/ProAddressBar/index.js +29 -30
- package/lib/ProForm/components/combination/ProCombination/index.js +11 -11
- package/lib/ProForm/components/combination/ProModalSelect/index.js +4 -5
- package/lib/ProForm/components/combination/ProModalSelect/style/index.less +1 -1
- 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/render/Render.js +53 -21
- package/lib/ProForm/components/render/RenderFields.d.ts +1 -0
- package/lib/ProForm/components/render/RenderFields.js +12 -11
- package/lib/ProForm/index.js +5 -2
- package/lib/ProForm/propsType.d.ts +1 -0
- package/lib/ProForm/style/index.less +49 -42
- package/lib/ProForm/utils/contrastOriginal.d.ts +10 -1
- package/lib/ProForm/utils/contrastOriginal.js +14 -17
- package/lib/ProForm/utils/useChanged.d.ts +15 -1
- package/lib/ProForm/utils/useChanged.js +27 -8
- package/lib/ProLayout/components/ProHeader/index.js +1 -0
- package/lib/ProLayout/components/ProHeader/style/index.less +7 -0
- package/lib/ProSelect/index.js +6 -3
- package/lib/ProStep/components/Item/index.js +1 -4
- package/lib/ProTable/components/RenderColumn/index.js +1 -1
- package/lib/ProTable/style/index.less +6 -0
- package/lib/ProTabs/style/index.less +1 -1
- package/lib/ProThemeTools/component/PrdTools/index.js +21 -20
- package/lib/ProThemeTools/index.js +2 -1
- package/lib/ProTree/components/Tree.js +42 -41
- package/lib/ProTree/style/index.less +0 -6
- package/lib/ProTreeSelect/index.js +3 -2
- package/lib/locale/en_US.d.ts +15 -1
- package/lib/locale/en_US.js +17 -3
- package/lib/locale/zh_CN.d.ts +15 -1
- package/lib/locale/zh_CN.js +15 -1
- package/lib/style/theme/antd.less +8 -3
- 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: 32px;
|
|
93
|
-
cursor
|
|
93
|
+
cursor: pointer;
|
|
94
94
|
|
|
95
95
|
.rotate-to-top {
|
|
96
96
|
transform: rotate(90deg);
|
|
@@ -116,24 +116,32 @@
|
|
|
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
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.ant-form-item-control-input-content > span {
|
|
142
|
+
background: @zaui-contract-bg;
|
|
143
|
+
padding: 4px 8px;
|
|
144
|
+
border-radius: 4px;
|
|
137
145
|
}
|
|
138
146
|
}
|
|
139
147
|
|
|
@@ -168,9 +176,9 @@
|
|
|
168
176
|
}
|
|
169
177
|
|
|
170
178
|
.range-right {
|
|
171
|
-
width
|
|
172
|
-
border
|
|
173
|
-
border-top-left-radius
|
|
179
|
+
width: 100%;
|
|
180
|
+
border: 1px solid @zaui-form-control-line;
|
|
181
|
+
border-top-left-radius: 0;
|
|
174
182
|
border-bottom-left-radius: 0;
|
|
175
183
|
}
|
|
176
184
|
}
|
|
@@ -182,7 +190,7 @@
|
|
|
182
190
|
}
|
|
183
191
|
|
|
184
192
|
.ant-form-item-label {
|
|
185
|
-
>label {
|
|
193
|
+
> label {
|
|
186
194
|
white-space: pre-wrap;
|
|
187
195
|
}
|
|
188
196
|
}
|
|
@@ -193,7 +201,7 @@
|
|
|
193
201
|
|
|
194
202
|
.ant-form-item-has-error {
|
|
195
203
|
.group-separator {
|
|
196
|
-
color
|
|
204
|
+
color: var(--ant-error-color);
|
|
197
205
|
border-color: var(--ant-error-color);
|
|
198
206
|
}
|
|
199
207
|
|
|
@@ -203,10 +211,9 @@
|
|
|
203
211
|
}
|
|
204
212
|
|
|
205
213
|
.site-input-group-wrapper {
|
|
206
|
-
|
|
207
214
|
// 范围值表单样式
|
|
208
215
|
& .site-input-split {
|
|
209
|
-
text-align
|
|
216
|
+
text-align: center;
|
|
210
217
|
background-color: @zaui-table-strip-bg;
|
|
211
218
|
|
|
212
219
|
&.site-input-split-disabled {
|
|
@@ -252,33 +259,33 @@
|
|
|
252
259
|
}
|
|
253
260
|
}
|
|
254
261
|
|
|
255
|
-
&.ant-input-group.ant-input-group-compact
|
|
262
|
+
&.ant-input-group.ant-input-group-compact > *:not(:last-child) {
|
|
256
263
|
margin-right: 0;
|
|
257
264
|
}
|
|
258
265
|
|
|
259
|
-
|
|
260
|
-
border-top-right-radius
|
|
266
|
+
> *:first-child {
|
|
267
|
+
border-top-right-radius: 0 !important;
|
|
261
268
|
border-bottom-right-radius: 0 !important;
|
|
262
269
|
|
|
263
|
-
|
|
264
|
-
border-top-right-radius
|
|
270
|
+
> .ant-select-selector {
|
|
271
|
+
border-top-right-radius: 0 !important;
|
|
265
272
|
border-bottom-right-radius: 0 !important;
|
|
266
273
|
}
|
|
267
274
|
}
|
|
268
275
|
|
|
269
|
-
|
|
270
|
-
border-top-left-radius
|
|
276
|
+
> *:last-child {
|
|
277
|
+
border-top-left-radius: 0 !important;
|
|
271
278
|
border-bottom-left-radius: 0 !important;
|
|
272
279
|
|
|
273
|
-
|
|
274
|
-
border-top-left-radius
|
|
280
|
+
> .ant-select-selector {
|
|
281
|
+
border-top-left-radius: 0 !important;
|
|
275
282
|
border-bottom-left-radius: 0 !important;
|
|
276
283
|
}
|
|
277
284
|
}
|
|
278
285
|
}
|
|
279
286
|
|
|
280
|
-
.ant-input-group.ant-input-group-compact
|
|
281
|
-
float
|
|
287
|
+
.ant-input-group.ant-input-group-compact > * {
|
|
288
|
+
float: none;
|
|
282
289
|
vertical-align: top;
|
|
283
290
|
}
|
|
284
291
|
|
|
@@ -287,17 +294,17 @@
|
|
|
287
294
|
}
|
|
288
295
|
|
|
289
296
|
.noDisabled {
|
|
290
|
-
color
|
|
291
|
-
font-size
|
|
297
|
+
color: @zaui-disabled-text;
|
|
298
|
+
font-size: var(--zaui-font-size, 14px);
|
|
292
299
|
background-color: transparent;
|
|
293
|
-
border
|
|
294
|
-
cursor
|
|
295
|
-
opacity
|
|
300
|
+
border: none;
|
|
301
|
+
cursor: default;
|
|
302
|
+
opacity: 1;
|
|
296
303
|
}
|
|
297
304
|
|
|
298
305
|
div.pro-form-custom-footer {
|
|
299
|
-
width
|
|
300
|
-
height
|
|
306
|
+
width: unset !important;
|
|
307
|
+
height:32px;
|
|
301
308
|
margin-bottom: calc(var(--zaui-height-size-md, 16px) * var(--zaui-size, 1));
|
|
302
309
|
|
|
303
310
|
&.pro-form-custom-footer-hidden {
|
|
@@ -306,14 +313,14 @@
|
|
|
306
313
|
}
|
|
307
314
|
|
|
308
315
|
.pro-form-view-container {
|
|
309
|
-
display
|
|
310
|
-
color
|
|
316
|
+
display: inline-block;
|
|
317
|
+
color: var(--zaui-text, #343434);
|
|
311
318
|
word-break: break-all;
|
|
312
319
|
}
|
|
313
320
|
|
|
314
321
|
.pro-form-view-container_nowrap {
|
|
315
|
-
overflow
|
|
316
|
-
white-space
|
|
322
|
+
overflow: hidden;
|
|
323
|
+
white-space: nowrap;
|
|
317
324
|
text-overflow: ellipsis;
|
|
318
325
|
}
|
|
319
326
|
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { FormInstance } from 'antd';
|
|
2
|
+
interface Params {
|
|
3
|
+
originalValues: any;
|
|
4
|
+
originalValue: any;
|
|
5
|
+
value: any;
|
|
6
|
+
form: FormInstance;
|
|
7
|
+
equalWith?: (originalValue: any, currentValue: any) => boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const contrastOriginal: (params: Params) => boolean;
|
|
10
|
+
export {};
|
|
@@ -6,29 +6,26 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.contrastOriginal = void 0;
|
|
7
7
|
var _lodash = require("lodash");
|
|
8
8
|
var nullValue = [null, undefined, '']; // 输入框空值时可能存在的三种值 视为相等
|
|
9
|
-
var contrastOriginal = exports.contrastOriginal = function contrastOriginal(
|
|
9
|
+
var contrastOriginal = exports.contrastOriginal = function contrastOriginal(params) {
|
|
10
|
+
var originalValue = params.originalValue,
|
|
11
|
+
originalValues = params.originalValues,
|
|
12
|
+
value = params.value,
|
|
13
|
+
equalWith = params.equalWith;
|
|
10
14
|
// 支持传入自定义比较事件
|
|
11
|
-
if ((0, _lodash.isFunction)(
|
|
12
|
-
|
|
13
|
-
var originVal = names.map(function (key) {
|
|
14
|
-
return (0, _lodash.get)(originValues, key);
|
|
15
|
-
});
|
|
16
|
-
return !fun(originVal, currentValue);
|
|
17
|
-
}
|
|
18
|
-
return !fun((0, _lodash.get)(originValues, name), currentValue);
|
|
15
|
+
if ((0, _lodash.isFunction)(equalWith)) {
|
|
16
|
+
return !equalWith(originalValue, value);
|
|
19
17
|
}
|
|
20
|
-
if (
|
|
21
|
-
return
|
|
22
|
-
|
|
23
|
-
if (!nullValue.includes(
|
|
24
|
-
return !(0, _lodash.isEqual)(
|
|
18
|
+
if (Array.isArray(originalValue)) {
|
|
19
|
+
return originalValue.some(function (valueItem, index) {
|
|
20
|
+
// 如果两个值有一个不是空值, 则进行深比较
|
|
21
|
+
if (!nullValue.includes(value === null || value === void 0 ? void 0 : value[index]) || !nullValue.includes(valueItem)) {
|
|
22
|
+
return !(0, _lodash.isEqual)(value === null || value === void 0 ? void 0 : value[index], valueItem);
|
|
25
23
|
}
|
|
26
24
|
return false;
|
|
27
25
|
});
|
|
28
26
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return !(0, _lodash.isEqual)(currentValue, (0, _lodash.get)(originValues, name));
|
|
27
|
+
if (!nullValue.includes(value) || !nullValue.includes(originalValue)) {
|
|
28
|
+
return !(0, _lodash.isEqual)(value, originalValue);
|
|
32
29
|
}
|
|
33
30
|
return false;
|
|
34
31
|
};
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import { FormInstance } from 'antd';
|
|
2
|
+
import { NamePath } from 'antd/lib/form/interface';
|
|
3
|
+
interface Params {
|
|
4
|
+
name?: NamePath;
|
|
5
|
+
names?: NamePath[];
|
|
6
|
+
namesStr?: NamePath;
|
|
7
|
+
originalName?: NamePath;
|
|
8
|
+
originalNames?: NamePath[];
|
|
9
|
+
originalNameStr?: NamePath;
|
|
10
|
+
originalValues: any;
|
|
11
|
+
form: FormInstance;
|
|
12
|
+
equalWith?: (originalValue: any, currentValue: any) => boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const useChanged: (params: Params) => any[];
|
|
15
|
+
export {};
|
|
@@ -7,13 +7,32 @@ exports.useChanged = void 0;
|
|
|
7
7
|
var _antd = require("antd");
|
|
8
8
|
var _lodash = require("lodash");
|
|
9
9
|
var _contrastOriginal = require("./contrastOriginal");
|
|
10
|
-
var useChanged = exports.useChanged = function useChanged(
|
|
10
|
+
var useChanged = exports.useChanged = function useChanged(params) {
|
|
11
|
+
var name = params.name,
|
|
12
|
+
names = params.names,
|
|
13
|
+
namesStr = params.namesStr,
|
|
14
|
+
_params$originalName = params.originalName,
|
|
15
|
+
originalName = _params$originalName === void 0 ? name : _params$originalName,
|
|
16
|
+
_params$originalNames = params.originalNames,
|
|
17
|
+
originalNames = _params$originalNames === void 0 ? names : _params$originalNames,
|
|
18
|
+
originalValues = params.originalValues,
|
|
19
|
+
form = params.form,
|
|
20
|
+
equalWith = params.equalWith;
|
|
11
21
|
var _form = form;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
22
|
+
var originalValue = (originalNames === null || originalNames === void 0 ? void 0 : originalNames.length) ? originalNames.map(function (originalName) {
|
|
23
|
+
return (0, _lodash.get)(originalValues, originalName);
|
|
24
|
+
}) : (0, _lodash.get)(originalValues, originalName);
|
|
25
|
+
var notWatch = !originalValues || originalValue === undefined;
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
if (notWatch) _form = [];
|
|
28
|
+
var value = _antd.Form.useWatch(namesStr || name, _form);
|
|
29
|
+
if (notWatch) return [false];
|
|
30
|
+
var changed = (0, _contrastOriginal.contrastOriginal)({
|
|
31
|
+
value: value,
|
|
32
|
+
originalValue: originalValue,
|
|
33
|
+
originalValues: originalValues,
|
|
34
|
+
form: form,
|
|
35
|
+
equalWith: equalWith
|
|
36
|
+
});
|
|
37
|
+
return [changed, originalValue];
|
|
19
38
|
};
|
|
@@ -371,6 +371,7 @@ var ProHeader = function ProHeader(props) {
|
|
|
371
371
|
'pro-header-fixed': fixedTop,
|
|
372
372
|
'pro-header-shadow': showShadow,
|
|
373
373
|
'pro-header-no-back': !backState,
|
|
374
|
+
'pro-header-has-describe': !(0, _lodash.isEmpty)(_subDescribeColumns) || !(0, _lodash.isEmpty)(describeColumns) || !(0, _lodash.isEmpty)(describeColumns),
|
|
374
375
|
'pro-header-no-describe': (0, _lodash.isEmpty)(_subDescribeColumns) && (0, _lodash.isEmpty)(describeColumns) || (0, _lodash.isEmpty)(describeColumns)
|
|
375
376
|
}, "".concat(className), className));
|
|
376
377
|
if (title && !(0, _lodash.isEmpty)(_breadcrumbColumns)) {
|
|
@@ -4,6 +4,12 @@
|
|
|
4
4
|
background-color: var(--zaui-base-bg, #ffffff);
|
|
5
5
|
padding : 24px 0 0 0;
|
|
6
6
|
|
|
7
|
+
&.pro-header-no-back.pro-header-has-describe {
|
|
8
|
+
.pro-header-top {
|
|
9
|
+
padding-left: var(--zaui-space-size-md, 16px);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
7
13
|
&.pro-header-no-back {
|
|
8
14
|
.pro-header-top {
|
|
9
15
|
padding-left: 0;
|
|
@@ -106,6 +112,7 @@
|
|
|
106
112
|
|
|
107
113
|
.ant-breadcrumb-link {
|
|
108
114
|
font-size: var(--zaui-font-size-xl, 18px);
|
|
115
|
+
display : inline-flex;
|
|
109
116
|
}
|
|
110
117
|
|
|
111
118
|
.ant-breadcrumb-separator {
|
package/lib/ProSelect/index.js
CHANGED
|
@@ -17,9 +17,10 @@ var _lodash = require("lodash");
|
|
|
17
17
|
var _ProConfigProvider = require("../ProConfigProvider");
|
|
18
18
|
var _Container = _interopRequireDefault(require("../ProForm/components/Container"));
|
|
19
19
|
var _AdaptiveTooltip = _interopRequireDefault(require("./components/AdaptiveTooltip"));
|
|
20
|
+
var _ = require("..");
|
|
20
21
|
var _locale = _interopRequireDefault(require("../locale"));
|
|
21
22
|
require("./index.less");
|
|
22
|
-
var _excluded = ["dataSource", "defaultDisableValue", "useRequest", "fieldNames", "tooltip", "otherProps", "labelInValue", "scrollFollowParent", "defaultOne", "onSearch", "optionRender", "onChange", "updateDataSource", "transformResponse"];
|
|
23
|
+
var _excluded = ["dataSource", "defaultDisableValue", "useRequest", "fieldNames", "tooltip", "otherProps", "labelInValue", "scrollFollowParent", "defaultOne", "onSearch", "optionRender", "onChange", "updateDataSource", "transformResponse", "isView"];
|
|
23
24
|
var Option = _antd.Select.Option;
|
|
24
25
|
var ProSelect = exports.ProSelect = function ProSelect(props, ref) {
|
|
25
26
|
var _locale$ProSelect;
|
|
@@ -49,11 +50,13 @@ var ProSelect = exports.ProSelect = function ProSelect(props, ref) {
|
|
|
49
50
|
onChange = props.onChange,
|
|
50
51
|
updateDataSource = props.updateDataSource,
|
|
51
52
|
transformResponse = props.transformResponse,
|
|
53
|
+
isViewPro = props.isView,
|
|
52
54
|
selectProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
53
55
|
var value = props.value;
|
|
54
|
-
var _ref2 =
|
|
55
|
-
|
|
56
|
+
var _ref2 = _.ProForm.useFieldProps() || {},
|
|
57
|
+
isViewCon = _ref2.isView,
|
|
56
58
|
viewEmpty = _ref2.viewEmpty;
|
|
59
|
+
var isView = typeof props.isView === 'boolean' ? props.isView : isViewCon; // 组件可直接接收isView参数, 优先级高
|
|
57
60
|
if (fieldNames && Object.keys(fieldNames).length) {
|
|
58
61
|
code = fieldNames.value;
|
|
59
62
|
label = fieldNames.label;
|
|
@@ -12,6 +12,7 @@ var _icons = require("@ant-design/icons");
|
|
|
12
12
|
var _antd = require("antd");
|
|
13
13
|
var _react = require("react");
|
|
14
14
|
var _index = require("../../utils/index");
|
|
15
|
+
var _locale = _interopRequireDefault(require("../../../locale"));
|
|
15
16
|
var connect = function connect(Component) {
|
|
16
17
|
var ComponentWrapper = function ComponentWrapper(props) {
|
|
17
18
|
return (0, _jsxRuntime.jsx)(Component, (0, _objectSpread2.default)({}, props));
|
|
@@ -62,8 +63,8 @@ var PrdTools = function PrdTools(_ref) {
|
|
|
62
63
|
}, []);
|
|
63
64
|
return (0, _jsxRuntime.jsxs)(NewDrawer, {
|
|
64
65
|
className: "pro-theme-prd-tools-drawer",
|
|
65
|
-
width:
|
|
66
|
-
title: "
|
|
66
|
+
width: 400,
|
|
67
|
+
title: "".concat(_locale.default.ProThemeTools.title),
|
|
67
68
|
placement: "right",
|
|
68
69
|
onClose: onClose,
|
|
69
70
|
open: visible,
|
|
@@ -77,7 +78,7 @@ var PrdTools = function PrdTools(_ref) {
|
|
|
77
78
|
}), (0, _jsxRuntime.jsxs)("div", {
|
|
78
79
|
className: "pro-theme-tools-space",
|
|
79
80
|
children: [(0, _jsxRuntime.jsx)("p", {
|
|
80
|
-
children: "
|
|
81
|
+
children: "".concat(_locale.default.ProThemeTools.themeColor)
|
|
81
82
|
}), (0, _jsxRuntime.jsx)("ul", {
|
|
82
83
|
className: "pro-theme-color",
|
|
83
84
|
children: active.map(function (item, index) {
|
|
@@ -108,7 +109,7 @@ var PrdTools = function PrdTools(_ref) {
|
|
|
108
109
|
children: [(0, _jsxRuntime.jsx)("div", {
|
|
109
110
|
className: "pro-theme-tools-item",
|
|
110
111
|
children: (0, _jsxRuntime.jsx)("p", {
|
|
111
|
-
children: "
|
|
112
|
+
children: "".concat(_locale.default.ProThemeTools.layout)
|
|
112
113
|
})
|
|
113
114
|
}), (0, _jsxRuntime.jsx)("div", {
|
|
114
115
|
className: "pro-theme-tools-item",
|
|
@@ -124,13 +125,13 @@ var PrdTools = function PrdTools(_ref) {
|
|
|
124
125
|
},
|
|
125
126
|
children: [(0, _jsxRuntime.jsx)(_antd.Radio.Button, {
|
|
126
127
|
value: 0.5,
|
|
127
|
-
children: "
|
|
128
|
+
children: "".concat(_locale.default.ProThemeTools.layoutMode[0])
|
|
128
129
|
}), (0, _jsxRuntime.jsx)(_antd.Radio.Button, {
|
|
129
130
|
value: 1,
|
|
130
|
-
children: "
|
|
131
|
+
children: "".concat(_locale.default.ProThemeTools.layoutMode[1])
|
|
131
132
|
}), (0, _jsxRuntime.jsx)(_antd.Radio.Button, {
|
|
132
133
|
value: 1.5,
|
|
133
|
-
children: "
|
|
134
|
+
children: "".concat(_locale.default.ProThemeTools.layoutMode[2])
|
|
134
135
|
})]
|
|
135
136
|
})
|
|
136
137
|
})]
|
|
@@ -139,7 +140,7 @@ var PrdTools = function PrdTools(_ref) {
|
|
|
139
140
|
children: [(0, _jsxRuntime.jsx)("div", {
|
|
140
141
|
className: "pro-theme-tools-item",
|
|
141
142
|
children: (0, _jsxRuntime.jsx)("p", {
|
|
142
|
-
children: "
|
|
143
|
+
children: "".concat(_locale.default.ProThemeTools.formLabel)
|
|
143
144
|
})
|
|
144
145
|
}), (0, _jsxRuntime.jsx)("div", {
|
|
145
146
|
className: "pro-theme-tools-item",
|
|
@@ -176,10 +177,10 @@ var PrdTools = function PrdTools(_ref) {
|
|
|
176
177
|
},
|
|
177
178
|
children: [(0, _jsxRuntime.jsx)(_antd.Radio.Button, {
|
|
178
179
|
value: "left",
|
|
179
|
-
children: "
|
|
180
|
+
children: "".concat(_locale.default.ProThemeTools.flex[0])
|
|
180
181
|
}), (0, _jsxRuntime.jsx)(_antd.Radio.Button, {
|
|
181
182
|
value: "right",
|
|
182
|
-
children: "
|
|
183
|
+
children: "".concat(_locale.default.ProThemeTools.flex[1])
|
|
183
184
|
})]
|
|
184
185
|
})
|
|
185
186
|
})]
|
|
@@ -188,13 +189,13 @@ var PrdTools = function PrdTools(_ref) {
|
|
|
188
189
|
children: [(0, _jsxRuntime.jsx)("div", {
|
|
189
190
|
className: "pro-theme-tools-item",
|
|
190
191
|
children: (0, _jsxRuntime.jsx)("p", {
|
|
191
|
-
children: "
|
|
192
|
+
children: "".concat(_locale.default.ProThemeTools.bigText)
|
|
192
193
|
})
|
|
193
194
|
}), (0, _jsxRuntime.jsx)("div", {
|
|
194
195
|
className: "pro-theme-tools-item",
|
|
195
196
|
children: (0, _jsxRuntime.jsx)(_antd.Switch, {
|
|
196
|
-
checkedChildren: "
|
|
197
|
-
unCheckedChildren: "
|
|
197
|
+
checkedChildren: "".concat(_locale.default.ProThemeTools.switchText[0]),
|
|
198
|
+
unCheckedChildren: "".concat(_locale.default.ProThemeTools.switchText[1]),
|
|
198
199
|
checked: state.zauiBigText,
|
|
199
200
|
onClick: function onClick(value) {
|
|
200
201
|
setState((0, _objectSpread2.default)((0, _objectSpread2.default)({}, state), {}, {
|
|
@@ -212,13 +213,13 @@ var PrdTools = function PrdTools(_ref) {
|
|
|
212
213
|
children: [(0, _jsxRuntime.jsx)("div", {
|
|
213
214
|
className: "pro-theme-tools-item",
|
|
214
215
|
children: (0, _jsxRuntime.jsx)("p", {
|
|
215
|
-
children: "
|
|
216
|
+
children: "".concat(_locale.default.ProThemeTools.tableBorder)
|
|
216
217
|
})
|
|
217
218
|
}), (0, _jsxRuntime.jsx)("div", {
|
|
218
219
|
className: "pro-theme-tools-item",
|
|
219
220
|
children: (0, _jsxRuntime.jsx)(_antd.Switch, {
|
|
220
|
-
checkedChildren: "
|
|
221
|
-
unCheckedChildren: "
|
|
221
|
+
checkedChildren: "".concat(_locale.default.ProThemeTools.switchText[0]),
|
|
222
|
+
unCheckedChildren: "".concat(_locale.default.ProThemeTools.switchText[1]),
|
|
222
223
|
checked: state.zauiTableBorder,
|
|
223
224
|
onClick: function onClick(value) {
|
|
224
225
|
setState((0, _objectSpread2.default)((0, _objectSpread2.default)({}, state), {}, {
|
|
@@ -235,13 +236,13 @@ var PrdTools = function PrdTools(_ref) {
|
|
|
235
236
|
children: [(0, _jsxRuntime.jsx)("div", {
|
|
236
237
|
className: "pro-theme-tools-item",
|
|
237
238
|
children: (0, _jsxRuntime.jsx)("p", {
|
|
238
|
-
children: "
|
|
239
|
+
children: "".concat(_locale.default.ProThemeTools.tableStripe)
|
|
239
240
|
})
|
|
240
241
|
}), (0, _jsxRuntime.jsx)("div", {
|
|
241
242
|
className: "pro-theme-tools-item",
|
|
242
243
|
children: (0, _jsxRuntime.jsx)(_antd.Switch, {
|
|
243
|
-
checkedChildren: "
|
|
244
|
-
unCheckedChildren: "
|
|
244
|
+
checkedChildren: "".concat(_locale.default.ProThemeTools.switchText[0]),
|
|
245
|
+
unCheckedChildren: "".concat(_locale.default.ProThemeTools.switchText[1]),
|
|
245
246
|
checked: state.zauiStripe,
|
|
246
247
|
onClick: function onClick(value) {
|
|
247
248
|
setState((0, _objectSpread2.default)((0, _objectSpread2.default)({}, state), {}, {
|
|
@@ -272,7 +273,7 @@ var PrdTools = function PrdTools(_ref) {
|
|
|
272
273
|
}]);
|
|
273
274
|
onReset();
|
|
274
275
|
},
|
|
275
|
-
children: "
|
|
276
|
+
children: "".concat(_locale.default.ProThemeTools.reset)
|
|
276
277
|
})]
|
|
277
278
|
});
|
|
278
279
|
};
|
|
@@ -16,6 +16,7 @@ var _react = require("react");
|
|
|
16
16
|
var _classnames2 = _interopRequireDefault(require("classnames"));
|
|
17
17
|
var _index = require("./utils/index");
|
|
18
18
|
var _component = require("./component");
|
|
19
|
+
var _locale = _interopRequireDefault(require("../locale"));
|
|
19
20
|
var _excluded = ["size", "className", "cacheTime", "color", "mode", "iconFollowTheme", "tableBorder", "tableStripe", "theme"];
|
|
20
21
|
/* eslint-disable prefer-const */
|
|
21
22
|
var defaultCacheTime = 1; // 配置保存时间为一天
|
|
@@ -93,7 +94,7 @@ var ProThemeTools = function ProThemeTools(_ref) {
|
|
|
93
94
|
input.select();
|
|
94
95
|
if (document.execCommand('copy')) {
|
|
95
96
|
document.execCommand('copy');
|
|
96
|
-
_antd.message.success(
|
|
97
|
+
_antd.message.success("".concat(_locale.default.ProThemeTools.copySuccess));
|
|
97
98
|
}
|
|
98
99
|
document.body.removeChild(input);
|
|
99
100
|
};
|