@zat-design/sisyphus-react 3.4.6 → 3.4.7
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 +11 -0
- package/dist/less.esm.css +11 -0
- package/es/ProEditTable/components/RenderField/index.js +1 -0
- package/es/ProEditTable/style/index.less +4 -1
- package/es/ProForm/components/combination/FormList/index.js +1 -0
- package/es/ProForm/components/render/Render.js +7 -7
- package/es/ProForm/components/render/RenderFields.js +1 -0
- package/es/ProForm/components/render/propsType.d.ts +2 -1
- package/es/ProForm/propsType.d.ts +1 -0
- package/es/ProForm/utils/index.d.ts +6 -1
- package/es/ProForm/utils/index.js +5 -5
- package/es/ProForm/utils/useForm.js +2 -1
- package/es/ProSelect/index.js +14 -2
- package/es/ProSelect/propsType.d.ts +2 -0
- package/es/ProSelect/utils/index.d.ts +9 -0
- package/es/ProSelect/utils/index.js +60 -0
- package/es/ProTree/components/ProTreeSelect/index.js +3 -3
- package/es/ProTree/components/ProTreeSelect/style/index.less +6 -8
- package/es/ProTree/style/index.less +15 -0
- package/es/ProUpload/index.js +5 -6
- package/es/ProUpload/propsType.d.ts +1 -1
- package/es/global.less +22 -26
- package/lib/ProEditTable/components/RenderField/index.js +1 -0
- package/lib/ProEditTable/style/index.less +4 -1
- package/lib/ProForm/components/combination/FormList/index.js +1 -0
- package/lib/ProForm/components/render/Render.js +7 -7
- package/lib/ProForm/components/render/RenderFields.js +1 -0
- package/lib/ProForm/components/render/propsType.d.ts +2 -1
- package/lib/ProForm/propsType.d.ts +1 -0
- package/lib/ProForm/utils/index.d.ts +6 -1
- package/lib/ProForm/utils/index.js +5 -5
- package/lib/ProForm/utils/useForm.js +2 -1
- package/lib/ProSelect/index.js +14 -2
- package/lib/ProSelect/propsType.d.ts +2 -0
- package/lib/ProSelect/utils/index.d.ts +9 -0
- package/lib/ProSelect/utils/index.js +68 -0
- package/lib/ProTree/components/ProTreeSelect/index.js +3 -3
- package/lib/ProTree/components/ProTreeSelect/style/index.less +6 -8
- package/lib/ProTree/style/index.less +15 -0
- package/lib/ProUpload/index.js +5 -6
- package/lib/ProUpload/propsType.d.ts +1 -1
- package/lib/global.less +22 -26
- package/package.json +1 -1
package/dist/index.esm.css
CHANGED
|
@@ -3983,6 +3983,14 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
3983
3983
|
.pro-form.pro-form-view .ant-form-item .pro-tree .ant-tree-checkbox * {
|
|
3984
3984
|
height: 16px !important;
|
|
3985
3985
|
}
|
|
3986
|
+
.pro-tree-select .ant-select-selector .check-mark-icon,
|
|
3987
|
+
.pro-tree-select-drop-down-container .ant-select-selector .check-mark-icon {
|
|
3988
|
+
display: none;
|
|
3989
|
+
}
|
|
3990
|
+
.pro-tree-select.ant-select-dropdown .ant-select-tree-node-content-wrapper .check-mark-icon,
|
|
3991
|
+
.pro-tree-select-drop-down-container.ant-select-dropdown .ant-select-tree-node-content-wrapper .check-mark-icon {
|
|
3992
|
+
display: none;
|
|
3993
|
+
}
|
|
3986
3994
|
.pro-drawer .pro-drawer-close {
|
|
3987
3995
|
position: absolute;
|
|
3988
3996
|
top: 6px;
|
|
@@ -4138,6 +4146,9 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
4138
4146
|
-webkit-box-shadow: 3px 2px 12px 0px var(--zaui-shadow, rgba(56, 56, 56, 0.15));
|
|
4139
4147
|
box-shadow: 3px 2px 12px 0px var(--zaui-shadow, rgba(56, 56, 56, 0.15));
|
|
4140
4148
|
}
|
|
4149
|
+
.pro-edit-table td[rowspan] {
|
|
4150
|
+
vertical-align: middle !important;
|
|
4151
|
+
}
|
|
4141
4152
|
.pro-edit-table .pro-edit-table-tooltip {
|
|
4142
4153
|
display: -webkit-inline-box;
|
|
4143
4154
|
display: -webkit-inline-flex;
|
package/dist/less.esm.css
CHANGED
|
@@ -3983,6 +3983,14 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
3983
3983
|
.pro-form.pro-form-view .ant-form-item .pro-tree .ant-tree-checkbox * {
|
|
3984
3984
|
height: 16px !important;
|
|
3985
3985
|
}
|
|
3986
|
+
.pro-tree-select .ant-select-selector .check-mark-icon,
|
|
3987
|
+
.pro-tree-select-drop-down-container .ant-select-selector .check-mark-icon {
|
|
3988
|
+
display: none;
|
|
3989
|
+
}
|
|
3990
|
+
.pro-tree-select.ant-select-dropdown .ant-select-tree-node-content-wrapper .check-mark-icon,
|
|
3991
|
+
.pro-tree-select-drop-down-container.ant-select-dropdown .ant-select-tree-node-content-wrapper .check-mark-icon {
|
|
3992
|
+
display: none;
|
|
3993
|
+
}
|
|
3986
3994
|
.pro-drawer .pro-drawer-close {
|
|
3987
3995
|
position: absolute;
|
|
3988
3996
|
top: 6px;
|
|
@@ -4138,6 +4146,9 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
4138
4146
|
-webkit-box-shadow: 3px 2px 12px 0px var(--zaui-shadow, rgba(56, 56, 56, 0.15));
|
|
4139
4147
|
box-shadow: 3px 2px 12px 0px var(--zaui-shadow, rgba(56, 56, 56, 0.15));
|
|
4140
4148
|
}
|
|
4149
|
+
.pro-edit-table td[rowspan] {
|
|
4150
|
+
vertical-align: middle !important;
|
|
4151
|
+
}
|
|
4141
4152
|
.pro-edit-table .pro-edit-table-tooltip {
|
|
4142
4153
|
display: -webkit-inline-box;
|
|
4143
4154
|
display: -webkit-inline-flex;
|
|
@@ -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;
|
|
@@ -137,7 +140,7 @@
|
|
|
137
140
|
.@{ant-prefix}-table-cell-fix-left,
|
|
138
141
|
.@{ant-prefix}-table-cell-fix-right {
|
|
139
142
|
background-color: var(--zaui-table-header-bg, #f2f3f5);
|
|
140
|
-
|
|
143
|
+
|
|
141
144
|
}
|
|
142
145
|
}
|
|
143
146
|
|
|
@@ -242,7 +242,7 @@ var Render = function Render(props) {
|
|
|
242
242
|
* onChange参数重置 (value, record, { form, index, namePath, option }) => void
|
|
243
243
|
*/
|
|
244
244
|
var handleChange = function handleChange() {
|
|
245
|
-
var
|
|
245
|
+
var _lastComponentProps$c2;
|
|
246
246
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
247
247
|
args[_key] = arguments[_key];
|
|
248
248
|
}
|
|
@@ -260,11 +260,11 @@ var Render = function Render(props) {
|
|
|
260
260
|
((_AutoComponent$props$ = (_AutoComponent$props = AutoComponent === null || AutoComponent === void 0 ? void 0 : AutoComponent.props)[changeKey]) === null || _AutoComponent$props$ === void 0 ? void 0 : _AutoComponent$props$.call.apply(_AutoComponent$props$, [_AutoComponent$props].concat(_toConsumableArray(_args)))) || ((_lastComponentProps$c = lastComponentProps[changeKey]) === null || _lastComponentProps$c === void 0 ? void 0 : _lastComponentProps$c.call.apply(_lastComponentProps$c, [lastComponentProps].concat(_toConsumableArray(_args))));
|
|
261
261
|
return false;
|
|
262
262
|
}
|
|
263
|
-
|
|
264
|
-
// FormList 和 Group场景 对比值改变的话, 回显到表单上
|
|
265
|
-
if (inList) {
|
|
266
|
-
|
|
267
|
-
}
|
|
263
|
+
// const inList = _otherFormItemProps?.namePath?.length;
|
|
264
|
+
// // FormList 和 Group场景 对比值改变的话, 回显到表单上
|
|
265
|
+
// if (inList) {
|
|
266
|
+
// form.setFieldsValue(_args[1]);
|
|
267
|
+
// }
|
|
268
268
|
// Group默认校验, 延时与重新setFieldValue,为了解决校验值未同步最新的问题,
|
|
269
269
|
if (formItemProps === null || formItemProps === void 0 ? void 0 : formItemProps.parentNames) {
|
|
270
270
|
setTimeout(function () {
|
|
@@ -276,7 +276,7 @@ var Render = function Render(props) {
|
|
|
276
276
|
// ProTreeSelect返回option
|
|
277
277
|
if (['ProTree'].includes(type)) {
|
|
278
278
|
var _args2, _args2$;
|
|
279
|
-
_args[2].option = findOptionByValue(lastComponentProps === null || lastComponentProps === void 0 ? void 0 : lastComponentProps.dataSource, (_args2 = _args) === null || _args2 === void 0 ? void 0 : (_args2$ = _args2[0]) === null || _args2$ === void 0 ? void 0 : _args2$[0]);
|
|
279
|
+
_args[2].option = findOptionByValue(lastComponentProps === null || lastComponentProps === void 0 ? void 0 : lastComponentProps.dataSource, (_args2 = _args) === null || _args2 === void 0 ? void 0 : (_args2$ = _args2[0]) === null || _args2$ === void 0 ? void 0 : _args2$[0], (lastComponentProps === null || lastComponentProps === void 0 ? void 0 : lastComponentProps.fieldNames) || {});
|
|
280
280
|
}
|
|
281
281
|
(_lastComponentProps$c2 = lastComponentProps[changeKey]) === null || _lastComponentProps$c2 === void 0 ? void 0 : _lastComponentProps$c2.call.apply(_lastComponentProps$c2, [lastComponentProps].concat(_toConsumableArray(_args)));
|
|
282
282
|
};
|
|
@@ -208,6 +208,7 @@ export interface ProFormColumnProps<Values = any> extends Omit<FormItemProps<Val
|
|
|
208
208
|
clearNotShow?: boolean;
|
|
209
209
|
index?: number;
|
|
210
210
|
namePath?: NamePath;
|
|
211
|
+
listName?: NamePath;
|
|
211
212
|
/** 表单前缀信息 */
|
|
212
213
|
before?: string | React.ReactNode;
|
|
213
214
|
/** 表单后缀信息 */
|
|
@@ -216,7 +217,7 @@ export interface ProFormColumnProps<Values = any> extends Omit<FormItemProps<Val
|
|
|
216
217
|
extra?: string | React.ReactNode;
|
|
217
218
|
/** 是否固定字段, 不隐藏 */
|
|
218
219
|
fixed?: boolean;
|
|
219
|
-
confirm?: boolean | ModalFuncProps | FunctionArgs<Values, boolean | ModalFuncProps>;
|
|
220
|
+
confirm?: boolean | ModalFuncProps | FunctionArgs<Values, boolean | ModalFuncProps | void>;
|
|
220
221
|
}
|
|
221
222
|
export type ProColumnProps<T = any> = ProFormColumnProps<T> & ColumnPropsMap<T, 'ProForm'>;
|
|
222
223
|
/**
|
|
@@ -83,7 +83,12 @@ export declare const deleteForPath: (values: any, namePath: string | number | (s
|
|
|
83
83
|
* @param value 选中值
|
|
84
84
|
* @returns {}
|
|
85
85
|
*/
|
|
86
|
-
export declare const findOptionByValue: (treeData: any[], value: string | number
|
|
86
|
+
export declare const findOptionByValue: (treeData: any[], value: string | number, fieldNames: {
|
|
87
|
+
[key: string]: any;
|
|
88
|
+
label?: string;
|
|
89
|
+
value?: string;
|
|
90
|
+
children?: string;
|
|
91
|
+
}) => any;
|
|
87
92
|
/**
|
|
88
93
|
* 对比依赖列表中的 值是否变更
|
|
89
94
|
*/
|
|
@@ -392,19 +392,19 @@ export var deleteForPath = function deleteForPath(values, namePath) {
|
|
|
392
392
|
* @param value 选中值
|
|
393
393
|
* @returns {}
|
|
394
394
|
*/
|
|
395
|
-
export var findOptionByValue = function findOptionByValue(treeData, value) {
|
|
395
|
+
export var findOptionByValue = function findOptionByValue(treeData, value, fieldNames) {
|
|
396
396
|
if (isObject(value)) {
|
|
397
397
|
return value;
|
|
398
398
|
}
|
|
399
399
|
for (var i = 0; i < (treeData === null || treeData === void 0 ? void 0 : treeData.length); i++) {
|
|
400
400
|
var node = treeData[i];
|
|
401
|
-
if (node.value === value) {
|
|
402
|
-
return omit(node, ['children']);
|
|
401
|
+
if (node[(fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value) || 'value'] === value) {
|
|
402
|
+
return omit(node, ['children', fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children]);
|
|
403
403
|
}
|
|
404
404
|
if (node.children) {
|
|
405
|
-
var foundNode = findOptionByValue(node.children, value);
|
|
405
|
+
var foundNode = findOptionByValue(node[(fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children) || 'children'], value, fieldNames);
|
|
406
406
|
if (foundNode) {
|
|
407
|
-
return omit(foundNode, ['children']);
|
|
407
|
+
return omit(foundNode, ['children', fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children]);
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
410
|
}
|
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", "isView"];
|
|
12
|
+
var _excluded = ["dataSource", "defaultDisableValue", "useRequest", "fieldNames", "tooltip", "otherProps", "labelInValue", "filterInList", "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';
|
|
@@ -19,6 +19,7 @@ import Container from '../ProForm/components/Container';
|
|
|
19
19
|
import AdaptiveTooltip from './components/AdaptiveTooltip';
|
|
20
20
|
import { ProForm } from '..';
|
|
21
21
|
import locale from '../locale';
|
|
22
|
+
import { getSelectList } from './utils';
|
|
22
23
|
import './index.less';
|
|
23
24
|
var Option = _Select.Option;
|
|
24
25
|
export var ProSelect = function ProSelect(props, ref) {
|
|
@@ -41,6 +42,8 @@ export var ProSelect = function ProSelect(props, ref) {
|
|
|
41
42
|
tooltip = _props$tooltip === void 0 ? false : _props$tooltip,
|
|
42
43
|
otherProps = props.otherProps,
|
|
43
44
|
labelInValue = props.labelInValue,
|
|
45
|
+
_props$filterInList = props.filterInList,
|
|
46
|
+
filterInList = _props$filterInList === void 0 ? false : _props$filterInList,
|
|
44
47
|
_props$scrollFollowPa = props.scrollFollowParent,
|
|
45
48
|
scrollFollowParent = _props$scrollFollowPa === void 0 ? true : _props$scrollFollowPa,
|
|
46
49
|
defaultOne = props.defaultOne,
|
|
@@ -265,6 +268,15 @@ export var ProSelect = function ProSelect(props, ref) {
|
|
|
265
268
|
}
|
|
266
269
|
return value;
|
|
267
270
|
};
|
|
271
|
+
var newSelectList = selectList;
|
|
272
|
+
if ((otherProps === null || otherProps === void 0 ? void 0 : otherProps.listName) && filterInList) {
|
|
273
|
+
newSelectList = getSelectList({
|
|
274
|
+
otherProps: otherProps,
|
|
275
|
+
value: props.value,
|
|
276
|
+
dataSource: selectList,
|
|
277
|
+
labelInValue: labelInValue
|
|
278
|
+
});
|
|
279
|
+
}
|
|
268
280
|
return _jsx(_Select, _objectSpread(_objectSpread({
|
|
269
281
|
placeholder: locale === null || locale === void 0 ? void 0 : (_locale$ProSelect = locale.ProSelect) === null || _locale$ProSelect === void 0 ? void 0 : _locale$ProSelect.select,
|
|
270
282
|
allowClear: true,
|
|
@@ -287,7 +299,7 @@ export var ProSelect = function ProSelect(props, ref) {
|
|
|
287
299
|
}
|
|
288
300
|
}, omit(cloneDeep(selectProps), ['isView', 'showCodeName', 'form', 'name'])), {}, {
|
|
289
301
|
value: transformValue(),
|
|
290
|
-
children: Array.isArray(
|
|
302
|
+
children: Array.isArray(newSelectList) && newSelectList.map(function (item) {
|
|
291
303
|
return _jsx(Option, {
|
|
292
304
|
value: item[code],
|
|
293
305
|
record: item,
|
|
@@ -14,6 +14,8 @@ export interface PropSelectProps extends Omit<SelectProps, 'onSearch'> {
|
|
|
14
14
|
defaultOne?: boolean;
|
|
15
15
|
/** 数据源 */
|
|
16
16
|
dataSource?: DataOption[];
|
|
17
|
+
/** list场景中过滤掉已选择的值 */
|
|
18
|
+
filterInList?: boolean;
|
|
17
19
|
/** @deprecated 兼容 2.0 版本、3.0 使用view 模式 */
|
|
18
20
|
defaultDisableValue?: string;
|
|
19
21
|
/** 是否展示 tooltip、当 label 特别长的时候使用 */
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import _createForOfIteratorHelper from "@babel/runtime/helpers/esm/createForOfIteratorHelper";
|
|
2
|
+
/* eslint-disable no-restricted-syntax */
|
|
3
|
+
import _ from 'lodash';
|
|
4
|
+
var findSelectNameValues = function findSelectNameValues(_ref) {
|
|
5
|
+
var list = _ref.list,
|
|
6
|
+
selectName = _ref.selectName,
|
|
7
|
+
value = _ref.value,
|
|
8
|
+
dataSource = _ref.dataSource,
|
|
9
|
+
labelInValue = _ref.labelInValue;
|
|
10
|
+
var selectValues = [];
|
|
11
|
+
list.forEach(function (item) {
|
|
12
|
+
var result = item;
|
|
13
|
+
if (!item || !Object.keys(item).length || Object.keys(item).length === 1 && 'rowKey' in item) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
var _iterator = _createForOfIteratorHelper(selectName),
|
|
17
|
+
_step;
|
|
18
|
+
try {
|
|
19
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
20
|
+
var key = _step.value;
|
|
21
|
+
result = result[key];
|
|
22
|
+
}
|
|
23
|
+
} catch (err) {
|
|
24
|
+
_iterator.e(err);
|
|
25
|
+
} finally {
|
|
26
|
+
_iterator.f();
|
|
27
|
+
}
|
|
28
|
+
selectValues.push(result);
|
|
29
|
+
});
|
|
30
|
+
var diffList = _.difference(selectValues, [value]);
|
|
31
|
+
return dataSource.filter(function (item) {
|
|
32
|
+
return !diffList.includes(labelInValue ? item : item.value);
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* 返回当前组件可以显示的数据源
|
|
37
|
+
*/
|
|
38
|
+
export var getSelectList = function getSelectList(_ref2) {
|
|
39
|
+
var otherProps = _ref2.otherProps,
|
|
40
|
+
value = _ref2.value,
|
|
41
|
+
dataSource = _ref2.dataSource,
|
|
42
|
+
labelInValue = _ref2.labelInValue;
|
|
43
|
+
if (!otherProps) {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
var listName = otherProps.listName,
|
|
47
|
+
form = otherProps.form;
|
|
48
|
+
var firstNumberIndex = listName.findIndex(function (item) {
|
|
49
|
+
return typeof item === 'number';
|
|
50
|
+
});
|
|
51
|
+
var fatherName = listName.slice(0, firstNumberIndex);
|
|
52
|
+
var selectName = listName.slice(firstNumberIndex + 1);
|
|
53
|
+
return findSelectNameValues({
|
|
54
|
+
list: form.getFieldValue(fatherName),
|
|
55
|
+
selectName: selectName,
|
|
56
|
+
value: value,
|
|
57
|
+
dataSource: dataSource,
|
|
58
|
+
labelInValue: labelInValue
|
|
59
|
+
});
|
|
60
|
+
};
|
|
@@ -407,13 +407,13 @@ export var ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
|
407
407
|
}
|
|
408
408
|
return result;
|
|
409
409
|
}
|
|
410
|
-
var handleChange = function handleChange(newVal) {
|
|
410
|
+
var handleChange = function handleChange(newVal, label, extra) {
|
|
411
411
|
// newVal回来得一定是label、value
|
|
412
412
|
var result = newVal;
|
|
413
413
|
if (props === null || props === void 0 ? void 0 : props.labelInValue) {
|
|
414
414
|
result = getLabelByValue(selectList, newVal);
|
|
415
415
|
}
|
|
416
|
-
onChange && onChange(result,
|
|
416
|
+
onChange && onChange(result, label, extra);
|
|
417
417
|
// 重置搜索
|
|
418
418
|
showSearch && searchTreeEvent('');
|
|
419
419
|
};
|
|
@@ -486,7 +486,7 @@ export var ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
|
486
486
|
allowClear: allowClear || true,
|
|
487
487
|
showArrow: true,
|
|
488
488
|
treeNodeFilterProp: treeNodeFilterProp,
|
|
489
|
-
virtual:
|
|
489
|
+
virtual: true
|
|
490
490
|
}, selectProps);
|
|
491
491
|
if (value === null) {
|
|
492
492
|
delete treeProps.value;
|
|
@@ -40,6 +40,12 @@
|
|
|
40
40
|
color: red;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
+
// 隐藏单选下拉树后面勾号
|
|
44
|
+
.@{ant-prefix}-select-tree-node-content-wrapper{
|
|
45
|
+
.check-mark-icon{
|
|
46
|
+
display: none;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
43
49
|
// 单选
|
|
44
50
|
&.signal-tree{
|
|
45
51
|
.@{ant-prefix}-select-tree{
|
|
@@ -63,14 +69,6 @@
|
|
|
63
69
|
display: block;
|
|
64
70
|
}
|
|
65
71
|
}
|
|
66
|
-
.@{ant-prefix}-select-tree-node-content-wrapper{
|
|
67
|
-
background-color: transparent;
|
|
68
|
-
&.@{ant-prefix}-select-tree-node-selected{
|
|
69
|
-
.check-mark-icon{
|
|
70
|
-
display: block;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
72
|
.@{ant-prefix}-select-tree-treenode:hover{
|
|
75
73
|
background-color: #f5f5f5;
|
|
76
74
|
}
|
|
@@ -348,3 +348,18 @@
|
|
|
348
348
|
height: 16px !important;
|
|
349
349
|
}
|
|
350
350
|
|
|
351
|
+
.pro-tree-select, .pro-tree-select-drop-down-container{
|
|
352
|
+
.@{ant-prefix}-select-selector{
|
|
353
|
+
.check-mark-icon{
|
|
354
|
+
display: none;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
&.@{ant-prefix}-select-dropdown{
|
|
358
|
+
// 隐藏单选下拉树后面勾号
|
|
359
|
+
.@{ant-prefix}-select-tree-node-content-wrapper{
|
|
360
|
+
.check-mark-icon{
|
|
361
|
+
display: none;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
package/es/ProUpload/index.js
CHANGED
|
@@ -175,10 +175,6 @@ var ProUpload = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
175
175
|
* @return {*}
|
|
176
176
|
*/
|
|
177
177
|
var handleBeforeUpload = function handleBeforeUpload(file, fileList) {
|
|
178
|
-
if (!isFunction(beforeUpload)) {
|
|
179
|
-
return false;
|
|
180
|
-
}
|
|
181
|
-
// TODO
|
|
182
178
|
if (!validateFileExt(extExt, file)) {
|
|
183
179
|
var _locale$ProUpload2;
|
|
184
180
|
_message.error("".concat(locale === null || locale === void 0 ? void 0 : (_locale$ProUpload2 = locale.ProUpload) === null || _locale$ProUpload2 === void 0 ? void 0 : _locale$ProUpload2.errorInfoExt, "\u3010").concat(extExt.join('、'), "\u3011"));
|
|
@@ -189,7 +185,9 @@ var ProUpload = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
189
185
|
_message.error("".concat(locale === null || locale === void 0 ? void 0 : (_locale$ProUpload3 = locale.ProUpload) === null || _locale$ProUpload3 === void 0 ? void 0 : _locale$ProUpload3.errorInfoSize).concat(size, "M"));
|
|
190
186
|
return false;
|
|
191
187
|
}
|
|
192
|
-
|
|
188
|
+
if (beforeUpload) {
|
|
189
|
+
return beforeUpload(file, fileList);
|
|
190
|
+
}
|
|
193
191
|
};
|
|
194
192
|
var handleRemove = function handleRemove(file) {
|
|
195
193
|
var nextList = _fileList.slice();
|
|
@@ -244,7 +242,8 @@ var ProUpload = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
244
242
|
showUploadList: showUploadList,
|
|
245
243
|
method: method,
|
|
246
244
|
accept: accept,
|
|
247
|
-
data: _objectSpread({}, dataParams)
|
|
245
|
+
data: _objectSpread({}, dataParams),
|
|
246
|
+
name: name
|
|
248
247
|
}, residueProps);
|
|
249
248
|
var baseProps = {
|
|
250
249
|
isView: isView,
|
package/es/global.less
CHANGED
|
@@ -5,37 +5,33 @@ pre {
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
* {
|
|
8
|
-
// 火狐浏览器
|
|
9
|
-
scrollbar-width: thin;
|
|
10
|
-
scrollbar-color: #d2d3d7 transparent;
|
|
11
8
|
// ie浏览器
|
|
12
9
|
scrollbar-face-color: #d2d3d7;
|
|
13
10
|
scrollbar-highlight-color: #979797;
|
|
14
11
|
scrollbar-3dlight-color: #979797;
|
|
15
|
-
|
|
12
|
+
::-webkit-scrollbar {
|
|
13
|
+
width: 16px;
|
|
14
|
+
}
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
// // 滑块
|
|
17
|
+
::-webkit-scrollbar-thumb {
|
|
18
|
+
background-color: #d2d3d7;
|
|
19
|
+
background-clip: padding-box;
|
|
20
|
+
border-color: transparent;
|
|
21
|
+
border-style: dashed;
|
|
22
|
+
border-width: 4px;
|
|
23
|
+
border-radius: 10px;
|
|
24
|
+
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0);
|
|
25
|
+
}
|
|
20
26
|
|
|
21
|
-
//
|
|
22
|
-
::-webkit-scrollbar-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
border-style: dashed;
|
|
27
|
-
border-width: 4px;
|
|
28
|
-
border-radius: 10px;
|
|
29
|
-
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
// 轨道
|
|
33
|
-
::-webkit-scrollbar-track {
|
|
34
|
-
background-color: transparent;
|
|
35
|
-
border-radius: 10px;
|
|
36
|
-
}
|
|
27
|
+
// 轨道
|
|
28
|
+
::-webkit-scrollbar-track {
|
|
29
|
+
background-color: transparent;
|
|
30
|
+
border-radius: 10px;
|
|
31
|
+
}
|
|
37
32
|
|
|
38
|
-
// 悬浮轨道
|
|
39
|
-
::-webkit-scrollbar-thumb:hover {
|
|
40
|
-
|
|
33
|
+
// 悬浮轨道
|
|
34
|
+
::-webkit-scrollbar-thumb:hover {
|
|
35
|
+
background-color: #979797;
|
|
36
|
+
}
|
|
41
37
|
}
|
|
@@ -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;
|
|
@@ -137,7 +140,7 @@
|
|
|
137
140
|
.@{ant-prefix}-table-cell-fix-left,
|
|
138
141
|
.@{ant-prefix}-table-cell-fix-right {
|
|
139
142
|
background-color: var(--zaui-table-header-bg, #f2f3f5);
|
|
140
|
-
|
|
143
|
+
|
|
141
144
|
}
|
|
142
145
|
}
|
|
143
146
|
|
|
@@ -58,6 +58,7 @@ var FormList = function FormList(props, ref) {
|
|
|
58
58
|
}) : item.names,
|
|
59
59
|
index: fieldName,
|
|
60
60
|
namePath: namePath,
|
|
61
|
+
listName: [].concat((0, _toConsumableArray2.default)(namePath), [item.name]),
|
|
61
62
|
label: mode === 'less' ? undefined : item.label
|
|
62
63
|
});
|
|
63
64
|
return column;
|
|
@@ -240,7 +240,7 @@ var Render = function Render(props) {
|
|
|
240
240
|
* onChange参数重置 (value, record, { form, index, namePath, option }) => void
|
|
241
241
|
*/
|
|
242
242
|
var handleChange = function handleChange() {
|
|
243
|
-
var
|
|
243
|
+
var _lastComponentProps$c2;
|
|
244
244
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
245
245
|
args[_key] = arguments[_key];
|
|
246
246
|
}
|
|
@@ -258,11 +258,11 @@ var Render = function Render(props) {
|
|
|
258
258
|
((_AutoComponent$props$ = (_AutoComponent$props = AutoComponent === null || AutoComponent === void 0 ? void 0 : AutoComponent.props)[changeKey]) === null || _AutoComponent$props$ === void 0 ? void 0 : _AutoComponent$props$.call.apply(_AutoComponent$props$, [_AutoComponent$props].concat((0, _toConsumableArray2.default)(_args)))) || ((_lastComponentProps$c = lastComponentProps[changeKey]) === null || _lastComponentProps$c === void 0 ? void 0 : _lastComponentProps$c.call.apply(_lastComponentProps$c, [lastComponentProps].concat((0, _toConsumableArray2.default)(_args))));
|
|
259
259
|
return false;
|
|
260
260
|
}
|
|
261
|
-
|
|
262
|
-
// FormList 和 Group场景 对比值改变的话, 回显到表单上
|
|
263
|
-
if (inList) {
|
|
264
|
-
|
|
265
|
-
}
|
|
261
|
+
// const inList = _otherFormItemProps?.namePath?.length;
|
|
262
|
+
// // FormList 和 Group场景 对比值改变的话, 回显到表单上
|
|
263
|
+
// if (inList) {
|
|
264
|
+
// form.setFieldsValue(_args[1]);
|
|
265
|
+
// }
|
|
266
266
|
// Group默认校验, 延时与重新setFieldValue,为了解决校验值未同步最新的问题,
|
|
267
267
|
if (formItemProps === null || formItemProps === void 0 ? void 0 : formItemProps.parentNames) {
|
|
268
268
|
setTimeout(function () {
|
|
@@ -274,7 +274,7 @@ var Render = function Render(props) {
|
|
|
274
274
|
// ProTreeSelect返回option
|
|
275
275
|
if (['ProTree'].includes(type)) {
|
|
276
276
|
var _args2, _args2$;
|
|
277
|
-
_args[2].option = (0, _index.findOptionByValue)(lastComponentProps === null || lastComponentProps === void 0 ? void 0 : lastComponentProps.dataSource, (_args2 = _args) === null || _args2 === void 0 ? void 0 : (_args2$ = _args2[0]) === null || _args2$ === void 0 ? void 0 : _args2$[0]);
|
|
277
|
+
_args[2].option = (0, _index.findOptionByValue)(lastComponentProps === null || lastComponentProps === void 0 ? void 0 : lastComponentProps.dataSource, (_args2 = _args) === null || _args2 === void 0 ? void 0 : (_args2$ = _args2[0]) === null || _args2$ === void 0 ? void 0 : _args2$[0], (lastComponentProps === null || lastComponentProps === void 0 ? void 0 : lastComponentProps.fieldNames) || {});
|
|
278
278
|
}
|
|
279
279
|
(_lastComponentProps$c2 = lastComponentProps[changeKey]) === null || _lastComponentProps$c2 === void 0 ? void 0 : _lastComponentProps$c2.call.apply(_lastComponentProps$c2, [lastComponentProps].concat((0, _toConsumableArray2.default)(_args)));
|
|
280
280
|
};
|
|
@@ -208,6 +208,7 @@ export interface ProFormColumnProps<Values = any> extends Omit<FormItemProps<Val
|
|
|
208
208
|
clearNotShow?: boolean;
|
|
209
209
|
index?: number;
|
|
210
210
|
namePath?: NamePath;
|
|
211
|
+
listName?: NamePath;
|
|
211
212
|
/** 表单前缀信息 */
|
|
212
213
|
before?: string | React.ReactNode;
|
|
213
214
|
/** 表单后缀信息 */
|
|
@@ -216,7 +217,7 @@ export interface ProFormColumnProps<Values = any> extends Omit<FormItemProps<Val
|
|
|
216
217
|
extra?: string | React.ReactNode;
|
|
217
218
|
/** 是否固定字段, 不隐藏 */
|
|
218
219
|
fixed?: boolean;
|
|
219
|
-
confirm?: boolean | ModalFuncProps | FunctionArgs<Values, boolean | ModalFuncProps>;
|
|
220
|
+
confirm?: boolean | ModalFuncProps | FunctionArgs<Values, boolean | ModalFuncProps | void>;
|
|
220
221
|
}
|
|
221
222
|
export type ProColumnProps<T = any> = ProFormColumnProps<T> & ColumnPropsMap<T, 'ProForm'>;
|
|
222
223
|
/**
|
|
@@ -83,7 +83,12 @@ export declare const deleteForPath: (values: any, namePath: string | number | (s
|
|
|
83
83
|
* @param value 选中值
|
|
84
84
|
* @returns {}
|
|
85
85
|
*/
|
|
86
|
-
export declare const findOptionByValue: (treeData: any[], value: string | number
|
|
86
|
+
export declare const findOptionByValue: (treeData: any[], value: string | number, fieldNames: {
|
|
87
|
+
[key: string]: any;
|
|
88
|
+
label?: string;
|
|
89
|
+
value?: string;
|
|
90
|
+
children?: string;
|
|
91
|
+
}) => any;
|
|
87
92
|
/**
|
|
88
93
|
* 对比依赖列表中的 值是否变更
|
|
89
94
|
*/
|
|
@@ -408,19 +408,19 @@ var deleteForPath = exports.deleteForPath = function deleteForPath(values, nameP
|
|
|
408
408
|
* @param value 选中值
|
|
409
409
|
* @returns {}
|
|
410
410
|
*/
|
|
411
|
-
var findOptionByValue = exports.findOptionByValue = function findOptionByValue(treeData, value) {
|
|
411
|
+
var findOptionByValue = exports.findOptionByValue = function findOptionByValue(treeData, value, fieldNames) {
|
|
412
412
|
if ((0, _lodash.isObject)(value)) {
|
|
413
413
|
return value;
|
|
414
414
|
}
|
|
415
415
|
for (var i = 0; i < (treeData === null || treeData === void 0 ? void 0 : treeData.length); i++) {
|
|
416
416
|
var node = treeData[i];
|
|
417
|
-
if (node.value === value) {
|
|
418
|
-
return (0, _lodash.omit)(node, ['children']);
|
|
417
|
+
if (node[(fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value) || 'value'] === value) {
|
|
418
|
+
return (0, _lodash.omit)(node, ['children', fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children]);
|
|
419
419
|
}
|
|
420
420
|
if (node.children) {
|
|
421
|
-
var foundNode = findOptionByValue(node.children, value);
|
|
421
|
+
var foundNode = findOptionByValue(node[(fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children) || 'children'], value, fieldNames);
|
|
422
422
|
if (foundNode) {
|
|
423
|
-
return (0, _lodash.omit)(foundNode, ['children']);
|
|
423
|
+
return (0, _lodash.omit)(foundNode, ['children', fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children]);
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
426
|
}
|
package/lib/ProSelect/index.js
CHANGED
|
@@ -19,8 +19,9 @@ var _Container = _interopRequireDefault(require("../ProForm/components/Container
|
|
|
19
19
|
var _AdaptiveTooltip = _interopRequireDefault(require("./components/AdaptiveTooltip"));
|
|
20
20
|
var _ = require("..");
|
|
21
21
|
var _locale = _interopRequireDefault(require("../locale"));
|
|
22
|
+
var _utils = require("./utils");
|
|
22
23
|
require("./index.less");
|
|
23
|
-
var _excluded = ["dataSource", "defaultDisableValue", "useRequest", "fieldNames", "tooltip", "otherProps", "labelInValue", "scrollFollowParent", "defaultOne", "onSearch", "optionRender", "onChange", "updateDataSource", "transformResponse", "isView"];
|
|
24
|
+
var _excluded = ["dataSource", "defaultDisableValue", "useRequest", "fieldNames", "tooltip", "otherProps", "labelInValue", "filterInList", "scrollFollowParent", "defaultOne", "onSearch", "optionRender", "onChange", "updateDataSource", "transformResponse", "isView"];
|
|
24
25
|
var Option = _antd.Select.Option;
|
|
25
26
|
var ProSelect = exports.ProSelect = function ProSelect(props, ref) {
|
|
26
27
|
var _locale$ProSelect;
|
|
@@ -42,6 +43,8 @@ var ProSelect = exports.ProSelect = function ProSelect(props, ref) {
|
|
|
42
43
|
tooltip = _props$tooltip === void 0 ? false : _props$tooltip,
|
|
43
44
|
otherProps = props.otherProps,
|
|
44
45
|
labelInValue = props.labelInValue,
|
|
46
|
+
_props$filterInList = props.filterInList,
|
|
47
|
+
filterInList = _props$filterInList === void 0 ? false : _props$filterInList,
|
|
45
48
|
_props$scrollFollowPa = props.scrollFollowParent,
|
|
46
49
|
scrollFollowParent = _props$scrollFollowPa === void 0 ? true : _props$scrollFollowPa,
|
|
47
50
|
defaultOne = props.defaultOne,
|
|
@@ -266,6 +269,15 @@ var ProSelect = exports.ProSelect = function ProSelect(props, ref) {
|
|
|
266
269
|
}
|
|
267
270
|
return value;
|
|
268
271
|
};
|
|
272
|
+
var newSelectList = selectList;
|
|
273
|
+
if ((otherProps === null || otherProps === void 0 ? void 0 : otherProps.listName) && filterInList) {
|
|
274
|
+
newSelectList = (0, _utils.getSelectList)({
|
|
275
|
+
otherProps: otherProps,
|
|
276
|
+
value: props.value,
|
|
277
|
+
dataSource: selectList,
|
|
278
|
+
labelInValue: labelInValue
|
|
279
|
+
});
|
|
280
|
+
}
|
|
269
281
|
return (0, _jsxRuntime.jsx)(_antd.Select, (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
270
282
|
placeholder: _locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProSelect = _locale.default.ProSelect) === null || _locale$ProSelect === void 0 ? void 0 : _locale$ProSelect.select,
|
|
271
283
|
allowClear: true,
|
|
@@ -288,7 +300,7 @@ var ProSelect = exports.ProSelect = function ProSelect(props, ref) {
|
|
|
288
300
|
}
|
|
289
301
|
}, (0, _lodash.omit)((0, _lodash.cloneDeep)(selectProps), ['isView', 'showCodeName', 'form', 'name'])), {}, {
|
|
290
302
|
value: transformValue(),
|
|
291
|
-
children: Array.isArray(
|
|
303
|
+
children: Array.isArray(newSelectList) && newSelectList.map(function (item) {
|
|
292
304
|
return (0, _jsxRuntime.jsx)(Option, {
|
|
293
305
|
value: item[code],
|
|
294
306
|
record: item,
|
|
@@ -14,6 +14,8 @@ export interface PropSelectProps extends Omit<SelectProps, 'onSearch'> {
|
|
|
14
14
|
defaultOne?: boolean;
|
|
15
15
|
/** 数据源 */
|
|
16
16
|
dataSource?: DataOption[];
|
|
17
|
+
/** list场景中过滤掉已选择的值 */
|
|
18
|
+
filterInList?: boolean;
|
|
17
19
|
/** @deprecated 兼容 2.0 版本、3.0 使用view 模式 */
|
|
18
20
|
defaultDisableValue?: string;
|
|
19
21
|
/** 是否展示 tooltip、当 label 特别长的时候使用 */
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.getSelectList = void 0;
|
|
8
|
+
var _createForOfIteratorHelper2 = _interopRequireDefault(require("@babel/runtime/helpers/createForOfIteratorHelper"));
|
|
9
|
+
var _lodash = _interopRequireDefault(require("lodash"));
|
|
10
|
+
/* eslint-disable no-restricted-syntax */
|
|
11
|
+
|
|
12
|
+
var findSelectNameValues = function findSelectNameValues(_ref) {
|
|
13
|
+
var list = _ref.list,
|
|
14
|
+
selectName = _ref.selectName,
|
|
15
|
+
value = _ref.value,
|
|
16
|
+
dataSource = _ref.dataSource,
|
|
17
|
+
labelInValue = _ref.labelInValue;
|
|
18
|
+
var selectValues = [];
|
|
19
|
+
list.forEach(function (item) {
|
|
20
|
+
var result = item;
|
|
21
|
+
if (!item || !Object.keys(item).length || Object.keys(item).length === 1 && 'rowKey' in item) {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
var _iterator = (0, _createForOfIteratorHelper2.default)(selectName),
|
|
25
|
+
_step;
|
|
26
|
+
try {
|
|
27
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
28
|
+
var key = _step.value;
|
|
29
|
+
result = result[key];
|
|
30
|
+
}
|
|
31
|
+
} catch (err) {
|
|
32
|
+
_iterator.e(err);
|
|
33
|
+
} finally {
|
|
34
|
+
_iterator.f();
|
|
35
|
+
}
|
|
36
|
+
selectValues.push(result);
|
|
37
|
+
});
|
|
38
|
+
var diffList = _lodash.default.difference(selectValues, [value]);
|
|
39
|
+
return dataSource.filter(function (item) {
|
|
40
|
+
return !diffList.includes(labelInValue ? item : item.value);
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* 返回当前组件可以显示的数据源
|
|
45
|
+
*/
|
|
46
|
+
var getSelectList = exports.getSelectList = function getSelectList(_ref2) {
|
|
47
|
+
var otherProps = _ref2.otherProps,
|
|
48
|
+
value = _ref2.value,
|
|
49
|
+
dataSource = _ref2.dataSource,
|
|
50
|
+
labelInValue = _ref2.labelInValue;
|
|
51
|
+
if (!otherProps) {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
var listName = otherProps.listName,
|
|
55
|
+
form = otherProps.form;
|
|
56
|
+
var firstNumberIndex = listName.findIndex(function (item) {
|
|
57
|
+
return typeof item === 'number';
|
|
58
|
+
});
|
|
59
|
+
var fatherName = listName.slice(0, firstNumberIndex);
|
|
60
|
+
var selectName = listName.slice(firstNumberIndex + 1);
|
|
61
|
+
return findSelectNameValues({
|
|
62
|
+
list: form.getFieldValue(fatherName),
|
|
63
|
+
selectName: selectName,
|
|
64
|
+
value: value,
|
|
65
|
+
dataSource: dataSource,
|
|
66
|
+
labelInValue: labelInValue
|
|
67
|
+
});
|
|
68
|
+
};
|
|
@@ -409,13 +409,13 @@ var ProTreeSelect = exports.ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
|
409
409
|
}
|
|
410
410
|
return result;
|
|
411
411
|
}
|
|
412
|
-
var handleChange = function handleChange(newVal) {
|
|
412
|
+
var handleChange = function handleChange(newVal, label, extra) {
|
|
413
413
|
// newVal回来得一定是label、value
|
|
414
414
|
var result = newVal;
|
|
415
415
|
if (props === null || props === void 0 ? void 0 : props.labelInValue) {
|
|
416
416
|
result = getLabelByValue(selectList, newVal);
|
|
417
417
|
}
|
|
418
|
-
onChange && onChange(result,
|
|
418
|
+
onChange && onChange(result, label, extra);
|
|
419
419
|
// 重置搜索
|
|
420
420
|
showSearch && searchTreeEvent('');
|
|
421
421
|
};
|
|
@@ -488,7 +488,7 @@ var ProTreeSelect = exports.ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
|
488
488
|
allowClear: allowClear || true,
|
|
489
489
|
showArrow: true,
|
|
490
490
|
treeNodeFilterProp: treeNodeFilterProp,
|
|
491
|
-
virtual:
|
|
491
|
+
virtual: true
|
|
492
492
|
}, selectProps);
|
|
493
493
|
if (value === null) {
|
|
494
494
|
delete treeProps.value;
|
|
@@ -40,6 +40,12 @@
|
|
|
40
40
|
color: red;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
+
// 隐藏单选下拉树后面勾号
|
|
44
|
+
.@{ant-prefix}-select-tree-node-content-wrapper{
|
|
45
|
+
.check-mark-icon{
|
|
46
|
+
display: none;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
43
49
|
// 单选
|
|
44
50
|
&.signal-tree{
|
|
45
51
|
.@{ant-prefix}-select-tree{
|
|
@@ -63,14 +69,6 @@
|
|
|
63
69
|
display: block;
|
|
64
70
|
}
|
|
65
71
|
}
|
|
66
|
-
.@{ant-prefix}-select-tree-node-content-wrapper{
|
|
67
|
-
background-color: transparent;
|
|
68
|
-
&.@{ant-prefix}-select-tree-node-selected{
|
|
69
|
-
.check-mark-icon{
|
|
70
|
-
display: block;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
72
|
.@{ant-prefix}-select-tree-treenode:hover{
|
|
75
73
|
background-color: #f5f5f5;
|
|
76
74
|
}
|
|
@@ -348,3 +348,18 @@
|
|
|
348
348
|
height: 16px !important;
|
|
349
349
|
}
|
|
350
350
|
|
|
351
|
+
.pro-tree-select, .pro-tree-select-drop-down-container{
|
|
352
|
+
.@{ant-prefix}-select-selector{
|
|
353
|
+
.check-mark-icon{
|
|
354
|
+
display: none;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
&.@{ant-prefix}-select-dropdown{
|
|
358
|
+
// 隐藏单选下拉树后面勾号
|
|
359
|
+
.@{ant-prefix}-select-tree-node-content-wrapper{
|
|
360
|
+
.check-mark-icon{
|
|
361
|
+
display: none;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
package/lib/ProUpload/index.js
CHANGED
|
@@ -182,10 +182,6 @@ var ProUpload = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
182
182
|
* @return {*}
|
|
183
183
|
*/
|
|
184
184
|
var handleBeforeUpload = function handleBeforeUpload(file, fileList) {
|
|
185
|
-
if (!(0, _lodash.isFunction)(beforeUpload)) {
|
|
186
|
-
return false;
|
|
187
|
-
}
|
|
188
|
-
// TODO
|
|
189
185
|
if (!(0, _uitls.validateFileExt)(extExt, file)) {
|
|
190
186
|
var _locale$ProUpload2;
|
|
191
187
|
_antd.message.error("".concat(_locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProUpload2 = _locale.default.ProUpload) === null || _locale$ProUpload2 === void 0 ? void 0 : _locale$ProUpload2.errorInfoExt, "\u3010").concat(extExt.join('、'), "\u3011"));
|
|
@@ -196,7 +192,9 @@ var ProUpload = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
196
192
|
_antd.message.error("".concat(_locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProUpload3 = _locale.default.ProUpload) === null || _locale$ProUpload3 === void 0 ? void 0 : _locale$ProUpload3.errorInfoSize).concat(size, "M"));
|
|
197
193
|
return false;
|
|
198
194
|
}
|
|
199
|
-
|
|
195
|
+
if (beforeUpload) {
|
|
196
|
+
return beforeUpload(file, fileList);
|
|
197
|
+
}
|
|
200
198
|
};
|
|
201
199
|
var handleRemove = function handleRemove(file) {
|
|
202
200
|
var nextList = _fileList.slice();
|
|
@@ -251,7 +249,8 @@ var ProUpload = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
251
249
|
showUploadList: showUploadList,
|
|
252
250
|
method: method,
|
|
253
251
|
accept: accept,
|
|
254
|
-
data: (0, _objectSpread2.default)({}, dataParams)
|
|
252
|
+
data: (0, _objectSpread2.default)({}, dataParams),
|
|
253
|
+
name: name
|
|
255
254
|
}, residueProps);
|
|
256
255
|
var baseProps = {
|
|
257
256
|
isView: isView,
|
package/lib/global.less
CHANGED
|
@@ -5,37 +5,33 @@ pre {
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
* {
|
|
8
|
-
// 火狐浏览器
|
|
9
|
-
scrollbar-width: thin;
|
|
10
|
-
scrollbar-color: #d2d3d7 transparent;
|
|
11
8
|
// ie浏览器
|
|
12
9
|
scrollbar-face-color: #d2d3d7;
|
|
13
10
|
scrollbar-highlight-color: #979797;
|
|
14
11
|
scrollbar-3dlight-color: #979797;
|
|
15
|
-
|
|
12
|
+
::-webkit-scrollbar {
|
|
13
|
+
width: 16px;
|
|
14
|
+
}
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
// // 滑块
|
|
17
|
+
::-webkit-scrollbar-thumb {
|
|
18
|
+
background-color: #d2d3d7;
|
|
19
|
+
background-clip: padding-box;
|
|
20
|
+
border-color: transparent;
|
|
21
|
+
border-style: dashed;
|
|
22
|
+
border-width: 4px;
|
|
23
|
+
border-radius: 10px;
|
|
24
|
+
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0);
|
|
25
|
+
}
|
|
20
26
|
|
|
21
|
-
//
|
|
22
|
-
::-webkit-scrollbar-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
border-style: dashed;
|
|
27
|
-
border-width: 4px;
|
|
28
|
-
border-radius: 10px;
|
|
29
|
-
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
// 轨道
|
|
33
|
-
::-webkit-scrollbar-track {
|
|
34
|
-
background-color: transparent;
|
|
35
|
-
border-radius: 10px;
|
|
36
|
-
}
|
|
27
|
+
// 轨道
|
|
28
|
+
::-webkit-scrollbar-track {
|
|
29
|
+
background-color: transparent;
|
|
30
|
+
border-radius: 10px;
|
|
31
|
+
}
|
|
37
32
|
|
|
38
|
-
// 悬浮轨道
|
|
39
|
-
::-webkit-scrollbar-thumb:hover {
|
|
40
|
-
|
|
33
|
+
// 悬浮轨道
|
|
34
|
+
::-webkit-scrollbar-thumb:hover {
|
|
35
|
+
background-color: #979797;
|
|
36
|
+
}
|
|
41
37
|
}
|