@zat-design/sisyphus-react 3.4.6-beta.13 → 3.4.6-beta.14
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 +9 -1
- package/dist/less.esm.css +9 -1
- package/es/ProEditTable/style/index.less +4 -1
- package/es/ProForm/components/base/TextArea/index.d.ts +1 -0
- package/es/ProForm/components/base/TextArea/index.js +4 -2
- package/es/ProForm/components/combination/Group/index.js +0 -1
- package/es/ProForm/components/combination/ProModalSelect/index.js +35 -29
- package/es/ProForm/style/index.less +7 -0
- package/es/ProForm/utils/diffOriginal.js +2 -1
- package/es/ProForm/utils/useListChanged.js +2 -2
- package/es/ProStep/index.js +5 -7
- package/es/global.less +40 -22
- package/es/locale/zh_CN.js +1 -1
- package/lib/ProEditTable/style/index.less +4 -1
- package/lib/ProForm/components/base/TextArea/index.d.ts +1 -0
- package/lib/ProForm/components/base/TextArea/index.js +4 -2
- package/lib/ProForm/components/combination/Group/index.js +0 -1
- package/lib/ProForm/components/combination/ProModalSelect/index.js +35 -29
- package/lib/ProForm/style/index.less +7 -0
- package/lib/ProForm/utils/diffOriginal.js +2 -1
- package/lib/ProForm/utils/useListChanged.js +1 -1
- package/lib/ProStep/index.js +5 -7
- package/lib/global.less +40 -22
- package/lib/locale/zh_CN.js +1 -1
- package/package.json +1 -1
package/dist/index.esm.css
CHANGED
|
@@ -2792,6 +2792,11 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
2792
2792
|
background: var(--zaui-contract-bg, #fffaa1);
|
|
2793
2793
|
border-radius: 4px;
|
|
2794
2794
|
}
|
|
2795
|
+
.pro-form .ant-form-item.pro-form-item-changed .ant-form-item-control-input-content > span {
|
|
2796
|
+
border-radius: 4px;
|
|
2797
|
+
padding: 5px 8px;
|
|
2798
|
+
background: var(--zaui-contract-bg, #fffaa1);
|
|
2799
|
+
}
|
|
2795
2800
|
.pro-form .ant-form-item.pro-form-item-changed .ant-form-item-control-input-content > .pro-address .ant-select-selector,
|
|
2796
2801
|
.pro-form .ant-form-item.pro-form-item-changed .ant-form-item-control-input-content > .pro-address .ant-input-affix-wrapper,
|
|
2797
2802
|
.pro-form .ant-form-item.pro-form-item-changed .ant-form-item-control-input-content > .pro-address .ant-input-disabled {
|
|
@@ -4146,6 +4151,9 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
4146
4151
|
-webkit-box-shadow: 3px 2px 12px 0px var(--zaui-shadow, rgba(56, 56, 56, 0.15));
|
|
4147
4152
|
box-shadow: 3px 2px 12px 0px var(--zaui-shadow, rgba(56, 56, 56, 0.15));
|
|
4148
4153
|
}
|
|
4154
|
+
.pro-edit-table td[rowspan] {
|
|
4155
|
+
vertical-align: middle !important;
|
|
4156
|
+
}
|
|
4149
4157
|
.pro-edit-table .pro-edit-table-tooltip {
|
|
4150
4158
|
display: -webkit-inline-box;
|
|
4151
4159
|
display: -webkit-inline-flex;
|
|
@@ -4212,7 +4220,7 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
4212
4220
|
display: -ms-flexbox;
|
|
4213
4221
|
display: flex;
|
|
4214
4222
|
}
|
|
4215
|
-
.pro-edit-table .drag-wrapper .
|
|
4223
|
+
.pro-edit-table .drag-wrapper .anticon {
|
|
4216
4224
|
margin-right: var(--zaui-space-size-md, 16px);
|
|
4217
4225
|
margin-left: var(--zaui-space-size-xs, 4px);
|
|
4218
4226
|
cursor: pointer;
|
package/dist/less.esm.css
CHANGED
|
@@ -2792,6 +2792,11 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
2792
2792
|
background: var(--zaui-contract-bg, #fffaa1);
|
|
2793
2793
|
border-radius: 4px;
|
|
2794
2794
|
}
|
|
2795
|
+
.pro-form .ant-form-item.pro-form-item-changed .ant-form-item-control-input-content > span {
|
|
2796
|
+
border-radius: 4px;
|
|
2797
|
+
padding: 5px 8px;
|
|
2798
|
+
background: var(--zaui-contract-bg, #fffaa1);
|
|
2799
|
+
}
|
|
2795
2800
|
.pro-form .ant-form-item.pro-form-item-changed .ant-form-item-control-input-content > .pro-address .ant-select-selector,
|
|
2796
2801
|
.pro-form .ant-form-item.pro-form-item-changed .ant-form-item-control-input-content > .pro-address .ant-input-affix-wrapper,
|
|
2797
2802
|
.pro-form .ant-form-item.pro-form-item-changed .ant-form-item-control-input-content > .pro-address .ant-input-disabled {
|
|
@@ -4146,6 +4151,9 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
4146
4151
|
-webkit-box-shadow: 3px 2px 12px 0px var(--zaui-shadow, rgba(56, 56, 56, 0.15));
|
|
4147
4152
|
box-shadow: 3px 2px 12px 0px var(--zaui-shadow, rgba(56, 56, 56, 0.15));
|
|
4148
4153
|
}
|
|
4154
|
+
.pro-edit-table td[rowspan] {
|
|
4155
|
+
vertical-align: middle !important;
|
|
4156
|
+
}
|
|
4149
4157
|
.pro-edit-table .pro-edit-table-tooltip {
|
|
4150
4158
|
display: -webkit-inline-box;
|
|
4151
4159
|
display: -webkit-inline-flex;
|
|
@@ -4212,7 +4220,7 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
4212
4220
|
display: -ms-flexbox;
|
|
4213
4221
|
display: flex;
|
|
4214
4222
|
}
|
|
4215
|
-
.pro-edit-table .drag-wrapper .
|
|
4223
|
+
.pro-edit-table .drag-wrapper .anticon {
|
|
4216
4224
|
margin-right: var(--zaui-space-size-md, 16px);
|
|
4217
4225
|
margin-left: var(--zaui-space-size-xs, 4px);
|
|
4218
4226
|
cursor: pointer;
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
@import (reference) '~antd/es/style/themes/index.less';
|
|
3
3
|
|
|
4
4
|
.pro-edit-table {
|
|
5
|
+
td[rowspan]{
|
|
6
|
+
vertical-align: middle !important;
|
|
7
|
+
}
|
|
5
8
|
.pro-edit-table-tooltip {
|
|
6
9
|
display : inline-flex;
|
|
7
10
|
align-items: center;
|
|
@@ -62,7 +65,7 @@
|
|
|
62
65
|
|
|
63
66
|
.drag-wrapper {
|
|
64
67
|
display: flex;
|
|
65
|
-
.
|
|
68
|
+
.anticon {
|
|
66
69
|
margin-right: var(--zaui-space-size-md, 16px);
|
|
67
70
|
margin-left: var(--zaui-space-size-xs, 4px);
|
|
68
71
|
cursor: pointer;
|
|
@@ -3,7 +3,7 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
4
|
import "antd/es/input/style";
|
|
5
5
|
import _Input from "antd/es/input";
|
|
6
|
-
var _excluded = ["placeholder", "otherProps", "className"];
|
|
6
|
+
var _excluded = ["placeholder", "otherProps", "className", "tooltip"];
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
import { omit } from 'lodash';
|
|
9
9
|
import classnames from 'classnames';
|
|
@@ -17,6 +17,8 @@ var TextAreaDef = function TextAreaDef(props) {
|
|
|
17
17
|
var placeholder = props.placeholder,
|
|
18
18
|
otherProps = props.otherProps,
|
|
19
19
|
className = props.className,
|
|
20
|
+
_props$tooltip = props.tooltip,
|
|
21
|
+
tooltip = _props$tooltip === void 0 ? true : _props$tooltip,
|
|
20
22
|
rest = _objectWithoutProperties(props, _excluded);
|
|
21
23
|
var _ref = ProForm.useFieldProps() || {},
|
|
22
24
|
label = _ref.label,
|
|
@@ -27,7 +29,7 @@ var TextAreaDef = function TextAreaDef(props) {
|
|
|
27
29
|
if (isView) {
|
|
28
30
|
return _jsx(Container, {
|
|
29
31
|
nowrap: false,
|
|
30
|
-
tooltip:
|
|
32
|
+
tooltip: tooltip,
|
|
31
33
|
viewEmpty: viewEmpty,
|
|
32
34
|
children: rest.value
|
|
33
35
|
});
|
|
@@ -17,7 +17,6 @@ import ComRender from './component/ComRender';
|
|
|
17
17
|
* render内部能力 show, component, value, onChange, disabled, clearNotShow, fieldProps
|
|
18
18
|
*/
|
|
19
19
|
var GroupCopy = function GroupCopy(props) {
|
|
20
|
-
console.log('🚀 ~~> props:', props);
|
|
21
20
|
var children = props.children,
|
|
22
21
|
className = props.className,
|
|
23
22
|
_props$space = props.space,
|
|
@@ -295,58 +295,64 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
295
295
|
};
|
|
296
296
|
var handleFinish = /*#__PURE__*/function () {
|
|
297
297
|
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
298
|
-
var
|
|
298
|
+
var _nextSelectedRows, _nextSelectedRows2, nextSelectedRows, record, flag, res;
|
|
299
299
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
300
300
|
while (1) switch (_context2.prev = _context2.next) {
|
|
301
301
|
case 0:
|
|
302
302
|
_context2.prev = 0;
|
|
303
|
-
if (
|
|
303
|
+
if (selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length) {
|
|
304
304
|
_context2.next = 4;
|
|
305
305
|
break;
|
|
306
306
|
}
|
|
307
307
|
_message.error(locale.ProModalSelect.checkMsg);
|
|
308
308
|
return _context2.abrupt("return", false);
|
|
309
309
|
case 4:
|
|
310
|
-
|
|
310
|
+
nextSelectedRows = selectedRows;
|
|
311
|
+
if (!((_nextSelectedRows = nextSelectedRows) === null || _nextSelectedRows === void 0 ? void 0 : _nextSelectedRows[0])) {
|
|
312
|
+
nextSelectedRows = data.filter(function (item) {
|
|
313
|
+
return selectedRowKeys.includes(item[valueKey]);
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
record = isMultiple ? nextSelectedRows : (_nextSelectedRows2 = nextSelectedRows) === null || _nextSelectedRows2 === void 0 ? void 0 : _nextSelectedRows2[0];
|
|
311
317
|
if (!isMultiple) {
|
|
312
318
|
// @ts-ignore
|
|
313
|
-
|
|
319
|
+
record.value = record[valueKey];
|
|
314
320
|
// @ts-ignore
|
|
315
|
-
|
|
321
|
+
record.label = record[labelKey];
|
|
316
322
|
}
|
|
317
323
|
flag = true;
|
|
318
324
|
if (!onOk) {
|
|
319
|
-
_context2.next =
|
|
325
|
+
_context2.next = 14;
|
|
320
326
|
break;
|
|
321
327
|
}
|
|
322
|
-
_context2.next =
|
|
323
|
-
return onOk(
|
|
324
|
-
case
|
|
328
|
+
_context2.next = 12;
|
|
329
|
+
return onOk(record);
|
|
330
|
+
case 12:
|
|
325
331
|
res = _context2.sent;
|
|
326
332
|
if (res !== null && res !== undefined) {
|
|
327
333
|
// @ts-ignore
|
|
328
334
|
flag = res;
|
|
329
335
|
}
|
|
330
|
-
case
|
|
336
|
+
case 14:
|
|
331
337
|
if (flag) {
|
|
332
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(labelInValue ?
|
|
338
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(labelInValue ? record : getNextValues(record), record);
|
|
333
339
|
// 更新内部展示值
|
|
334
340
|
setState({
|
|
335
|
-
_value:
|
|
336
|
-
options: isArray(
|
|
341
|
+
_value: record,
|
|
342
|
+
options: isArray(record) ? record : [record]
|
|
337
343
|
});
|
|
338
344
|
handleClose();
|
|
339
345
|
}
|
|
340
346
|
return _context2.abrupt("return", flag);
|
|
341
|
-
case
|
|
342
|
-
_context2.prev =
|
|
347
|
+
case 18:
|
|
348
|
+
_context2.prev = 18;
|
|
343
349
|
_context2.t0 = _context2["catch"](0);
|
|
344
350
|
console.warn('error', _context2.t0);
|
|
345
|
-
case
|
|
351
|
+
case 21:
|
|
346
352
|
case "end":
|
|
347
353
|
return _context2.stop();
|
|
348
354
|
}
|
|
349
|
-
}, _callee2, null, [[0,
|
|
355
|
+
}, _callee2, null, [[0, 18]]);
|
|
350
356
|
}));
|
|
351
357
|
return function handleFinish() {
|
|
352
358
|
return _ref7.apply(this, arguments);
|
|
@@ -427,7 +433,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
427
433
|
// 初始化回显,当传入initParams时,前端用来回险
|
|
428
434
|
var getInitValues = /*#__PURE__*/function () {
|
|
429
435
|
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
430
|
-
var _contentForm$getField, _useRequest$options2, _useRequest$options3, queryBean, page, params, res, _list, list, _res$data2,
|
|
436
|
+
var _contentForm$getField, _useRequest$options2, _useRequest$options3, queryBean, page, params, res, _list, list, _res$data2, _data, nextSelectRowKeys;
|
|
431
437
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
432
438
|
while (1) switch (_context4.prev = _context4.next) {
|
|
433
439
|
case 0:
|
|
@@ -458,15 +464,15 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
458
464
|
} else {
|
|
459
465
|
list = withPagination ? res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.list : res === null || res === void 0 ? void 0 : res.data;
|
|
460
466
|
}
|
|
461
|
-
|
|
462
|
-
if (
|
|
467
|
+
_data = isMultiple ? list : (_list = list) === null || _list === void 0 ? void 0 : _list[0];
|
|
468
|
+
if (_data) {
|
|
463
469
|
nextSelectRowKeys = isMultiple ? value : [value];
|
|
464
470
|
if (labelInValue) {
|
|
465
|
-
onChange(
|
|
471
|
+
onChange(_data);
|
|
466
472
|
}
|
|
467
473
|
// 更新内部展示值
|
|
468
474
|
setState({
|
|
469
|
-
_value:
|
|
475
|
+
_value: _data,
|
|
470
476
|
isInit: false,
|
|
471
477
|
selectedRows: list,
|
|
472
478
|
selectedRowKeys: nextSelectRowKeys
|
|
@@ -493,7 +499,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
493
499
|
var getDefaultOneValues = /*#__PURE__*/function () {
|
|
494
500
|
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
495
501
|
var _useRequest$options4, _useRequest$options5;
|
|
496
|
-
var queryBean, page, params, res, _list2, list, _res$data3,
|
|
502
|
+
var queryBean, page, params, res, _list2, list, _res$data3, _data2, nextSelectRowKeys;
|
|
497
503
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
498
504
|
while (1) switch (_context5.prev = _context5.next) {
|
|
499
505
|
case 0:
|
|
@@ -517,18 +523,18 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
517
523
|
} else {
|
|
518
524
|
list = withPagination ? res === null || res === void 0 ? void 0 : (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.list : res === null || res === void 0 ? void 0 : res.data;
|
|
519
525
|
}
|
|
520
|
-
|
|
526
|
+
_data2 = isMultiple ? list : (_list2 = list) === null || _list2 === void 0 ? void 0 : _list2[0];
|
|
521
527
|
nextSelectRowKeys = isMultiple ? value : [value];
|
|
522
528
|
if (labelInValue) {
|
|
523
|
-
onChange(
|
|
529
|
+
onChange(_data2);
|
|
524
530
|
} else {
|
|
525
|
-
onChange(isMultiple ?
|
|
531
|
+
onChange(isMultiple ? _data2.map(function (item) {
|
|
526
532
|
return item[valueKey];
|
|
527
|
-
}) :
|
|
533
|
+
}) : _data2[valueKey]);
|
|
528
534
|
}
|
|
529
535
|
// 更新内部展示值
|
|
530
536
|
setState({
|
|
531
|
-
_value:
|
|
537
|
+
_value: _data2,
|
|
532
538
|
isInit: false,
|
|
533
539
|
selectedRows: list,
|
|
534
540
|
selectedRowKeys: nextSelectRowKeys
|
|
@@ -597,8 +603,8 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
597
603
|
nextState.selectedRows = value;
|
|
598
604
|
}
|
|
599
605
|
} else if (value) {
|
|
606
|
+
console.log('value', value);
|
|
600
607
|
nextState.selectedRowKeys = [value];
|
|
601
|
-
nextState.selectedRows = [_defineProperty({}, valueKey, value[valueKey])];
|
|
602
608
|
}
|
|
603
609
|
setState(nextState);
|
|
604
610
|
}
|
|
@@ -140,6 +140,13 @@
|
|
|
140
140
|
|
|
141
141
|
// 地址组件
|
|
142
142
|
.@{ant-prefix}-form-item-control-input-content {
|
|
143
|
+
// 查看模式
|
|
144
|
+
& > span {
|
|
145
|
+
border-radius: 4px;
|
|
146
|
+
padding: 5px 8px;
|
|
147
|
+
background: @zaui-contract-bg;
|
|
148
|
+
}
|
|
149
|
+
|
|
143
150
|
& > .pro-address {
|
|
144
151
|
.@{ant-prefix}-select-selector,
|
|
145
152
|
.@{ant-prefix}-input-affix-wrapper,
|
|
@@ -40,7 +40,8 @@ export var diffOriginal = function diffOriginal(params) {
|
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
if (!nullValue.includes(value) || !nullValue.includes(originalValue)) {
|
|
43
|
-
|
|
43
|
+
var res = !isEqual(value, originalValue);
|
|
44
|
+
return res;
|
|
44
45
|
}
|
|
45
46
|
return false;
|
|
46
47
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "antd/es/form/style";
|
|
2
2
|
import _Form from "antd/es/form";
|
|
3
|
-
import { get } from 'lodash';
|
|
3
|
+
import { get, isString } from 'lodash';
|
|
4
4
|
import { diffOriginal } from './diffOriginal';
|
|
5
5
|
var toNamePath = function toNamePath(name) {
|
|
6
6
|
if (Array.isArray(name)) {
|
|
@@ -87,7 +87,7 @@ export var useListChanged = function useListChanged(params) {
|
|
|
87
87
|
originalValue: originalValue,
|
|
88
88
|
form: form,
|
|
89
89
|
equalWith: equalWith,
|
|
90
|
-
name: namesStr || name
|
|
90
|
+
name: isString(namesStr) ? namesStr : originalName || name
|
|
91
91
|
});
|
|
92
92
|
return [changed, originalValue];
|
|
93
93
|
};
|
package/es/ProStep/index.js
CHANGED
|
@@ -103,19 +103,17 @@ var ProStep = function ProStep(_ref) {
|
|
|
103
103
|
case 10:
|
|
104
104
|
values[id] = _context.sent;
|
|
105
105
|
case 11:
|
|
106
|
-
_context.next =
|
|
106
|
+
_context.next = 18;
|
|
107
107
|
break;
|
|
108
108
|
case 13:
|
|
109
109
|
_context.prev = 13;
|
|
110
110
|
_context.t0 = _context["catch"](1);
|
|
111
111
|
num = _context.t0 === null || _context.t0 === void 0 ? void 0 : (_errors$errorFields = _context.t0.errorFields) === null || _errors$errorFields === void 0 ? void 0 : _errors$errorFields.length;
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
console.error(_context.t0);
|
|
115
|
-
}
|
|
116
|
-
case 17:
|
|
117
|
-
setErrorCollection(_defineProperty({}, id, num));
|
|
112
|
+
setLocalData(false);
|
|
113
|
+
console.error(_context.t0);
|
|
118
114
|
case 18:
|
|
115
|
+
setErrorCollection(_defineProperty({}, id, num));
|
|
116
|
+
case 19:
|
|
119
117
|
case "end":
|
|
120
118
|
return _context.stop();
|
|
121
119
|
}
|
package/es/global.less
CHANGED
|
@@ -9,30 +9,48 @@ pre {
|
|
|
9
9
|
scrollbar-face-color: #d2d3d7;
|
|
10
10
|
scrollbar-highlight-color: #979797;
|
|
11
11
|
scrollbar-3dlight-color: #979797;
|
|
12
|
-
}
|
|
13
12
|
|
|
14
|
-
::-webkit-scrollbar {
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
::-webkit-scrollbar {
|
|
14
|
+
width: 16px;
|
|
15
|
+
background: transparent;
|
|
16
|
+
}
|
|
17
17
|
|
|
18
|
-
//
|
|
19
|
-
::-webkit-scrollbar-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
border-style: dashed;
|
|
24
|
-
border-width: 4px;
|
|
25
|
-
border-radius: 10px;
|
|
26
|
-
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0);
|
|
27
|
-
}
|
|
18
|
+
// 轨道
|
|
19
|
+
::-webkit-scrollbar-track {
|
|
20
|
+
background-color: #fff;
|
|
21
|
+
border-radius: 10px;
|
|
22
|
+
}
|
|
28
23
|
|
|
29
|
-
//
|
|
30
|
-
::-webkit-scrollbar-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
// 悬浮轨道
|
|
25
|
+
::-webkit-scrollbar-thumb:hover {
|
|
26
|
+
background-color: #979797;
|
|
27
|
+
background-clip: padding-box;
|
|
28
|
+
border-color: transparent;
|
|
29
|
+
border-style: dashed;
|
|
30
|
+
border-width: 4px;
|
|
31
|
+
border-radius: 10px;
|
|
32
|
+
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:hover::-webkit-scrollbar-track {
|
|
36
|
+
background: transparent;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:hover::-webkit-scrollbar-thumb {
|
|
40
|
+
background-color: #d2d3d7;
|
|
41
|
+
background-clip: padding-box;
|
|
42
|
+
border-color: transparent;
|
|
43
|
+
border-style: dashed;
|
|
44
|
+
border-width: 4px;
|
|
45
|
+
border-radius: 10px;
|
|
46
|
+
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
:hover::-webkit-scrollbar-thumb:hover {
|
|
50
|
+
background-color: #979797;
|
|
51
|
+
}
|
|
34
52
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
53
|
+
:hover::-webkit-scrollbar-track {
|
|
54
|
+
background-color: #fff;
|
|
55
|
+
}
|
|
38
56
|
}
|
package/es/locale/zh_CN.js
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
@import (reference) '~antd/es/style/themes/index.less';
|
|
3
3
|
|
|
4
4
|
.pro-edit-table {
|
|
5
|
+
td[rowspan]{
|
|
6
|
+
vertical-align: middle !important;
|
|
7
|
+
}
|
|
5
8
|
.pro-edit-table-tooltip {
|
|
6
9
|
display : inline-flex;
|
|
7
10
|
align-items: center;
|
|
@@ -62,7 +65,7 @@
|
|
|
62
65
|
|
|
63
66
|
.drag-wrapper {
|
|
64
67
|
display: flex;
|
|
65
|
-
.
|
|
68
|
+
.anticon {
|
|
66
69
|
margin-right: var(--zaui-space-size-md, 16px);
|
|
67
70
|
margin-left: var(--zaui-space-size-xs, 4px);
|
|
68
71
|
cursor: pointer;
|
|
@@ -17,12 +17,14 @@ var _locale = _interopRequireDefault(require("../../../../locale"));
|
|
|
17
17
|
var _ProForm = _interopRequireDefault(require("../../../../ProForm"));
|
|
18
18
|
var _Container = _interopRequireDefault(require("../../Container"));
|
|
19
19
|
require("./index.less");
|
|
20
|
-
var _excluded = ["placeholder", "otherProps", "className"];
|
|
20
|
+
var _excluded = ["placeholder", "otherProps", "className", "tooltip"];
|
|
21
21
|
var TextArea = _antd.Input.TextArea;
|
|
22
22
|
var TextAreaDef = function TextAreaDef(props) {
|
|
23
23
|
var placeholder = props.placeholder,
|
|
24
24
|
otherProps = props.otherProps,
|
|
25
25
|
className = props.className,
|
|
26
|
+
_props$tooltip = props.tooltip,
|
|
27
|
+
tooltip = _props$tooltip === void 0 ? true : _props$tooltip,
|
|
26
28
|
rest = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
27
29
|
var _ref = _ProForm.default.useFieldProps() || {},
|
|
28
30
|
label = _ref.label,
|
|
@@ -33,7 +35,7 @@ var TextAreaDef = function TextAreaDef(props) {
|
|
|
33
35
|
if (isView) {
|
|
34
36
|
return (0, _jsxRuntime.jsx)(_Container.default, {
|
|
35
37
|
nowrap: false,
|
|
36
|
-
tooltip:
|
|
38
|
+
tooltip: tooltip,
|
|
37
39
|
viewEmpty: viewEmpty,
|
|
38
40
|
children: rest.value
|
|
39
41
|
});
|
|
@@ -24,7 +24,6 @@ var _ComRender = _interopRequireDefault(require("./component/ComRender"));
|
|
|
24
24
|
* render内部能力 show, component, value, onChange, disabled, clearNotShow, fieldProps
|
|
25
25
|
*/
|
|
26
26
|
var GroupCopy = function GroupCopy(props) {
|
|
27
|
-
console.log('🚀 ~~> props:', props);
|
|
28
27
|
var children = props.children,
|
|
29
28
|
className = props.className,
|
|
30
29
|
_props$space = props.space,
|
|
@@ -292,58 +292,64 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
292
292
|
};
|
|
293
293
|
var handleFinish = /*#__PURE__*/function () {
|
|
294
294
|
var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee2() {
|
|
295
|
-
var
|
|
295
|
+
var _nextSelectedRows, _nextSelectedRows2, nextSelectedRows, record, flag, res;
|
|
296
296
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee2$(_context2) {
|
|
297
297
|
while (1) switch (_context2.prev = _context2.next) {
|
|
298
298
|
case 0:
|
|
299
299
|
_context2.prev = 0;
|
|
300
|
-
if (
|
|
300
|
+
if (selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length) {
|
|
301
301
|
_context2.next = 4;
|
|
302
302
|
break;
|
|
303
303
|
}
|
|
304
304
|
_antd.message.error(_locale.default.ProModalSelect.checkMsg);
|
|
305
305
|
return _context2.abrupt("return", false);
|
|
306
306
|
case 4:
|
|
307
|
-
|
|
307
|
+
nextSelectedRows = selectedRows;
|
|
308
|
+
if (!((_nextSelectedRows = nextSelectedRows) === null || _nextSelectedRows === void 0 ? void 0 : _nextSelectedRows[0])) {
|
|
309
|
+
nextSelectedRows = data.filter(function (item) {
|
|
310
|
+
return selectedRowKeys.includes(item[valueKey]);
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
record = isMultiple ? nextSelectedRows : (_nextSelectedRows2 = nextSelectedRows) === null || _nextSelectedRows2 === void 0 ? void 0 : _nextSelectedRows2[0];
|
|
308
314
|
if (!isMultiple) {
|
|
309
315
|
// @ts-ignore
|
|
310
|
-
|
|
316
|
+
record.value = record[valueKey];
|
|
311
317
|
// @ts-ignore
|
|
312
|
-
|
|
318
|
+
record.label = record[labelKey];
|
|
313
319
|
}
|
|
314
320
|
flag = true;
|
|
315
321
|
if (!onOk) {
|
|
316
|
-
_context2.next =
|
|
322
|
+
_context2.next = 14;
|
|
317
323
|
break;
|
|
318
324
|
}
|
|
319
|
-
_context2.next =
|
|
320
|
-
return onOk(
|
|
321
|
-
case
|
|
325
|
+
_context2.next = 12;
|
|
326
|
+
return onOk(record);
|
|
327
|
+
case 12:
|
|
322
328
|
res = _context2.sent;
|
|
323
329
|
if (res !== null && res !== undefined) {
|
|
324
330
|
// @ts-ignore
|
|
325
331
|
flag = res;
|
|
326
332
|
}
|
|
327
|
-
case
|
|
333
|
+
case 14:
|
|
328
334
|
if (flag) {
|
|
329
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(labelInValue ?
|
|
335
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(labelInValue ? record : getNextValues(record), record);
|
|
330
336
|
// 更新内部展示值
|
|
331
337
|
setState({
|
|
332
|
-
_value:
|
|
333
|
-
options: (0, _lodash.isArray)(
|
|
338
|
+
_value: record,
|
|
339
|
+
options: (0, _lodash.isArray)(record) ? record : [record]
|
|
334
340
|
});
|
|
335
341
|
handleClose();
|
|
336
342
|
}
|
|
337
343
|
return _context2.abrupt("return", flag);
|
|
338
|
-
case
|
|
339
|
-
_context2.prev =
|
|
344
|
+
case 18:
|
|
345
|
+
_context2.prev = 18;
|
|
340
346
|
_context2.t0 = _context2["catch"](0);
|
|
341
347
|
console.warn('error', _context2.t0);
|
|
342
|
-
case
|
|
348
|
+
case 21:
|
|
343
349
|
case "end":
|
|
344
350
|
return _context2.stop();
|
|
345
351
|
}
|
|
346
|
-
}, _callee2, null, [[0,
|
|
352
|
+
}, _callee2, null, [[0, 18]]);
|
|
347
353
|
}));
|
|
348
354
|
return function handleFinish() {
|
|
349
355
|
return _ref7.apply(this, arguments);
|
|
@@ -424,7 +430,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
424
430
|
// 初始化回显,当传入initParams时,前端用来回险
|
|
425
431
|
var getInitValues = /*#__PURE__*/function () {
|
|
426
432
|
var _ref9 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee4() {
|
|
427
|
-
var _contentForm$getField, _useRequest$options2, _useRequest$options3, queryBean, page, params, res, _list, list, _res$data2,
|
|
433
|
+
var _contentForm$getField, _useRequest$options2, _useRequest$options3, queryBean, page, params, res, _list, list, _res$data2, _data, nextSelectRowKeys;
|
|
428
434
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee4$(_context4) {
|
|
429
435
|
while (1) switch (_context4.prev = _context4.next) {
|
|
430
436
|
case 0:
|
|
@@ -455,15 +461,15 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
455
461
|
} else {
|
|
456
462
|
list = withPagination ? res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.list : res === null || res === void 0 ? void 0 : res.data;
|
|
457
463
|
}
|
|
458
|
-
|
|
459
|
-
if (
|
|
464
|
+
_data = isMultiple ? list : (_list = list) === null || _list === void 0 ? void 0 : _list[0];
|
|
465
|
+
if (_data) {
|
|
460
466
|
nextSelectRowKeys = isMultiple ? value : [value];
|
|
461
467
|
if (labelInValue) {
|
|
462
|
-
onChange(
|
|
468
|
+
onChange(_data);
|
|
463
469
|
}
|
|
464
470
|
// 更新内部展示值
|
|
465
471
|
setState({
|
|
466
|
-
_value:
|
|
472
|
+
_value: _data,
|
|
467
473
|
isInit: false,
|
|
468
474
|
selectedRows: list,
|
|
469
475
|
selectedRowKeys: nextSelectRowKeys
|
|
@@ -490,7 +496,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
490
496
|
var getDefaultOneValues = /*#__PURE__*/function () {
|
|
491
497
|
var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee5() {
|
|
492
498
|
var _useRequest$options4, _useRequest$options5;
|
|
493
|
-
var queryBean, page, params, res, _list2, list, _res$data3,
|
|
499
|
+
var queryBean, page, params, res, _list2, list, _res$data3, _data2, nextSelectRowKeys;
|
|
494
500
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee5$(_context5) {
|
|
495
501
|
while (1) switch (_context5.prev = _context5.next) {
|
|
496
502
|
case 0:
|
|
@@ -514,18 +520,18 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
514
520
|
} else {
|
|
515
521
|
list = withPagination ? res === null || res === void 0 ? void 0 : (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.list : res === null || res === void 0 ? void 0 : res.data;
|
|
516
522
|
}
|
|
517
|
-
|
|
523
|
+
_data2 = isMultiple ? list : (_list2 = list) === null || _list2 === void 0 ? void 0 : _list2[0];
|
|
518
524
|
nextSelectRowKeys = isMultiple ? value : [value];
|
|
519
525
|
if (labelInValue) {
|
|
520
|
-
onChange(
|
|
526
|
+
onChange(_data2);
|
|
521
527
|
} else {
|
|
522
|
-
onChange(isMultiple ?
|
|
528
|
+
onChange(isMultiple ? _data2.map(function (item) {
|
|
523
529
|
return item[valueKey];
|
|
524
|
-
}) :
|
|
530
|
+
}) : _data2[valueKey]);
|
|
525
531
|
}
|
|
526
532
|
// 更新内部展示值
|
|
527
533
|
setState({
|
|
528
|
-
_value:
|
|
534
|
+
_value: _data2,
|
|
529
535
|
isInit: false,
|
|
530
536
|
selectedRows: list,
|
|
531
537
|
selectedRowKeys: nextSelectRowKeys
|
|
@@ -594,8 +600,8 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
594
600
|
nextState.selectedRows = value;
|
|
595
601
|
}
|
|
596
602
|
} else if (value) {
|
|
603
|
+
console.log('value', value);
|
|
597
604
|
nextState.selectedRowKeys = [value];
|
|
598
|
-
nextState.selectedRows = [(0, _defineProperty2.default)({}, valueKey, value[valueKey])];
|
|
599
605
|
}
|
|
600
606
|
setState(nextState);
|
|
601
607
|
}
|
|
@@ -140,6 +140,13 @@
|
|
|
140
140
|
|
|
141
141
|
// 地址组件
|
|
142
142
|
.@{ant-prefix}-form-item-control-input-content {
|
|
143
|
+
// 查看模式
|
|
144
|
+
& > span {
|
|
145
|
+
border-radius: 4px;
|
|
146
|
+
padding: 5px 8px;
|
|
147
|
+
background: @zaui-contract-bg;
|
|
148
|
+
}
|
|
149
|
+
|
|
143
150
|
& > .pro-address {
|
|
144
151
|
.@{ant-prefix}-select-selector,
|
|
145
152
|
.@{ant-prefix}-input-affix-wrapper,
|
|
@@ -47,7 +47,8 @@ var diffOriginal = exports.diffOriginal = function diffOriginal(params) {
|
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
if (!nullValue.includes(value) || !nullValue.includes(originalValue)) {
|
|
50
|
-
|
|
50
|
+
var res = !(0, _lodash.isEqual)(value, originalValue);
|
|
51
|
+
return res;
|
|
51
52
|
}
|
|
52
53
|
return false;
|
|
53
54
|
};
|
|
@@ -92,7 +92,7 @@ var useListChanged = exports.useListChanged = function useListChanged(params) {
|
|
|
92
92
|
originalValue: originalValue,
|
|
93
93
|
form: form,
|
|
94
94
|
equalWith: equalWith,
|
|
95
|
-
name: namesStr || name
|
|
95
|
+
name: (0, _lodash.isString)(namesStr) ? namesStr : originalName || name
|
|
96
96
|
});
|
|
97
97
|
return [changed, originalValue];
|
|
98
98
|
};
|
package/lib/ProStep/index.js
CHANGED
|
@@ -110,19 +110,17 @@ var ProStep = function ProStep(_ref) {
|
|
|
110
110
|
case 10:
|
|
111
111
|
values[id] = _context.sent;
|
|
112
112
|
case 11:
|
|
113
|
-
_context.next =
|
|
113
|
+
_context.next = 18;
|
|
114
114
|
break;
|
|
115
115
|
case 13:
|
|
116
116
|
_context.prev = 13;
|
|
117
117
|
_context.t0 = _context["catch"](1);
|
|
118
118
|
num = _context.t0 === null || _context.t0 === void 0 ? void 0 : (_errors$errorFields = _context.t0.errorFields) === null || _errors$errorFields === void 0 ? void 0 : _errors$errorFields.length;
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
console.error(_context.t0);
|
|
122
|
-
}
|
|
123
|
-
case 17:
|
|
124
|
-
setErrorCollection((0, _defineProperty2.default)({}, id, num));
|
|
119
|
+
setLocalData(false);
|
|
120
|
+
console.error(_context.t0);
|
|
125
121
|
case 18:
|
|
122
|
+
setErrorCollection((0, _defineProperty2.default)({}, id, num));
|
|
123
|
+
case 19:
|
|
126
124
|
case "end":
|
|
127
125
|
return _context.stop();
|
|
128
126
|
}
|
package/lib/global.less
CHANGED
|
@@ -9,30 +9,48 @@ pre {
|
|
|
9
9
|
scrollbar-face-color: #d2d3d7;
|
|
10
10
|
scrollbar-highlight-color: #979797;
|
|
11
11
|
scrollbar-3dlight-color: #979797;
|
|
12
|
-
}
|
|
13
12
|
|
|
14
|
-
::-webkit-scrollbar {
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
::-webkit-scrollbar {
|
|
14
|
+
width: 16px;
|
|
15
|
+
background: transparent;
|
|
16
|
+
}
|
|
17
17
|
|
|
18
|
-
//
|
|
19
|
-
::-webkit-scrollbar-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
border-style: dashed;
|
|
24
|
-
border-width: 4px;
|
|
25
|
-
border-radius: 10px;
|
|
26
|
-
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0);
|
|
27
|
-
}
|
|
18
|
+
// 轨道
|
|
19
|
+
::-webkit-scrollbar-track {
|
|
20
|
+
background-color: #fff;
|
|
21
|
+
border-radius: 10px;
|
|
22
|
+
}
|
|
28
23
|
|
|
29
|
-
//
|
|
30
|
-
::-webkit-scrollbar-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
// 悬浮轨道
|
|
25
|
+
::-webkit-scrollbar-thumb:hover {
|
|
26
|
+
background-color: #979797;
|
|
27
|
+
background-clip: padding-box;
|
|
28
|
+
border-color: transparent;
|
|
29
|
+
border-style: dashed;
|
|
30
|
+
border-width: 4px;
|
|
31
|
+
border-radius: 10px;
|
|
32
|
+
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:hover::-webkit-scrollbar-track {
|
|
36
|
+
background: transparent;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:hover::-webkit-scrollbar-thumb {
|
|
40
|
+
background-color: #d2d3d7;
|
|
41
|
+
background-clip: padding-box;
|
|
42
|
+
border-color: transparent;
|
|
43
|
+
border-style: dashed;
|
|
44
|
+
border-width: 4px;
|
|
45
|
+
border-radius: 10px;
|
|
46
|
+
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
:hover::-webkit-scrollbar-thumb:hover {
|
|
50
|
+
background-color: #979797;
|
|
51
|
+
}
|
|
34
52
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
53
|
+
:hover::-webkit-scrollbar-track {
|
|
54
|
+
background-color: #fff;
|
|
55
|
+
}
|
|
38
56
|
}
|
package/lib/locale/zh_CN.js
CHANGED