@pointcloud/pcloud-components 1.0.5 → 1.0.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/README.md +157 -157
- package/dist/esm/AdvancedFilter/styles/index.less +143 -143
- package/dist/esm/AnimatedScrollList/styles/index.less +22 -22
- package/dist/esm/CRUD/index.d.ts +4 -1
- package/dist/esm/CRUD/index.js +18 -7
- package/dist/esm/CRUD/index.less +156 -156
- package/dist/esm/ColorPicker/index.js +4 -4
- package/dist/esm/ContextMenu/index.less +61 -61
- package/dist/esm/DCascader/index.d.ts +1 -1
- package/dist/esm/DForm/DItem/index.js +15 -3
- package/dist/esm/DForm/DItem/itemType.d.ts +3 -2
- package/dist/esm/DForm/DItem/itemsRender.d.ts +1 -1
- package/dist/esm/DForm/DItem/itemsRender.js +6 -6
- package/dist/esm/DForm/index.js +6 -6
- package/dist/esm/DForm/index.less +50 -50
- package/dist/esm/DInput/index.js +6 -6
- package/dist/esm/DModal/styles/index.less +33 -33
- package/dist/esm/DRangePicker/index.less +30 -30
- package/dist/esm/DSelect/index.d.ts +1 -1
- package/dist/esm/DTable/index.d.ts +5 -1
- package/dist/esm/DTable/index.js +50 -11
- package/dist/esm/DTable/index.less +61 -61
- package/dist/esm/DUpload/helper.js +47 -47
- package/dist/esm/DUpload/index.js +6 -6
- package/dist/esm/DynamicFormItem/index.less +28 -28
- package/dist/esm/IPAddress/index.less +75 -75
- package/dist/esm/InfiniteScrollList/styles/index.less +24 -24
- package/dist/esm/Loading/styles/index.less +37 -37
- package/dist/esm/ModalTable/index.d.ts +3 -0
- package/dist/esm/ModalTable/index.js +95 -0
- package/dist/esm/ModalTable/interface.d.ts +23 -0
- package/dist/esm/ModalTable/interface.js +1 -0
- package/dist/esm/OrgTree/index.less +15 -15
- package/dist/esm/RCropper/index.js +5 -5
- package/dist/esm/RCropper/styles/toolbar.less +25 -25
- package/dist/esm/SignaturePad/style/index.less +47 -47
- package/dist/esm/TypewriterText/index.less +29 -29
- package/dist/esm/index.d.ts +3 -1
- package/dist/esm/index.js +1 -0
- package/dist/umd/pcloud-components.min.js +1 -1
- package/package.json +2 -2
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
@import '../commonStyle/index.less';
|
|
2
|
-
|
|
3
|
-
.@{prefix}-form {
|
|
4
|
-
.form-wrapper > .ant-form-item {
|
|
5
|
-
min-height: 32px;
|
|
6
|
-
margin-right: 0;
|
|
7
|
-
margin-bottom: 24px;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.ant-input-number,
|
|
11
|
-
.ant-picker {
|
|
12
|
-
width: 100%;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.@{prefix}-form.ant-form-vertical .form-wrapper > .ant-form-item:last-child,
|
|
17
|
-
.@{prefix}-form.ant-form-horizontal .form-wrapper > .ant-form-item:last-child {
|
|
18
|
-
margin-bottom: 0;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.@{prefix}-form.ant-form-horizontal .ant-form-item-label {
|
|
22
|
-
min-width: 80px;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.@{prefix}-form.ant-form-inline .form-wrapper,
|
|
26
|
-
.@{prefix}-form.ant-form-inline.inlineVertical .form-wrapper {
|
|
27
|
-
display: flex;
|
|
28
|
-
flex-wrap: wrap;
|
|
29
|
-
align-items: flex-end;
|
|
30
|
-
height: min-content;
|
|
31
|
-
flex: 1;
|
|
32
|
-
|
|
33
|
-
> .ant-form-item {
|
|
34
|
-
padding-right: 16px;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.@{prefix}-form.ant-form-inline.inlineVertical {
|
|
39
|
-
.ant-form-item-row {
|
|
40
|
-
flex-direction: column;
|
|
41
|
-
|
|
42
|
-
.ant-form-item-label {
|
|
43
|
-
text-align: left;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.grid-row {
|
|
48
|
-
flex: 1;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
1
|
+
@import '../commonStyle/index.less';
|
|
2
|
+
|
|
3
|
+
.@{prefix}-form {
|
|
4
|
+
.form-wrapper > .ant-form-item {
|
|
5
|
+
min-height: 32px;
|
|
6
|
+
margin-right: 0;
|
|
7
|
+
margin-bottom: 24px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.ant-input-number,
|
|
11
|
+
.ant-picker {
|
|
12
|
+
width: 100%;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.@{prefix}-form.ant-form-vertical .form-wrapper > .ant-form-item:last-child,
|
|
17
|
+
.@{prefix}-form.ant-form-horizontal .form-wrapper > .ant-form-item:last-child {
|
|
18
|
+
margin-bottom: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.@{prefix}-form.ant-form-horizontal .ant-form-item-label {
|
|
22
|
+
min-width: 80px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.@{prefix}-form.ant-form-inline .form-wrapper,
|
|
26
|
+
.@{prefix}-form.ant-form-inline.inlineVertical .form-wrapper {
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-wrap: wrap;
|
|
29
|
+
align-items: flex-end;
|
|
30
|
+
height: min-content;
|
|
31
|
+
flex: 1;
|
|
32
|
+
|
|
33
|
+
> .ant-form-item {
|
|
34
|
+
padding-right: 16px;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.@{prefix}-form.ant-form-inline.inlineVertical {
|
|
39
|
+
.ant-form-item-row {
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
|
|
42
|
+
.ant-form-item-label {
|
|
43
|
+
text-align: left;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.grid-row {
|
|
48
|
+
flex: 1;
|
|
49
|
+
}
|
|
50
|
+
}
|
package/dist/esm/DInput/index.js
CHANGED
|
@@ -2,12 +2,12 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
4
|
var _excluded = ["className", "onChange", "onCompositionStart", "onCompositionEnd", "value", "debounce", "enableCompose"];
|
|
5
|
-
/*
|
|
6
|
-
* @Author : wangfeihu
|
|
7
|
-
* @Date : 2023-05-16 10:08:26
|
|
8
|
-
* @LastEditors : wangfeihu
|
|
9
|
-
* @LastEditTime : 2023-08-16 16:48:52
|
|
10
|
-
* @Description : 基于antd的Input组件
|
|
5
|
+
/*
|
|
6
|
+
* @Author : wangfeihu
|
|
7
|
+
* @Date : 2023-05-16 10:08:26
|
|
8
|
+
* @LastEditors : wangfeihu
|
|
9
|
+
* @LastEditTime : 2023-08-16 16:48:52
|
|
10
|
+
* @Description : 基于antd的Input组件
|
|
11
11
|
*/
|
|
12
12
|
import React, { useRef, forwardRef, useState, useEffect, useContext, useCallback } from 'react';
|
|
13
13
|
import { Input } from 'antd';
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
@import '../../commonStyle/index.less';
|
|
2
|
-
|
|
3
|
-
.@{prefix}-modal-container {
|
|
4
|
-
.ant-modal-wrap {
|
|
5
|
-
.ant-modal {
|
|
6
|
-
max-width: unset;
|
|
7
|
-
height: 100%;
|
|
8
|
-
|
|
9
|
-
.ant-modal-content {
|
|
10
|
-
width: 100%;
|
|
11
|
-
height: 100%;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.@{prefix}-absolute-modal-container {
|
|
18
|
-
.ant-modal-wrap {
|
|
19
|
-
position: fixed;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.@{prefix}-fixed-modal-container {
|
|
24
|
-
.ant-modal-wrap {
|
|
25
|
-
position: fixed;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.@{prefix}-relative-modal-container {
|
|
30
|
-
.ant-modal-wrap {
|
|
31
|
-
position: absolute;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
1
|
+
@import '../../commonStyle/index.less';
|
|
2
|
+
|
|
3
|
+
.@{prefix}-modal-container {
|
|
4
|
+
.ant-modal-wrap {
|
|
5
|
+
.ant-modal {
|
|
6
|
+
max-width: unset;
|
|
7
|
+
height: 100%;
|
|
8
|
+
|
|
9
|
+
.ant-modal-content {
|
|
10
|
+
width: 100%;
|
|
11
|
+
height: 100%;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.@{prefix}-absolute-modal-container {
|
|
18
|
+
.ant-modal-wrap {
|
|
19
|
+
position: fixed;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.@{prefix}-fixed-modal-container {
|
|
24
|
+
.ant-modal-wrap {
|
|
25
|
+
position: fixed;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.@{prefix}-relative-modal-container {
|
|
30
|
+
.ant-modal-wrap {
|
|
31
|
+
position: absolute;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
@import '../commonStyle/index.less';
|
|
2
|
-
|
|
3
|
-
.@{prefix}-range-picker {
|
|
4
|
-
&-right,
|
|
5
|
-
&-left {
|
|
6
|
-
.ant-picker-panel-container {
|
|
7
|
-
display: flex;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.ant-picker-footer {
|
|
11
|
-
min-width: 40px;
|
|
12
|
-
flex: 1;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.ant-picker-ranges {
|
|
16
|
-
display: flex;
|
|
17
|
-
flex-direction: column;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.ant-picker-preset .ant-tag {
|
|
21
|
-
margin-right: 0;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
&-left {
|
|
26
|
-
.ant-picker-panel-container {
|
|
27
|
-
flex-direction: row-reverse;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
1
|
+
@import '../commonStyle/index.less';
|
|
2
|
+
|
|
3
|
+
.@{prefix}-range-picker {
|
|
4
|
+
&-right,
|
|
5
|
+
&-left {
|
|
6
|
+
.ant-picker-panel-container {
|
|
7
|
+
display: flex;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.ant-picker-footer {
|
|
11
|
+
min-width: 40px;
|
|
12
|
+
flex: 1;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.ant-picker-ranges {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.ant-picker-preset .ant-tag {
|
|
21
|
+
margin-right: 0;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&-left {
|
|
26
|
+
.ant-picker-panel-container {
|
|
27
|
+
flex-direction: row-reverse;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -11,7 +11,7 @@ export type DSelectProps = Omit<SelectProps, 'options' | 'onSearch' | 'loading'>
|
|
|
11
11
|
/** 是否开启防抖: true表示800毫秒,true表示默认值,false或0表示不开启 */
|
|
12
12
|
debounce?: boolean | number;
|
|
13
13
|
};
|
|
14
|
-
declare const DSelect: React.ForwardRefExoticComponent<Omit<SelectProps<any, DefaultOptionType>, "
|
|
14
|
+
declare const DSelect: React.ForwardRefExoticComponent<Omit<SelectProps<any, DefaultOptionType>, "loading" | "options" | "onSearch"> & {
|
|
15
15
|
/** antd的onSearch属性,onSearch有效时showSearch自动为true */
|
|
16
16
|
onSearch?: ((params?: any) => Promise<DefaultOptionType[] | any[]>) | undefined;
|
|
17
17
|
/** antd的options属性,可以是一个options数组,或一个返回等价options数组的promise */
|
|
@@ -28,6 +28,8 @@ export type DTableProps = Omit<TableProps<any>, 'columns'> & {
|
|
|
28
28
|
extraParams?: TableParamsProps;
|
|
29
29
|
/** 表格列配置 */
|
|
30
30
|
columns?: DColumnType[];
|
|
31
|
+
/** 自动显示序号列 */
|
|
32
|
+
autoSerialNumber?: boolean;
|
|
31
33
|
};
|
|
32
34
|
export type DTableRef = {
|
|
33
35
|
/** 手动刷新列表方法
|
|
@@ -58,5 +60,7 @@ declare const DTable: React.ForwardRefExoticComponent<Omit<TableProps<any>, "col
|
|
|
58
60
|
extraParams?: TableParamsProps | undefined;
|
|
59
61
|
/** 表格列配置 */
|
|
60
62
|
columns?: DColumnType[] | undefined;
|
|
61
|
-
|
|
63
|
+
/** 自动显示序号列 */
|
|
64
|
+
autoSerialNumber?: boolean | undefined;
|
|
65
|
+
} & React.RefAttributes<DTableRef>>;
|
|
62
66
|
export default DTable;
|
package/dist/esm/DTable/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
|
-
var _excluded = ["loadMore", "defaultColumnProps", "actionColumn", "showErrorMsg", "extraParams", "dataSource", "rowKey", "scroll", "className", "pagination", "columns", "loading"];
|
|
5
|
-
/*
|
|
6
|
-
* @Author : wangfeihu
|
|
7
|
-
* @Date : 2023-05-09 15:04:48
|
|
8
|
-
* @LastEditors : wangfeihu
|
|
9
|
-
* @LastEditTime : 2023-08-16 16:45:15
|
|
10
|
-
* @Description : 基于antd的Table组件
|
|
4
|
+
var _excluded = ["loadMore", "defaultColumnProps", "actionColumn", "showErrorMsg", "extraParams", "dataSource", "rowKey", "scroll", "className", "pagination", "columns", "loading", "autoSerialNumber"];
|
|
5
|
+
/*
|
|
6
|
+
* @Author : wangfeihu
|
|
7
|
+
* @Date : 2023-05-09 15:04:48
|
|
8
|
+
* @LastEditors : wangfeihu
|
|
9
|
+
* @LastEditTime : 2023-08-16 16:45:15
|
|
10
|
+
* @Description : 基于antd的Table组件
|
|
11
11
|
*/
|
|
12
12
|
import React, { forwardRef, useEffect, useRef, useState, useContext, useMemo, useImperativeHandle, useCallback } from 'react';
|
|
13
13
|
import { message, Table } from 'antd';
|
|
@@ -50,6 +50,28 @@ function getColumns(columns, defaultColumnProps) {
|
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
// 序号列
|
|
54
|
+
function getSerialNumberColumnProps(defaultColumnProps, params) {
|
|
55
|
+
var defaultProps = {
|
|
56
|
+
width: 80,
|
|
57
|
+
title: '序号',
|
|
58
|
+
dataIndex: 'serialNumber',
|
|
59
|
+
align: 'center'
|
|
60
|
+
};
|
|
61
|
+
return _objectSpread(_objectSpread(_objectSpread({}, defaultColumnProps), defaultProps), {}, {
|
|
62
|
+
render: function render(_, __, index) {
|
|
63
|
+
if (params) {
|
|
64
|
+
var size = params.size,
|
|
65
|
+
current = params.current;
|
|
66
|
+
return /*#__PURE__*/_jsx("div", {
|
|
67
|
+
children: "".concat((current - 1) * size + (index + 1))
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
return index + 1;
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
|
|
53
75
|
// 操作列
|
|
54
76
|
function getActionColumnProps(props, defaultColumnProps) {
|
|
55
77
|
var defaultProps = {
|
|
@@ -90,6 +112,8 @@ function InternalTable(props, ref) {
|
|
|
90
112
|
pagination = props.pagination,
|
|
91
113
|
columns = props.columns,
|
|
92
114
|
loading = props.loading,
|
|
115
|
+
_props$autoSerialNumb = props.autoSerialNumber,
|
|
116
|
+
autoSerialNumber = _props$autoSerialNumb === void 0 ? false : _props$autoSerialNumb,
|
|
93
117
|
otherProps = _objectWithoutProperties(props, _excluded);
|
|
94
118
|
var _useContext = useContext(ConfigContext),
|
|
95
119
|
getPrefixCls = _useContext.getPrefixCls;
|
|
@@ -118,6 +142,13 @@ function InternalTable(props, ref) {
|
|
|
118
142
|
|
|
119
143
|
// 合并列属性
|
|
120
144
|
var _columns = getColumns(columns, defaultColumnProps);
|
|
145
|
+
var serialNumberColumn = useMemo(function () {
|
|
146
|
+
return getSerialNumberColumnProps(defaultColumnProps, {
|
|
147
|
+
current: tableParams.current,
|
|
148
|
+
size: tableParams.size
|
|
149
|
+
});
|
|
150
|
+
}, [defaultColumnProps, tableParams.current, tableParams.size]);
|
|
151
|
+
if (_columns instanceof Array && autoSerialNumber) _columns.unshift(serialNumberColumn);
|
|
121
152
|
|
|
122
153
|
// 加入操作列
|
|
123
154
|
var _actionColumn = actionColumn ? getActionColumnProps(actionColumn, defaultColumnProps) : undefined;
|
|
@@ -143,11 +174,19 @@ function InternalTable(props, ref) {
|
|
|
143
174
|
setTableSource(_objectSpread(_objectSpread({}, tableSource), {}, {
|
|
144
175
|
loading: true
|
|
145
176
|
}));
|
|
146
|
-
var
|
|
147
|
-
|
|
177
|
+
var filteredParams = {};
|
|
178
|
+
Object.entries(_objectSpread(_objectSpread({}, getTablePage(_pagination)), params)).forEach(function (_ref2) {
|
|
179
|
+
var _ref3 = _slicedToArray(_ref2, 2),
|
|
180
|
+
key = _ref3[0],
|
|
181
|
+
value = _ref3[1];
|
|
182
|
+
if (value !== undefined && value !== null) {
|
|
183
|
+
filteredParams[key] = value;
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
var paramsString = JSON.stringify(filteredParams);
|
|
148
187
|
loadingParamsRef.current = paramsString;
|
|
149
|
-
setTableParams(
|
|
150
|
-
loadMore(
|
|
188
|
+
setTableParams(filteredParams);
|
|
189
|
+
loadMore(filteredParams, tableSource.records).then(function (response) {
|
|
151
190
|
if (loadingParamsRef.current === paramsString) {
|
|
152
191
|
var _response$total = response.total,
|
|
153
192
|
total = _response$total === void 0 ? 0 : _response$total,
|
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
@import '../commonStyle/index.less';
|
|
2
|
-
|
|
3
|
-
.@{prefix}-table {
|
|
4
|
-
.ant-spin-nested-loading,
|
|
5
|
-
.ant-spin-container,
|
|
6
|
-
.ant-table-container,
|
|
7
|
-
.ant-table-content {
|
|
8
|
-
height: 100%;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.ant-spin-container,
|
|
12
|
-
.ant-table-container {
|
|
13
|
-
display: flex;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
overflow: hidden;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.ant-table {
|
|
19
|
-
flex: 1;
|
|
20
|
-
overflow: hidden;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.ant-table-body {
|
|
24
|
-
overflow-y: auto;
|
|
25
|
-
// 表内单元格不省略
|
|
26
|
-
.ant-table-tbody > tr > td.ant-table-cell.d-table-cell-wrap {
|
|
27
|
-
white-space: initial;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// x轨道的宽度和y轨道的高度
|
|
31
|
-
&::-webkit-scrollbar {
|
|
32
|
-
width: 4px;
|
|
33
|
-
height: 8px;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// 轨道拖动部分的背景颜色
|
|
37
|
-
&::-webkit-scrollbar-thumb {
|
|
38
|
-
background-color: #0084ff;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// 轨道背景颜色
|
|
42
|
-
&::-webkit-scrollbar-track {
|
|
43
|
-
background-color: #f1f1f1;
|
|
44
|
-
border-radius: 2px;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// x、y两条轨道的交叉处
|
|
48
|
-
&::-webkit-scrollbar-corner {
|
|
49
|
-
background-color: #f1f1f1;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.ant-spin-nested-loading > div > .ant-spin {
|
|
54
|
-
max-height: initial;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.ant-pagination-total-text span {
|
|
58
|
-
color: #40a9ff;
|
|
59
|
-
font-weight: bold;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
1
|
+
@import '../commonStyle/index.less';
|
|
2
|
+
|
|
3
|
+
.@{prefix}-table {
|
|
4
|
+
.ant-spin-nested-loading,
|
|
5
|
+
.ant-spin-container,
|
|
6
|
+
.ant-table-container,
|
|
7
|
+
.ant-table-content {
|
|
8
|
+
height: 100%;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.ant-spin-container,
|
|
12
|
+
.ant-table-container {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.ant-table {
|
|
19
|
+
flex: 1;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.ant-table-body {
|
|
24
|
+
overflow-y: auto;
|
|
25
|
+
// 表内单元格不省略
|
|
26
|
+
.ant-table-tbody > tr > td.ant-table-cell.d-table-cell-wrap {
|
|
27
|
+
white-space: initial;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// x轨道的宽度和y轨道的高度
|
|
31
|
+
&::-webkit-scrollbar {
|
|
32
|
+
width: 4px;
|
|
33
|
+
height: 8px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// 轨道拖动部分的背景颜色
|
|
37
|
+
&::-webkit-scrollbar-thumb {
|
|
38
|
+
background-color: #0084ff;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// 轨道背景颜色
|
|
42
|
+
&::-webkit-scrollbar-track {
|
|
43
|
+
background-color: #f1f1f1;
|
|
44
|
+
border-radius: 2px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// x、y两条轨道的交叉处
|
|
48
|
+
&::-webkit-scrollbar-corner {
|
|
49
|
+
background-color: #f1f1f1;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.ant-spin-nested-loading > div > .ant-spin {
|
|
54
|
+
max-height: initial;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.ant-pagination-total-text span {
|
|
58
|
+
color: #40a9ff;
|
|
59
|
+
font-weight: bold;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
3
|
-
/*
|
|
4
|
-
* @Author : wangfeihu
|
|
5
|
-
* @Date : 2023-06-16 11:25:57
|
|
6
|
-
* @LastEditors : wangfeihu
|
|
7
|
-
* @LastEditTime : 2023-08-30 11:26:22
|
|
8
|
-
* @Description : 辅助方法集合
|
|
3
|
+
/*
|
|
4
|
+
* @Author : wangfeihu
|
|
5
|
+
* @Date : 2023-06-16 11:25:57
|
|
6
|
+
* @LastEditors : wangfeihu
|
|
7
|
+
* @LastEditTime : 2023-08-30 11:26:22
|
|
8
|
+
* @Description : 辅助方法集合
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
/** 转换base64时的参数 */
|
|
@@ -41,12 +41,12 @@ function getType(value) {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
/**
|
|
45
|
-
* @description : 将图像文件转换为Base64格式
|
|
46
|
-
* @param {Blob} blob 图像文件
|
|
47
|
-
* @param {CompressProps} options 指定图像压缩参数,其格式为: {width:300,height:200,quality:0.7}
|
|
48
|
-
* @return {Promise<string>} 包含Base64字符串的Promise对象
|
|
49
|
-
* @example : imageToBase64(file,{ width: 300, height: 200, quality: 0.7 }).then( url => console.log( url ) )
|
|
44
|
+
/**
|
|
45
|
+
* @description : 将图像文件转换为Base64格式
|
|
46
|
+
* @param {Blob} blob 图像文件
|
|
47
|
+
* @param {CompressProps} options 指定图像压缩参数,其格式为: {width:300,height:200,quality:0.7}
|
|
48
|
+
* @return {Promise<string>} 包含Base64字符串的Promise对象
|
|
49
|
+
* @example : imageToBase64(file,{ width: 300, height: 200, quality: 0.7 }).then( url => console.log( url ) )
|
|
50
50
|
*/
|
|
51
51
|
function imageToBase64(blob, options) {
|
|
52
52
|
return new Promise(function (resolve, reject) {
|
|
@@ -97,11 +97,11 @@ function imageToBase64(blob, options) {
|
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
/**
|
|
101
|
-
* @description : 将传入的文件转换为UploadFile数组
|
|
102
|
-
* @param {any} files 目标文件对象
|
|
103
|
-
* @return {UploadFile[]} UploadFile数组
|
|
104
|
-
* @example :
|
|
100
|
+
/**
|
|
101
|
+
* @description : 将传入的文件转换为UploadFile数组
|
|
102
|
+
* @param {any} files 目标文件对象
|
|
103
|
+
* @return {UploadFile[]} UploadFile数组
|
|
104
|
+
* @example :
|
|
105
105
|
*/
|
|
106
106
|
function getUploadFile(files, maxCount) {
|
|
107
107
|
if (files) {
|
|
@@ -114,11 +114,11 @@ function getUploadFile(files, maxCount) {
|
|
|
114
114
|
return [];
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
/**
|
|
118
|
-
* @description : 根据传入的option对象获取缩略图参数
|
|
119
|
-
* @param {ThumbOptionProps} option 缩略图参数对象
|
|
120
|
-
* @return {ThumbOptionProps} ThumbOption对象
|
|
121
|
-
* @example :
|
|
117
|
+
/**
|
|
118
|
+
* @description : 根据传入的option对象获取缩略图参数
|
|
119
|
+
* @param {ThumbOptionProps} option 缩略图参数对象
|
|
120
|
+
* @return {ThumbOptionProps} ThumbOption对象
|
|
121
|
+
* @example :
|
|
122
122
|
*/
|
|
123
123
|
function getThumbOption(option) {
|
|
124
124
|
var _ref2 = option || {},
|
|
@@ -152,12 +152,12 @@ function getThumbOption(option) {
|
|
|
152
152
|
return _option;
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
/**
|
|
156
|
-
* @description : a标签下载文件
|
|
157
|
-
* @param {Blob | string} url a标签的下载url或文件流
|
|
158
|
-
* @param {string} fileName 下载文件的名称,如果缺省则尝试从url中获取,默认为: "新建文件"
|
|
159
|
-
* @return {*}
|
|
160
|
-
* @example :
|
|
155
|
+
/**
|
|
156
|
+
* @description : a标签下载文件
|
|
157
|
+
* @param {Blob | string} url a标签的下载url或文件流
|
|
158
|
+
* @param {string} fileName 下载文件的名称,如果缺省则尝试从url中获取,默认为: "新建文件"
|
|
159
|
+
* @return {*}
|
|
160
|
+
* @example :
|
|
161
161
|
*/
|
|
162
162
|
function downloadFile(url, fileName) {
|
|
163
163
|
var eLink = document.createElement('a');
|
|
@@ -170,11 +170,11 @@ function downloadFile(url, fileName) {
|
|
|
170
170
|
document.body.removeChild(eLink);
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
-
/**
|
|
174
|
-
* @description : a标签预览文件
|
|
175
|
-
* @param {Blob | string} url a标签的预览url或文件流
|
|
176
|
-
* @return {*}
|
|
177
|
-
* @example :
|
|
173
|
+
/**
|
|
174
|
+
* @description : a标签预览文件
|
|
175
|
+
* @param {Blob | string} url a标签的预览url或文件流
|
|
176
|
+
* @return {*}
|
|
177
|
+
* @example :
|
|
178
178
|
*/
|
|
179
179
|
function previewFile(url) {
|
|
180
180
|
var eLink = document.createElement('a');
|
|
@@ -187,13 +187,13 @@ function previewFile(url) {
|
|
|
187
187
|
document.body.removeChild(eLink);
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
-
/**
|
|
191
|
-
* @description : 以递归方式深度查找一个对象
|
|
192
|
-
* @param {Record} object 待查找的对象
|
|
193
|
-
* @param {function} fn 查找函数,每次递归时执行,如果执行结果为true,则递归过程并返回当前对象
|
|
194
|
-
* @param {number} maxDepth 递归的最大深度,默认10
|
|
195
|
-
* @return {*} 查找到的对象,未查找到则返回undefined
|
|
196
|
-
* @example :
|
|
190
|
+
/**
|
|
191
|
+
* @description : 以递归方式深度查找一个对象
|
|
192
|
+
* @param {Record} object 待查找的对象
|
|
193
|
+
* @param {function} fn 查找函数,每次递归时执行,如果执行结果为true,则递归过程并返回当前对象
|
|
194
|
+
* @param {number} maxDepth 递归的最大深度,默认10
|
|
195
|
+
* @return {*} 查找到的对象,未查找到则返回undefined
|
|
196
|
+
* @example :
|
|
197
197
|
*/
|
|
198
198
|
// eslint-disable-next-line no-unused-vars
|
|
199
199
|
function deepFindObject(object, fn) {
|
|
@@ -223,13 +223,13 @@ function deepFindObject(object, fn) {
|
|
|
223
223
|
return recursive(object, undefined, '', fn, {});
|
|
224
224
|
}
|
|
225
225
|
|
|
226
|
-
/**
|
|
227
|
-
* @description : 以递归方式深度查找一个Jsx对象
|
|
228
|
-
* @param {Record} object 待查找的Jsx对象
|
|
229
|
-
* @param {function} fn 查找函数,每次递归时执行,如果执行结果为true,则停止递归过程并返回当前对象
|
|
230
|
-
* @param {number} maxDepth 递归的最大深度,默认10
|
|
231
|
-
* @return {*} 查找到的对象,未查找到则返回undefined
|
|
232
|
-
* @example :
|
|
226
|
+
/**
|
|
227
|
+
* @description : 以递归方式深度查找一个Jsx对象
|
|
228
|
+
* @param {Record} object 待查找的Jsx对象
|
|
229
|
+
* @param {function} fn 查找函数,每次递归时执行,如果执行结果为true,则停止递归过程并返回当前对象
|
|
230
|
+
* @param {number} maxDepth 递归的最大深度,默认10
|
|
231
|
+
* @return {*} 查找到的对象,未查找到则返回undefined
|
|
232
|
+
* @example :
|
|
233
233
|
*/
|
|
234
234
|
// eslint-disable-next-line no-unused-vars
|
|
235
235
|
function deepFindJsx(object, fn) {
|
|
@@ -6,12 +6,12 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
|
6
6
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
7
7
|
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
8
8
|
var _excluded = ["value", "thumbOption", "uploadButton", "itemClassName", "enablePreview", "className", "maxCount", "children", "itemRender", "customRequest", "onRemove", "onDownload", "onPreview", "onChange", "defaultFileList", "showUploadList", "fileList"];
|
|
9
|
-
/*
|
|
10
|
-
* @Author : wangfeihu
|
|
11
|
-
* @Date : 2023-06-16 09:37:07
|
|
12
|
-
* @LastEditors : wangfeihu
|
|
13
|
-
* @LastEditTime : 2023-09-07 16:33:53
|
|
14
|
-
* @Description : 基于antd的Upload组件
|
|
9
|
+
/*
|
|
10
|
+
* @Author : wangfeihu
|
|
11
|
+
* @Date : 2023-06-16 09:37:07
|
|
12
|
+
* @LastEditors : wangfeihu
|
|
13
|
+
* @LastEditTime : 2023-09-07 16:33:53
|
|
14
|
+
* @Description : 基于antd的Upload组件
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import React, { forwardRef, useEffect, useMemo, useState, useContext } from 'react';
|