@zat-design/sisyphus-react 3.4.9 → 3.4.10-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.css +56 -52
- package/dist/less.esm.css +56 -52
- package/es/ProEditTable/components/RenderField/index.js +20 -1
- package/es/ProEditTable/propsType.d.ts +2 -2
- package/es/ProEditTable/utils/index.js +1 -0
- package/es/ProEnum/components/Group.d.ts +1 -0
- package/es/ProEnum/index.js +11 -5
- package/es/ProEnum/style/index.less +2 -2
- package/es/ProForm/components/base/InputNumber/index.js +4 -1
- package/es/ProForm/components/combination/FormList/components/ActionButton.js +49 -9
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +45 -7
- package/es/ProForm/components/combination/Group/component/AddonWrapper/index.d.ts +8 -0
- package/es/ProForm/components/combination/Group/component/AddonWrapper/index.js +18 -0
- package/es/ProForm/components/combination/Group/component/AddonWrapper/index.less +10 -0
- package/es/ProForm/components/combination/Group/component/ComRender.d.ts +2 -0
- package/es/ProForm/components/combination/Group/component/ComRender.js +29 -13
- package/es/ProForm/components/combination/Group/index.d.ts +2 -2
- package/es/ProForm/components/combination/Group/index.js +5 -5
- package/es/ProForm/components/combination/Group/utils.js +3 -2
- package/es/ProForm/components/combination/ProCascader/index.js +2 -2
- package/es/ProForm/components/combination/ProCascader/utils/index.js +8 -3
- package/es/ProForm/components/combination/ProModalSelect/index.js +1 -1
- package/es/ProForm/components/combination/ProRangeLimit/index.js +6 -2
- package/es/ProForm/components/render/RenderFields.js +4 -1
- package/es/ProForm/utils/useForm.js +11 -1
- package/es/ProLayout/components/ProCollapse/style/index.less +5 -2
- package/es/ProLayout/style/index.less +1 -1
- package/es/ProSelect/index.js +6 -3
- package/es/ProSelect/utils/index.d.ts +2 -1
- package/es/ProSelect/utils/index.js +9 -6
- package/es/ProTree/components/ProTree.js +18 -10
- package/es/ProTree/components/Tree.js +15 -7
- package/es/ProTree/index.js +2 -1
- package/es/ProTree/propsType.d.ts +5 -0
- package/es/ProUpload/style/index.less +101 -111
- package/lib/ProEditTable/components/RenderField/index.js +20 -1
- package/lib/ProEditTable/propsType.d.ts +2 -2
- package/lib/ProEditTable/utils/index.js +1 -0
- package/lib/ProEnum/components/Group.d.ts +1 -0
- package/lib/ProEnum/index.js +11 -5
- package/lib/ProEnum/style/index.less +2 -2
- package/lib/ProForm/components/base/InputNumber/index.js +4 -1
- package/lib/ProForm/components/combination/FormList/components/ActionButton.js +49 -9
- package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +45 -7
- package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.d.ts +8 -0
- package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.js +24 -0
- package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.less +10 -0
- package/lib/ProForm/components/combination/Group/component/ComRender.d.ts +2 -0
- package/lib/ProForm/components/combination/Group/component/ComRender.js +31 -15
- package/lib/ProForm/components/combination/Group/index.d.ts +2 -2
- package/lib/ProForm/components/combination/Group/index.js +5 -5
- package/lib/ProForm/components/combination/Group/utils.js +3 -2
- package/lib/ProForm/components/combination/ProCascader/index.js +1 -1
- package/lib/ProForm/components/combination/ProCascader/utils/index.js +8 -3
- package/lib/ProForm/components/combination/ProModalSelect/index.js +1 -1
- package/lib/ProForm/components/combination/ProRangeLimit/index.js +6 -2
- package/lib/ProForm/components/render/RenderFields.js +4 -1
- package/lib/ProForm/utils/useForm.js +11 -1
- package/lib/ProLayout/components/ProCollapse/style/index.less +5 -2
- package/lib/ProLayout/style/index.less +1 -1
- package/lib/ProSelect/index.js +6 -3
- package/lib/ProSelect/utils/index.d.ts +2 -1
- package/lib/ProSelect/utils/index.js +9 -6
- package/lib/ProTree/components/ProTree.js +17 -9
- package/lib/ProTree/components/Tree.js +15 -7
- package/lib/ProTree/index.js +2 -1
- package/lib/ProTree/propsType.d.ts +5 -0
- package/lib/ProUpload/style/index.less +101 -111
- package/package.json +2 -2
- package/es/ProForm/components/combination/_Group/index.d.ts +0 -4
- package/es/ProForm/components/combination/_Group/index.js +0 -109
- package/es/ProForm/components/combination/_Group/propsType.d.ts +0 -35
- package/es/ProForm/components/combination/_Group/propsType.js +0 -1
- package/es/ProForm/components/combination/_Group/style/index.less +0 -131
- package/es/ProForm/components/combination/_Group/utils.d.ts +0 -10
- package/es/ProForm/components/combination/_Group/utils.js +0 -46
- package/lib/ProForm/components/combination/_Group/index.d.ts +0 -4
- package/lib/ProForm/components/combination/_Group/index.js +0 -113
- package/lib/ProForm/components/combination/_Group/propsType.d.ts +0 -35
- package/lib/ProForm/components/combination/_Group/propsType.js +0 -5
- package/lib/ProForm/components/combination/_Group/style/index.less +0 -131
- package/lib/ProForm/components/combination/_Group/utils.d.ts +0 -10
- package/lib/ProForm/components/combination/_Group/utils.js +0 -53
package/lib/ProSelect/index.js
CHANGED
|
@@ -24,10 +24,11 @@ require("./index.less");
|
|
|
24
24
|
var _excluded = ["dataSource", "defaultDisableValue", "useRequest", "fieldNames", "tooltip", "otherProps", "labelInValue", "filterInList", "scrollFollowParent", "defaultOne", "onSearch", "optionRender", "onChange", "updateDataSource", "transformResponse", "isView"];
|
|
25
25
|
var Option = _antd.Select.Option;
|
|
26
26
|
var ProSelect = exports.ProSelect = function ProSelect(props, ref) {
|
|
27
|
-
var _locale$ProSelect;
|
|
27
|
+
var _selectProps$showCode, _locale$ProSelect;
|
|
28
28
|
var _ref = (0, _ProConfigProvider.useProConfig)('ProSelect') || {},
|
|
29
29
|
_ref$fieldNames = _ref.fieldNames,
|
|
30
|
-
proSelectFieldNames = _ref$fieldNames === void 0 ? {} : _ref$fieldNames
|
|
30
|
+
proSelectFieldNames = _ref$fieldNames === void 0 ? {} : _ref$fieldNames,
|
|
31
|
+
showCodeName = _ref.showCodeName;
|
|
31
32
|
var label = 'label';
|
|
32
33
|
var code = 'value';
|
|
33
34
|
if (proSelectFieldNames && Object.keys(proSelectFieldNames).length) {
|
|
@@ -55,6 +56,7 @@ var ProSelect = exports.ProSelect = function ProSelect(props, ref) {
|
|
|
55
56
|
transformResponse = props.transformResponse,
|
|
56
57
|
isViewPro = props.isView,
|
|
57
58
|
selectProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
59
|
+
selectProps.showCodeName = (_selectProps$showCode = selectProps.showCodeName) !== null && _selectProps$showCode !== void 0 ? _selectProps$showCode : showCodeName;
|
|
58
60
|
var value = props.value;
|
|
59
61
|
var _ref2 = _.ProForm.useFieldProps() || {},
|
|
60
62
|
isViewCon = _ref2.isView,
|
|
@@ -275,7 +277,8 @@ var ProSelect = exports.ProSelect = function ProSelect(props, ref) {
|
|
|
275
277
|
otherProps: otherProps,
|
|
276
278
|
value: props.value,
|
|
277
279
|
dataSource: selectList,
|
|
278
|
-
labelInValue: labelInValue
|
|
280
|
+
labelInValue: labelInValue,
|
|
281
|
+
fieldNames: fieldNames
|
|
279
282
|
});
|
|
280
283
|
}
|
|
281
284
|
return (0, _jsxRuntime.jsx)(_antd.Select, (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 返回当前组件可以显示的数据源
|
|
3
3
|
*/
|
|
4
|
-
export declare const getSelectList: ({ otherProps, value, dataSource, labelInValue, }: {
|
|
4
|
+
export declare const getSelectList: ({ otherProps, value, dataSource, labelInValue, fieldNames, }: {
|
|
5
5
|
otherProps: any;
|
|
6
6
|
value: any;
|
|
7
7
|
dataSource: any;
|
|
8
8
|
labelInValue: any;
|
|
9
|
+
fieldNames: any;
|
|
9
10
|
}) => any;
|
|
@@ -14,7 +14,8 @@ var findSelectNameValues = function findSelectNameValues(_ref) {
|
|
|
14
14
|
selectName = _ref.selectName,
|
|
15
15
|
value = _ref.value,
|
|
16
16
|
dataSource = _ref.dataSource,
|
|
17
|
-
labelInValue = _ref.labelInValue
|
|
17
|
+
labelInValue = _ref.labelInValue,
|
|
18
|
+
fieldNames = _ref.fieldNames;
|
|
18
19
|
var selectValues = [];
|
|
19
20
|
list.forEach(function (item) {
|
|
20
21
|
var result = item;
|
|
@@ -37,7 +38,7 @@ var findSelectNameValues = function findSelectNameValues(_ref) {
|
|
|
37
38
|
});
|
|
38
39
|
var diffList = _lodash.default.difference(selectValues, [value]);
|
|
39
40
|
return dataSource.filter(function (item) {
|
|
40
|
-
return !diffList.includes(labelInValue ? item : item.value);
|
|
41
|
+
return !diffList.includes(labelInValue ? item : item[fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value] || (item === null || item === void 0 ? void 0 : item.value));
|
|
41
42
|
});
|
|
42
43
|
};
|
|
43
44
|
/**
|
|
@@ -47,15 +48,16 @@ var getSelectList = exports.getSelectList = function getSelectList(_ref2) {
|
|
|
47
48
|
var otherProps = _ref2.otherProps,
|
|
48
49
|
value = _ref2.value,
|
|
49
50
|
dataSource = _ref2.dataSource,
|
|
50
|
-
labelInValue = _ref2.labelInValue
|
|
51
|
+
labelInValue = _ref2.labelInValue,
|
|
52
|
+
fieldNames = _ref2.fieldNames;
|
|
51
53
|
if (!otherProps) {
|
|
52
54
|
return null;
|
|
53
55
|
}
|
|
54
56
|
var listName = otherProps.listName,
|
|
55
57
|
form = otherProps.form;
|
|
56
|
-
var firstNumberIndex = listName.
|
|
58
|
+
var firstNumberIndex = listName.lastIndexOf(listName.findLast(function (item) {
|
|
57
59
|
return typeof item === 'number';
|
|
58
|
-
});
|
|
60
|
+
}));
|
|
59
61
|
var fatherName = listName.slice(0, firstNumberIndex);
|
|
60
62
|
var selectName = listName.slice(firstNumberIndex + 1);
|
|
61
63
|
return findSelectNameValues({
|
|
@@ -63,6 +65,7 @@ var getSelectList = exports.getSelectList = function getSelectList(_ref2) {
|
|
|
63
65
|
selectName: selectName,
|
|
64
66
|
value: value,
|
|
65
67
|
dataSource: dataSource,
|
|
66
|
-
labelInValue: labelInValue
|
|
68
|
+
labelInValue: labelInValue,
|
|
69
|
+
fieldNames: fieldNames
|
|
67
70
|
});
|
|
68
71
|
};
|
|
@@ -88,11 +88,18 @@ var ProTree = function ProTree(props) {
|
|
|
88
88
|
checkAll: false,
|
|
89
89
|
allKeys: [],
|
|
90
90
|
clickShowLoading: false,
|
|
91
|
-
innerExpandKeys:
|
|
91
|
+
innerExpandKeys: undefined // 将传入德默认展开德节点传入内部state德innerExpandKeys上面,后续由innerExpandKeys控制展开节点
|
|
92
92
|
}),
|
|
93
93
|
_useSetState2 = (0, _slicedToArray2.default)(_useSetState, 2),
|
|
94
94
|
state = _useSetState2[0],
|
|
95
95
|
setState = _useSetState2[1];
|
|
96
|
+
(0, _react.useEffect)(function () {
|
|
97
|
+
if (expandedKeys) {
|
|
98
|
+
setState({
|
|
99
|
+
innerExpandKeys: expandedKeys
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
}, [expandedKeys]);
|
|
96
103
|
var fetchFunction = (0, _ahooks.useRequest)(useRequest === null || useRequest === void 0 ? void 0 : useRequest.service, (0, _objectSpread2.default)({
|
|
97
104
|
manual: true,
|
|
98
105
|
onSuccess: function onSuccess(res) {
|
|
@@ -104,8 +111,8 @@ var ProTree = function ProTree(props) {
|
|
|
104
111
|
treeData: responseData,
|
|
105
112
|
originalTreeData: responseData,
|
|
106
113
|
flatTreeData: flatTrees,
|
|
107
|
-
allKeys: allKey
|
|
108
|
-
innerExpandKeys:
|
|
114
|
+
allKeys: allKey
|
|
115
|
+
// innerExpandKeys: props?.expandedKeys ? props?.expandedKeys : getDefaultExpandKeys(defaultExpandAll, allKey),
|
|
109
116
|
});
|
|
110
117
|
} else {
|
|
111
118
|
var _res$status = res.status,
|
|
@@ -122,8 +129,8 @@ var ProTree = function ProTree(props) {
|
|
|
122
129
|
treeData: data,
|
|
123
130
|
originalTreeData: data,
|
|
124
131
|
flatTreeData: _flatTrees,
|
|
125
|
-
allKeys: _allKey
|
|
126
|
-
innerExpandKeys:
|
|
132
|
+
allKeys: _allKey
|
|
133
|
+
// innerExpandKeys: props?.expandedKeys ? props?.expandedKeys : getDefaultExpandKeys(defaultExpandAll, allKey),
|
|
127
134
|
});
|
|
128
135
|
}
|
|
129
136
|
},
|
|
@@ -136,8 +143,8 @@ var ProTree = function ProTree(props) {
|
|
|
136
143
|
treeData: dataSource,
|
|
137
144
|
originalTreeData: (0, _lodash.cloneDeep)(dataSource),
|
|
138
145
|
flatTreeData: (0, _utils.getFlatTreeData)(dataSource, fieldNames),
|
|
139
|
-
allKeys: allKey
|
|
140
|
-
innerExpandKeys:
|
|
146
|
+
allKeys: allKey
|
|
147
|
+
// innerExpandKeys: props?.expandedKeys ? props?.expandedKeys : getDefaultExpandKeys(defaultExpandAll, allKey),
|
|
141
148
|
});
|
|
142
149
|
} else if (enumCode) {
|
|
143
150
|
var dictEnum = dics[enumCode] || [];
|
|
@@ -155,8 +162,8 @@ var ProTree = function ProTree(props) {
|
|
|
155
162
|
treeData: dictEnum,
|
|
156
163
|
originalTreeData: (0, _lodash.cloneDeep)(dictEnum),
|
|
157
164
|
flatTreeData: (0, _utils.getFlatTreeData)(dictEnum, fieldNames),
|
|
158
|
-
allKeys: (0, _utils.getAllKeys)(dictEnum, fieldNames)
|
|
159
|
-
innerExpandKeys:
|
|
165
|
+
allKeys: (0, _utils.getAllKeys)(dictEnum, fieldNames)
|
|
166
|
+
// innerExpandKeys: props?.expandedKeys ? props?.expandedKeys : getDefaultExpandKeys(defaultExpandAll, allKey),
|
|
160
167
|
});
|
|
161
168
|
}
|
|
162
169
|
}, [dataSource, enumCode]);
|
|
@@ -455,6 +462,7 @@ var ProTree = function ProTree(props) {
|
|
|
455
462
|
originalTreeData: state.originalTreeData,
|
|
456
463
|
flatTreeData: state.flatTreeData,
|
|
457
464
|
checkedValues: state.checkedValues,
|
|
465
|
+
defaultExpandAll: defaultExpandAll,
|
|
458
466
|
innerExpandKeys: state === null || state === void 0 ? void 0 : state.innerExpandKeys,
|
|
459
467
|
optionRender: optionRender,
|
|
460
468
|
searchStr: state.searchStr,
|
|
@@ -62,7 +62,7 @@ function List(props) {
|
|
|
62
62
|
var fieldNameLabel = fieldNames.label;
|
|
63
63
|
var fieldNameValue = fieldNames.value;
|
|
64
64
|
var _useSetState = (0, _ahooks.useSetState)({
|
|
65
|
-
expandedKeys:
|
|
65
|
+
expandedKeys: undefined,
|
|
66
66
|
autoExpandParent: true,
|
|
67
67
|
currentClickTreeNode: null,
|
|
68
68
|
handing: false
|
|
@@ -92,9 +92,11 @@ function List(props) {
|
|
|
92
92
|
}
|
|
93
93
|
}, [searchStr]);
|
|
94
94
|
(0, _react.useEffect)(function () {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
if (innerExpandKeys) {
|
|
96
|
+
setState({
|
|
97
|
+
expandedKeys: innerExpandKeys
|
|
98
|
+
});
|
|
99
|
+
}
|
|
98
100
|
}, [innerExpandKeys]);
|
|
99
101
|
(0, _react.useEffect)(function () {
|
|
100
102
|
if (!checkable) {
|
|
@@ -342,23 +344,29 @@ function List(props) {
|
|
|
342
344
|
return loop(newTreeData, -1);
|
|
343
345
|
}
|
|
344
346
|
var _treeData = fn();
|
|
345
|
-
var onExpand = function onExpand(newExpandedKeys) {
|
|
347
|
+
var onExpand = function onExpand(newExpandedKeys, nextPara) {
|
|
346
348
|
setState({
|
|
347
349
|
expandedKeys: newExpandedKeys,
|
|
348
350
|
autoExpandParent: false
|
|
349
351
|
});
|
|
352
|
+
if (other.onExpand) {
|
|
353
|
+
other.onExpand(newExpandedKeys, nextPara);
|
|
354
|
+
}
|
|
350
355
|
};
|
|
351
356
|
var others = other;
|
|
357
|
+
var additionProps = {};
|
|
358
|
+
if (expandedKeys) {
|
|
359
|
+
additionProps.expandedKeys = expandedKeys;
|
|
360
|
+
}
|
|
352
361
|
return (0, _jsxRuntime.jsx)("div", {
|
|
353
362
|
className: disabledMode === 'hide' ? 'hide-disable-node' : '',
|
|
354
|
-
children: (_treeData === null || _treeData === void 0 ? void 0 : _treeData.length) ? (0, _jsxRuntime.jsx)(_antd.Tree, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, others), {}, {
|
|
363
|
+
children: (_treeData === null || _treeData === void 0 ? void 0 : _treeData.length) ? (0, _jsxRuntime.jsx)(_antd.Tree, (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, others), expandedKeys), {}, {
|
|
355
364
|
disabled: disabled,
|
|
356
365
|
style: {
|
|
357
366
|
width: '100%'
|
|
358
367
|
},
|
|
359
368
|
treeData: _treeData,
|
|
360
369
|
onExpand: onExpand,
|
|
361
|
-
expandedKeys: expandedKeys,
|
|
362
370
|
autoExpandParent: autoExpandParent,
|
|
363
371
|
selectable: false,
|
|
364
372
|
onCheck: onCheck,
|
package/lib/ProTree/index.js
CHANGED
|
@@ -22,7 +22,8 @@ var ProTreeHandle = function ProTreeHandle(props) {
|
|
|
22
22
|
mode = _props$mode === void 0 ? 'tree' : _props$mode;
|
|
23
23
|
if (mode === 'treeSelect') {
|
|
24
24
|
var adaptorProps = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
25
|
-
treeCheckable: props === null || props === void 0 ? void 0 : props.checkable
|
|
25
|
+
treeCheckable: props === null || props === void 0 ? void 0 : props.checkable,
|
|
26
|
+
treeCheckStrictly: props === null || props === void 0 ? void 0 : props.checkStrictly
|
|
26
27
|
});
|
|
27
28
|
return (0, _jsxRuntime.jsx)(_ProTreeSelect.default, (0, _objectSpread2.default)({}, adaptorProps));
|
|
28
29
|
}
|
|
@@ -65,6 +65,11 @@ export interface ProTreeProps extends PropTreeSelectProps {
|
|
|
65
65
|
onSelect?: (values: string[] | AllValueType, info?: any) => any;
|
|
66
66
|
/** 复选情况下点击checkbox触发,参照antd */
|
|
67
67
|
onCheck?: (values: string[] | AllValueType, info?: any) => any;
|
|
68
|
+
onExpand?: (newExpandedKeys: React.Key[], nextPara: {
|
|
69
|
+
expanded: boolean;
|
|
70
|
+
node: DataOption;
|
|
71
|
+
nativeEvent: PointerEvent;
|
|
72
|
+
}) => void;
|
|
68
73
|
/** 自定义展示 */
|
|
69
74
|
optionRender?: (item: any, searchStr: string) => string | ReactNode;
|
|
70
75
|
/** 对后台返回数据进行格式化 */
|
|
@@ -7,70 +7,67 @@
|
|
|
7
7
|
// 拖拽上传
|
|
8
8
|
.pro-upload-dragger {
|
|
9
9
|
.pro-upload-handle-box {
|
|
10
|
-
|
|
10
|
+
padding: var(--zaui-space-size-sm, 8px);
|
|
11
|
+
background: #f8f9fa;
|
|
11
12
|
border-radius: var(--zaui-border-radius, 8px);
|
|
12
|
-
padding : var(--zaui-space-size-sm, 8px);
|
|
13
13
|
|
|
14
14
|
.@{ant-prefix}-upload.@{ant-prefix}-upload-drag {
|
|
15
15
|
background-color: var(--zaui-base-bg, #fff);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
.drag-upload-inner {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
display : flex;
|
|
22
|
-
align-items : center;
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
23
21
|
justify-content: center;
|
|
22
|
+
min-width: 392px;
|
|
23
|
+
height: 110px;
|
|
24
24
|
|
|
25
25
|
.upload-dragger-control {
|
|
26
26
|
background-color: var(--zaui-base-bg, #fff);
|
|
27
27
|
|
|
28
28
|
.dragger-txt-line1 {
|
|
29
|
-
display
|
|
30
|
-
line-height: 26px;
|
|
29
|
+
display: flex;
|
|
31
30
|
align-items: center;
|
|
31
|
+
line-height: 26px;
|
|
32
32
|
|
|
33
33
|
.icon-upload {
|
|
34
|
-
display
|
|
34
|
+
display: inline-block;
|
|
35
|
+
color: #c5c7cd;
|
|
35
36
|
font-size: 30px;
|
|
36
|
-
color : #C5C7CD;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.dragger-txt {
|
|
40
40
|
margin-left: 9px;
|
|
41
|
-
font-size : var(--zaui-font-size, 14px);
|
|
42
41
|
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
color: rgba(0, 0, 0, 0.85);
|
|
43
|
+
font-size: var(--zaui-font-size, 14px);
|
|
45
44
|
line-height: 20px;
|
|
46
45
|
}
|
|
47
46
|
|
|
48
47
|
.click-txt {
|
|
49
|
-
color: var(--zaui-brand, #
|
|
48
|
+
color: var(--zaui-brand, #006aff);
|
|
50
49
|
}
|
|
51
50
|
}
|
|
52
51
|
|
|
53
52
|
.file-ext {
|
|
54
|
-
text-align: center;
|
|
55
53
|
margin-top: 10px;
|
|
56
|
-
font-size : var(--zaui-font-size-sm, 12px);
|
|
57
54
|
|
|
58
|
-
|
|
59
|
-
|
|
55
|
+
color: #939599;
|
|
56
|
+
font-size: var(--zaui-font-size-sm, 12px);
|
|
60
57
|
line-height: 14px;
|
|
61
|
-
|
|
58
|
+
text-align: center;
|
|
62
59
|
}
|
|
63
60
|
}
|
|
64
61
|
|
|
65
62
|
// 单个文件展示样式
|
|
66
63
|
.dragger-single-file {
|
|
67
|
-
display
|
|
64
|
+
display: flex;
|
|
65
|
+
flex-direction: column;
|
|
68
66
|
justify-content: center;
|
|
69
|
-
|
|
70
|
-
padding : 0 var(--zaui-space-size-lg, 32px);
|
|
67
|
+
padding: 0 var(--zaui-space-size-lg, 32px);
|
|
71
68
|
|
|
72
69
|
.file-type-icon {
|
|
73
|
-
width
|
|
70
|
+
width: 18px;
|
|
74
71
|
height: 22px;
|
|
75
72
|
margin: 0 auto;
|
|
76
73
|
}
|
|
@@ -79,21 +76,20 @@
|
|
|
79
76
|
padding: 0 var(--zaui-space-size-lg, 32px);
|
|
80
77
|
}
|
|
81
78
|
|
|
82
|
-
|
|
83
79
|
.file-info-box {
|
|
80
|
+
display: flex;
|
|
84
81
|
margin-top: 11px;
|
|
85
|
-
display : flex;
|
|
86
82
|
|
|
87
83
|
&.file-box-error {
|
|
88
84
|
color: var(--zaui-danger);
|
|
89
85
|
}
|
|
90
86
|
|
|
91
87
|
.file-name {
|
|
92
|
-
display
|
|
93
|
-
overflow
|
|
88
|
+
display: box;
|
|
89
|
+
overflow: hidden;
|
|
90
|
+
word-break: break-all;
|
|
94
91
|
line-clamp: 1;
|
|
95
92
|
box-orient: vertical;
|
|
96
|
-
word-break: break-all;
|
|
97
93
|
}
|
|
98
94
|
|
|
99
95
|
.file-ext {
|
|
@@ -104,148 +100,143 @@
|
|
|
104
100
|
word-break: keep-all;
|
|
105
101
|
}
|
|
106
102
|
|
|
107
|
-
|
|
108
103
|
.file-download {
|
|
109
104
|
margin-left: var(--zaui-space-size-sm, 8px);
|
|
110
105
|
}
|
|
111
106
|
}
|
|
112
107
|
|
|
113
108
|
.file-action-box {
|
|
114
|
-
display
|
|
109
|
+
display: flex;
|
|
115
110
|
justify-content: center;
|
|
116
|
-
margin-top
|
|
117
|
-
|
|
111
|
+
margin-top: 3px;
|
|
112
|
+
color: #1890ff;
|
|
113
|
+
& > div {
|
|
114
|
+
cursor: pointer;
|
|
115
|
+
}
|
|
118
116
|
.file-del {
|
|
119
|
-
margin-left: 30px
|
|
117
|
+
margin-left: 30px;
|
|
120
118
|
}
|
|
121
119
|
}
|
|
122
120
|
}
|
|
123
|
-
|
|
124
121
|
}
|
|
125
122
|
}
|
|
126
|
-
|
|
127
123
|
}
|
|
128
124
|
|
|
129
125
|
// 按钮上传
|
|
130
126
|
.pro-upload-button {
|
|
131
127
|
display: flex;
|
|
132
128
|
|
|
133
|
-
>span {
|
|
134
|
-
width : 100%;
|
|
129
|
+
> span {
|
|
135
130
|
display: block;
|
|
131
|
+
width: 100%;
|
|
136
132
|
}
|
|
137
133
|
|
|
138
134
|
.pro-upload-button-inner {
|
|
139
135
|
display: flex;
|
|
140
136
|
|
|
141
137
|
.pro-upload-button-inner-right {
|
|
142
|
-
line-height: 32px;
|
|
143
138
|
margin-left: 10px;
|
|
139
|
+
line-height: 32px;
|
|
144
140
|
}
|
|
145
141
|
}
|
|
146
142
|
|
|
147
143
|
.upload-tip-txt {
|
|
148
144
|
margin-left: 10px;
|
|
149
|
-
line-height: 32px;
|
|
150
|
-
font-size : var(--zaui-font-size-sm, 12px);
|
|
151
|
-
|
|
152
145
|
|
|
153
146
|
color: #939599;
|
|
147
|
+
font-size: var(--zaui-font-size-sm, 12px);
|
|
148
|
+
line-height: 32px;
|
|
154
149
|
}
|
|
155
150
|
}
|
|
156
151
|
|
|
157
|
-
|
|
158
152
|
// 图片
|
|
159
153
|
.pro-upload-image {
|
|
160
|
-
|
|
161
154
|
position: relative;
|
|
162
|
-
display
|
|
155
|
+
display: inline-flex;
|
|
163
156
|
|
|
164
157
|
.@{ant-prefix}-upload-list-picture-card-container,
|
|
165
158
|
.@{ant-prefix}-upload-select-picture-card {
|
|
166
|
-
width
|
|
159
|
+
width: 126px;
|
|
167
160
|
height: 126px;
|
|
168
161
|
}
|
|
169
162
|
|
|
170
163
|
.image-example {
|
|
171
|
-
position
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
height
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
164
|
+
position: absolute;
|
|
165
|
+
top: 0;
|
|
166
|
+
right: -10px;
|
|
167
|
+
width: 88px;
|
|
168
|
+
height: 32px;
|
|
169
|
+
line-height: 32px;
|
|
170
|
+
text-align: center;
|
|
171
|
+
word-break: keep-all;
|
|
172
|
+
background: #ffffff;
|
|
173
|
+
border: 1px solid #dcdcdc;
|
|
181
174
|
border-radius: var(--zaui-border-radius, 8px);
|
|
182
|
-
|
|
183
|
-
|
|
175
|
+
transform: translate(100%, 0);
|
|
184
176
|
}
|
|
185
177
|
|
|
186
178
|
.file-item-image {
|
|
187
|
-
position
|
|
188
|
-
|
|
179
|
+
position: relative;
|
|
180
|
+
width: 126px;
|
|
189
181
|
// height : 100%;
|
|
190
|
-
height
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
border-radius
|
|
182
|
+
height: 126px;
|
|
183
|
+
overflow: hidden;
|
|
184
|
+
overflow: hidden;
|
|
185
|
+
border: 1px dashed #d9d9d9;
|
|
186
|
+
border-radius: 8px;
|
|
195
187
|
|
|
196
188
|
.file-type-icon-img {
|
|
197
|
-
position
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
189
|
+
position: absolute;
|
|
190
|
+
top: 50%;
|
|
191
|
+
left: 50%;
|
|
192
|
+
width: 30px;
|
|
201
193
|
transform: translate(-50%, -50%);
|
|
202
|
-
|
|
203
194
|
}
|
|
204
195
|
|
|
205
196
|
.image-con {
|
|
206
197
|
display: block;
|
|
207
|
-
width
|
|
208
|
-
height
|
|
198
|
+
width: 100%;
|
|
199
|
+
height: 100%;
|
|
209
200
|
}
|
|
210
201
|
|
|
211
202
|
&:hover .actions-wrap {
|
|
212
|
-
display
|
|
203
|
+
display: block;
|
|
213
204
|
background-color: rgba(0, 0, 0, 0.75);
|
|
214
205
|
}
|
|
215
206
|
|
|
216
207
|
.actions-wrap {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
bottom : 0;
|
|
208
|
+
position: absolute;
|
|
209
|
+
top: 0;
|
|
210
|
+
bottom: 0;
|
|
211
|
+
display: none;
|
|
212
|
+
width: 100%;
|
|
223
213
|
background-color: rgba(0, 0, 0, 0.5);
|
|
214
|
+
transition: all 2s;
|
|
224
215
|
|
|
225
216
|
.action-top {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
height : calc(100% - 36px);
|
|
217
|
+
display: flex;
|
|
218
|
+
flex: 1;
|
|
219
|
+
flex-direction: column;
|
|
220
|
+
align-items: center;
|
|
231
221
|
justify-content: center;
|
|
222
|
+
height: calc(100% - 36px);
|
|
232
223
|
}
|
|
233
224
|
|
|
234
225
|
.action-button {
|
|
235
|
-
height
|
|
226
|
+
height: 36px;
|
|
236
227
|
line-height: 36px;
|
|
237
|
-
|
|
238
|
-
|
|
228
|
+
text-align: center;
|
|
229
|
+
background: #ffffff;
|
|
239
230
|
}
|
|
240
231
|
|
|
241
232
|
.action-item {
|
|
242
|
-
color
|
|
233
|
+
color: #fff;
|
|
243
234
|
font-size: var(--zaui-font-size-sm, 12px);
|
|
244
|
-
opacity
|
|
235
|
+
opacity: 0.8;
|
|
245
236
|
|
|
246
237
|
.action-icon {
|
|
247
238
|
margin-right: 10px;
|
|
248
|
-
transform
|
|
239
|
+
transform: translate(0, 3px);
|
|
249
240
|
}
|
|
250
241
|
|
|
251
242
|
&:hover {
|
|
@@ -255,21 +246,21 @@
|
|
|
255
246
|
|
|
256
247
|
.action-button {
|
|
257
248
|
.action-item {
|
|
258
|
-
color: var(--zaui-danger, #
|
|
249
|
+
color: var(--zaui-danger, #ff005f);
|
|
259
250
|
}
|
|
260
251
|
}
|
|
261
252
|
}
|
|
262
253
|
}
|
|
263
254
|
|
|
264
255
|
.file-item-image.actions-wrap-error {
|
|
265
|
-
border: 1px solid #
|
|
256
|
+
border: 1px solid #ff005f;
|
|
266
257
|
}
|
|
267
258
|
|
|
268
259
|
.image-uploading {
|
|
269
|
-
|
|
270
|
-
display : flex;
|
|
260
|
+
display: flex;
|
|
271
261
|
align-items: center;
|
|
272
|
-
height
|
|
262
|
+
height: inherit;
|
|
263
|
+
padding: 20px;
|
|
273
264
|
}
|
|
274
265
|
}
|
|
275
266
|
|
|
@@ -289,38 +280,37 @@
|
|
|
289
280
|
}
|
|
290
281
|
|
|
291
282
|
.action-icon {
|
|
292
|
-
display
|
|
293
|
-
align-items
|
|
294
|
-
color
|
|
295
|
-
font-style
|
|
296
|
-
text-align
|
|
283
|
+
display: inline-flex;
|
|
284
|
+
align-items: center;
|
|
285
|
+
color: inherit;
|
|
286
|
+
font-style: normal;
|
|
287
|
+
text-align: center;
|
|
297
288
|
text-transform: none;
|
|
298
289
|
vertical-align: -0.15em;
|
|
299
290
|
text-rendering: optimizeLegibility;
|
|
300
291
|
|
|
301
292
|
span {
|
|
302
|
-
display
|
|
303
|
-
align-items
|
|
304
|
-
color
|
|
305
|
-
font-style
|
|
306
|
-
text-align
|
|
293
|
+
display: inline-flex;
|
|
294
|
+
align-items: center;
|
|
295
|
+
color: inherit;
|
|
296
|
+
font-style: normal;
|
|
297
|
+
text-align: center;
|
|
307
298
|
text-transform: none;
|
|
308
299
|
vertical-align: -0.15em;
|
|
309
300
|
text-rendering: optimizeLegibility;
|
|
310
301
|
}
|
|
311
|
-
|
|
312
302
|
}
|
|
313
303
|
}
|
|
314
304
|
}
|
|
315
305
|
|
|
316
306
|
.pro-upload-example {
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
min-height : 200px;
|
|
320
|
-
overflow-y : auto;
|
|
321
|
-
display : flex;
|
|
322
|
-
align-items : center;
|
|
307
|
+
display: flex;
|
|
308
|
+
align-items: center;
|
|
323
309
|
justify-content: center;
|
|
310
|
+
width: 100%;
|
|
311
|
+
min-height: 200px;
|
|
312
|
+
max-height: 400px;
|
|
313
|
+
overflow-y: auto;
|
|
324
314
|
}
|
|
325
315
|
|
|
326
316
|
.proupload-modal-preview {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zat-design/sisyphus-react",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.10-beta.2",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@dnd-kit/sortable": "^7.0.2",
|
|
59
59
|
"@dnd-kit/utilities": "^3.2.1",
|
|
60
60
|
"@pansy/react-watermark": "^3.1.13",
|
|
61
|
-
"@zat-design/utils": "^1.1.
|
|
61
|
+
"@zat-design/utils": "^1.1.22",
|
|
62
62
|
"ahooks": "3.7.4",
|
|
63
63
|
"antd": "4.24.8",
|
|
64
64
|
"big.js": "^6.2.1",
|