@pointcloud/pcloud-components 0.1.21 → 0.1.24
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 +1 -1
- package/dist/esm/AdvancedFilter/FormFilter.js +3 -3
- package/dist/esm/AdvancedFilter/interface.d.ts +3 -3
- package/dist/esm/AdvancedFilter/styles/index.less +146 -146
- package/dist/esm/AspectRatio/index.d.ts +9 -0
- package/dist/esm/AspectRatio/index.js +46 -0
- package/dist/esm/ColorPicker/index.js +1 -1
- package/dist/esm/ColorPicker/index.less +18 -18
- package/dist/esm/ColorPicker/interface.d.ts +3 -3
- package/dist/esm/ConfigProvider/interface.d.ts +1 -1
- package/dist/esm/DCascader/index.js +6 -6
- package/dist/esm/DCascader/index.less +24 -24
- package/dist/esm/DForm/DItem/itemType.d.ts +5 -1
- package/dist/esm/DForm/DItem/itemsRender.d.ts +2 -0
- package/dist/esm/DForm/DItem/itemsRender.js +8 -0
- package/dist/esm/DForm/helper.d.ts +2 -0
- package/dist/esm/DForm/helper.js +33 -10
- package/dist/esm/DForm/index.js +7 -4
- package/dist/esm/DForm/index.less +5 -0
- package/dist/esm/DInput/index.js +14 -14
- package/dist/esm/DModal/interface.d.ts +2 -2
- package/dist/esm/DModal/styles/index.less +27 -27
- package/dist/esm/DSelect/index.js +39 -45
- package/dist/esm/DTable/index.js +6 -6
- package/dist/esm/DTable/index.less +71 -71
- package/dist/esm/DTreeSelect/index.less +11 -11
- package/dist/esm/DUpload/helper.js +47 -47
- package/dist/esm/DUpload/index.less +19 -19
- package/dist/esm/ErrorBoundary/index.less +44 -44
- package/dist/esm/IPAddress/index.d.ts +20 -0
- package/dist/esm/IPAddress/index.js +248 -0
- package/dist/esm/IPAddress/index.less +75 -0
- package/dist/esm/IconFont/index.d.ts +17 -0
- package/dist/esm/IconFont/index.js +27 -0
- package/dist/esm/InfiniteScrollList/index.d.ts +9 -0
- package/dist/esm/InfiniteScrollList/index.js +9 -4
- package/dist/esm/InfiniteScrollList/styles/index.less +2 -0
- package/dist/esm/LabelValue/interface.d.ts +1 -1
- package/dist/esm/LabelValue/styles/index.less +23 -23
- package/dist/esm/Loading/hooks/useLoading.d.ts +6 -0
- package/dist/esm/Loading/hooks/useLoading.js +35 -0
- package/dist/esm/Loading/index.d.ts +5 -4
- package/dist/esm/Loading/index.js +9 -9
- package/dist/esm/Loading/interface.d.ts +6 -3
- package/dist/esm/Loading/loading.d.ts +2 -4
- package/dist/esm/Loading/loading.js +5 -3
- package/dist/esm/Loading/styles/index.less +25 -25
- package/dist/esm/NoData/styles/index.less +24 -24
- package/dist/esm/PictureCard/index.d.ts +1 -1
- package/dist/esm/PictureCard/index.less +28 -28
- package/dist/esm/RCropper/handler.d.ts +16 -0
- package/dist/esm/RCropper/handler.js +146 -0
- package/dist/esm/RCropper/index.d.ts +4 -0
- package/dist/esm/RCropper/index.js +183 -0
- package/dist/esm/RCropper/interface.d.ts +70 -0
- package/dist/esm/RCropper/interface.js +1 -0
- package/dist/esm/RCropper/styles/toolbar.less +25 -0
- package/dist/esm/RCropper/svgIcons.d.ts +28 -0
- package/dist/esm/RCropper/svgIcons.js +158 -0
- package/dist/esm/RCropper/toolbar.d.ts +5 -0
- package/dist/esm/RCropper/toolbar.js +84 -0
- package/dist/esm/WordCloud/index.d.ts +6 -2
- package/dist/esm/WordCloud/index.js +110 -5
- package/dist/esm/commonStyle/index.less +1 -1
- package/dist/esm/index.d.ts +9 -1
- package/dist/esm/index.js +6 -2
- package/dist/umd/pcloud-components.min.css +1 -1
- package/dist/umd/pcloud-components.min.js +1 -1
- package/package.json +107 -106
package/dist/esm/DForm/helper.js
CHANGED
|
@@ -1,14 +1,4 @@
|
|
|
1
1
|
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
2
|
-
/*
|
|
3
|
-
* @Author : wangfeihu
|
|
4
|
-
* @Date : 2023-06-07 15:08:06
|
|
5
|
-
* @LastEditors : wangfeihu
|
|
6
|
-
* @LastEditTime : 2023-06-12 17:35:15
|
|
7
|
-
* @Description : 合并两个对象中的所有字段
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import mergeWith from 'lodash/mergeWith';
|
|
11
|
-
import cloneDeep from 'lodash/cloneDeep';
|
|
12
2
|
var TYPES = {
|
|
13
3
|
OPTION_TYPE_PRIMARY: 'primary',
|
|
14
4
|
OPTION_TYPE_OBJECT: 'object',
|
|
@@ -45,6 +35,39 @@ var defaultCustomizer = function defaultCustomizer(objValue, srcValue) {
|
|
|
45
35
|
return srcValue;
|
|
46
36
|
}
|
|
47
37
|
};
|
|
38
|
+
export function cloneDeep(value) {
|
|
39
|
+
if (value === null || _typeof(value) !== 'object') return value;
|
|
40
|
+
if (Array.isArray(value)) return value.map(cloneDeep);
|
|
41
|
+
var result = {};
|
|
42
|
+
for (var key in value) {
|
|
43
|
+
if (Object.prototype.hasOwnProperty.call(value, key)) {
|
|
44
|
+
result[key] = cloneDeep(value[key]);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return result;
|
|
48
|
+
}
|
|
49
|
+
export function mergeWith(object, source, customizer) {
|
|
50
|
+
var result = cloneDeep(object);
|
|
51
|
+
for (var key in source) {
|
|
52
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
53
|
+
var objValue = result[key];
|
|
54
|
+
var srcValue = source[key];
|
|
55
|
+
if (customizer) {
|
|
56
|
+
var customized = customizer(objValue, srcValue, key);
|
|
57
|
+
if (customized !== undefined) {
|
|
58
|
+
result[key] = customized;
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
if (objValue && srcValue && _typeof(objValue) === 'object' && _typeof(srcValue) === 'object' && !Array.isArray(objValue) && !Array.isArray(srcValue)) {
|
|
63
|
+
result[key] = mergeWith(objValue, srcValue, customizer);
|
|
64
|
+
} else {
|
|
65
|
+
result[key] = cloneDeep(srcValue);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return result;
|
|
70
|
+
}
|
|
48
71
|
|
|
49
72
|
/** 合并对象 */
|
|
50
73
|
function merge(object, sources) {
|
package/dist/esm/DForm/index.js
CHANGED
|
@@ -20,22 +20,25 @@ import "./index.less";
|
|
|
20
20
|
// eslint-disable-next-line no-unused-vars
|
|
21
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
22
|
function getChildren(items, children, _defaultItemProps, layout) {
|
|
23
|
+
var _Object$keys;
|
|
23
24
|
var list = [];
|
|
25
|
+
var hasPropsValue = _defaultItemProps && ((_Object$keys = Object.keys(_defaultItemProps)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) > 0;
|
|
24
26
|
if (items instanceof Array && items.length > 0) {
|
|
25
27
|
if (layout === 'grid') {
|
|
26
28
|
list.push( /*#__PURE__*/_jsx(Row, {
|
|
29
|
+
className: "grid-row",
|
|
27
30
|
children: items.map(function (item, index) {
|
|
28
31
|
var _item$formItemProps;
|
|
29
|
-
var _item = helper.merge(_defaultItemProps, item);
|
|
32
|
+
var _item = hasPropsValue ? helper.merge(_defaultItemProps, item) : item;
|
|
30
33
|
var _gridProps = (_item === null || _item === void 0 || (_item$formItemProps = _item.formItemProps) === null || _item$formItemProps === void 0 ? void 0 : _item$formItemProps.grid) || {};
|
|
31
34
|
return /*#__PURE__*/_jsx(Col, _objectSpread(_objectSpread({}, _gridProps), {}, {
|
|
32
35
|
children: /*#__PURE__*/_jsx(DItem, _objectSpread({}, _item))
|
|
33
36
|
}), (item === null || item === void 0 ? void 0 : item.name) || index);
|
|
34
37
|
})
|
|
35
|
-
}));
|
|
38
|
+
}, "row"));
|
|
36
39
|
} else {
|
|
37
40
|
list = items.map(function (item, index) {
|
|
38
|
-
var _item = helper.merge(_defaultItemProps, item);
|
|
41
|
+
var _item = hasPropsValue ? helper.merge(_defaultItemProps, item) : item;
|
|
39
42
|
return /*#__PURE__*/_jsx(DItem, _objectSpread({}, _item), (item === null || item === void 0 ? void 0 : item.name) || index);
|
|
40
43
|
});
|
|
41
44
|
}
|
|
@@ -44,7 +47,7 @@ function getChildren(items, children, _defaultItemProps, layout) {
|
|
|
44
47
|
var childrenList = children instanceof Array ? children : [children];
|
|
45
48
|
var _childrenList = childrenList.map(function (item) {
|
|
46
49
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
47
|
-
props: helper.merge(_defaultItemProps, item.props)
|
|
50
|
+
props: hasPropsValue ? helper.merge(_defaultItemProps, item.props) : item.props
|
|
48
51
|
});
|
|
49
52
|
});
|
|
50
53
|
list = list.concat(_childrenList);
|
package/dist/esm/DInput/index.js
CHANGED
|
@@ -12,7 +12,19 @@ var _excluded = ["className", "onChange", "onCompositionStart", "onCompositionEn
|
|
|
12
12
|
import React, { useRef, forwardRef, useState, useEffect, useContext } from 'react';
|
|
13
13
|
import { Input } from 'antd';
|
|
14
14
|
import { ConfigContext } from "../ConfigProvider";
|
|
15
|
+
|
|
16
|
+
// 获取防抖超时时间,debounce: 默认800ms,false或0表示不开启
|
|
15
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
|
+
function getDebounceTime(debounce) {
|
|
19
|
+
var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 800;
|
|
20
|
+
if (debounce === true) {
|
|
21
|
+
return defaultValue;
|
|
22
|
+
} else if (debounce === false) {
|
|
23
|
+
return 0;
|
|
24
|
+
} else {
|
|
25
|
+
return typeof debounce === 'number' ? debounce : defaultValue;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
16
28
|
function InternalInput(props, ref) {
|
|
17
29
|
var _props$className = props.className,
|
|
18
30
|
className = _props$className === void 0 ? '' : _props$className,
|
|
@@ -61,14 +73,14 @@ function InternalInput(props, ref) {
|
|
|
61
73
|
// 监听合成输入开始事件(执行用户事件并置合成标记为true)
|
|
62
74
|
var _onCompositionStart = function _onCompositionStart(e) {
|
|
63
75
|
onCompositionStart === null || onCompositionStart === void 0 || onCompositionStart(e);
|
|
64
|
-
|
|
76
|
+
setComposeFlag === null || setComposeFlag === void 0 || setComposeFlag(true);
|
|
65
77
|
};
|
|
66
78
|
|
|
67
79
|
// 监听合成输入结束事件(执行用户事件并置合成标记为false,同时触发用户onChange事件)
|
|
68
80
|
var _onCompositionEnd = function _onCompositionEnd(e) {
|
|
69
81
|
onCompositionEnd === null || onCompositionEnd === void 0 || onCompositionEnd(e);
|
|
70
82
|
if (enableCompose) {
|
|
71
|
-
setComposeFlag(false);
|
|
83
|
+
setComposeFlag === null || setComposeFlag === void 0 || setComposeFlag(false);
|
|
72
84
|
emitChange(e.target.value, e);
|
|
73
85
|
}
|
|
74
86
|
};
|
|
@@ -84,17 +96,5 @@ function InternalInput(props, ref) {
|
|
|
84
96
|
onCompositionEnd: _onCompositionEnd
|
|
85
97
|
}));
|
|
86
98
|
}
|
|
87
|
-
|
|
88
|
-
// 获取防抖超时时间,debounce: 默认800ms,false或0表示不开启
|
|
89
|
-
function getDebounceTime(debounce) {
|
|
90
|
-
var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 800;
|
|
91
|
-
if (debounce === true) {
|
|
92
|
-
return defaultValue;
|
|
93
|
-
} else if (debounce === false) {
|
|
94
|
-
return 0;
|
|
95
|
-
} else {
|
|
96
|
-
return typeof debounce === 'number' ? debounce : defaultValue;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
99
|
var DInput = /*#__PURE__*/forwardRef(InternalInput);
|
|
100
100
|
export default DInput;
|
|
@@ -7,8 +7,8 @@ export interface DModalProps extends IModalProps {
|
|
|
7
7
|
}
|
|
8
8
|
export interface DeleteModalProps {
|
|
9
9
|
content?: React.ReactNode;
|
|
10
|
-
onOk?: (...
|
|
11
|
-
onCancel?: (...
|
|
10
|
+
onOk?: <T>(..._args: T[]) => T;
|
|
11
|
+
onCancel?: <T>(..._args: T[]) => T;
|
|
12
12
|
zIndex?: number;
|
|
13
13
|
}
|
|
14
14
|
export {};
|
|
@@ -1,27 +1,27 @@
|
|
|
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}-relative-modal-container {
|
|
24
|
-
.ant-modal-wrap {
|
|
25
|
-
position: absolute;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
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}-relative-modal-container {
|
|
24
|
+
.ant-modal-wrap {
|
|
25
|
+
position: absolute;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -2,17 +2,33 @@ 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", "popupClassName", "fieldNames", "searchValue", "filterOption", "options", "onSearch", "loading", "debounce"];
|
|
5
|
-
/*
|
|
6
|
-
* @Author : wangfeihu
|
|
7
|
-
* @Date : 2023-05-17 08:41:25
|
|
8
|
-
* @LastEditors : wangfeihu
|
|
9
|
-
* @LastEditTime : 2023-07-11 15:44:04
|
|
10
|
-
* @Description : 基于antd的Select组件
|
|
11
|
-
*/
|
|
12
5
|
import React, { forwardRef, useEffect, useRef, useState, useMemo, useContext } from 'react';
|
|
13
6
|
import { Select } from 'antd';
|
|
14
7
|
import { ConfigContext } from "../ConfigProvider";
|
|
15
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
// 获取延时时间,默认800ms,true代表默认时间,false代表0
|
|
10
|
+
function getDelayTime(value) {
|
|
11
|
+
var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 800;
|
|
12
|
+
if (value === true) {
|
|
13
|
+
return defaultValue;
|
|
14
|
+
} else if (value === false) {
|
|
15
|
+
return 0;
|
|
16
|
+
} else {
|
|
17
|
+
return typeof value === 'number' ? Number(value) || 0 : defaultValue;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// 获取默认本地搜索方法
|
|
22
|
+
function getFilterOption(showSearch, filterOption, fieldNames) {
|
|
23
|
+
if (filterOption) {
|
|
24
|
+
return filterOption;
|
|
25
|
+
} else {
|
|
26
|
+
return showSearch && function (value, option) {
|
|
27
|
+
var _option$fieldNames$la;
|
|
28
|
+
return (_option$fieldNames$la = option[fieldNames.label]) === null || _option$fieldNames$la === void 0 ? void 0 : _option$fieldNames$la.includes(value);
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
}
|
|
16
32
|
function InternalSelect(props, ref) {
|
|
17
33
|
var _props$className = props.className,
|
|
18
34
|
className = _props$className === void 0 ? '' : _props$className,
|
|
@@ -57,29 +73,19 @@ function InternalSelect(props, ref) {
|
|
|
57
73
|
var _loading = typeof initLoading === 'boolean' ? initLoading : loading;
|
|
58
74
|
var _filterOption = getFilterOption(!_showSearch, filterOption, _fieldNames);
|
|
59
75
|
var getOptions = useMemo(function () {
|
|
60
|
-
return typeof initOptions === 'function' ? initOptions : function (
|
|
76
|
+
return typeof initOptions === 'function' ? initOptions : function () {
|
|
61
77
|
return Promise.resolve(initOptions || []);
|
|
62
78
|
};
|
|
63
79
|
}, [initOptions]);
|
|
64
|
-
var _onSearch = function _onSearch(value) {
|
|
65
|
-
if (onSearch) {
|
|
66
|
-
if (_debounce > 0) {
|
|
67
|
-
clearTimeout(debounceRef.current);
|
|
68
|
-
debounceRef.current = setTimeout(function () {
|
|
69
|
-
updateOptions(onSearch, value);
|
|
70
|
-
}, _debounce);
|
|
71
|
-
} else {
|
|
72
|
-
updateOptions(onSearch, value);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
80
|
var updateOptions = function updateOptions(fun, value) {
|
|
77
81
|
// 设置加载中状态
|
|
78
82
|
if (_loadingState > 0) {
|
|
79
83
|
loadingRef.current.status = 'loading';
|
|
80
84
|
clearTimeout(loadingRef.current.timer);
|
|
81
85
|
loadingRef.current.timer = setTimeout(function () {
|
|
82
|
-
loadingRef.current.status === 'loading'
|
|
86
|
+
if (loadingRef.current.status === 'loading') {
|
|
87
|
+
setLoading(true);
|
|
88
|
+
}
|
|
83
89
|
}, _loadingState);
|
|
84
90
|
}
|
|
85
91
|
|
|
@@ -101,6 +107,18 @@ function InternalSelect(props, ref) {
|
|
|
101
107
|
}
|
|
102
108
|
});
|
|
103
109
|
};
|
|
110
|
+
var _onSearch = function _onSearch(value) {
|
|
111
|
+
if (onSearch) {
|
|
112
|
+
if (_debounce > 0) {
|
|
113
|
+
clearTimeout(debounceRef.current);
|
|
114
|
+
debounceRef.current = setTimeout(function () {
|
|
115
|
+
updateOptions(onSearch, value);
|
|
116
|
+
}, _debounce);
|
|
117
|
+
} else {
|
|
118
|
+
updateOptions(onSearch, value);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
};
|
|
104
122
|
|
|
105
123
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
106
124
|
useEffect(function () {
|
|
@@ -121,29 +139,5 @@ function InternalSelect(props, ref) {
|
|
|
121
139
|
options: options
|
|
122
140
|
}));
|
|
123
141
|
}
|
|
124
|
-
|
|
125
|
-
// 获取延时时间,默认800ms,true代表默认时间,false代表0
|
|
126
|
-
function getDelayTime(value) {
|
|
127
|
-
var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 800;
|
|
128
|
-
if (value === true) {
|
|
129
|
-
return defaultValue;
|
|
130
|
-
} else if (value === false) {
|
|
131
|
-
return 0;
|
|
132
|
-
} else {
|
|
133
|
-
return typeof value === 'number' ? Number(value) || 0 : defaultValue;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
// 获取默认本地搜索方法
|
|
138
|
-
function getFilterOption(showSearch, filterOption, fieldNames) {
|
|
139
|
-
if (filterOption) {
|
|
140
|
-
return filterOption;
|
|
141
|
-
} else {
|
|
142
|
-
return showSearch && function (value, option) {
|
|
143
|
-
var _option$fieldNames$la;
|
|
144
|
-
return (_option$fieldNames$la = option[fieldNames.label]) === null || _option$fieldNames$la === void 0 ? void 0 : _option$fieldNames$la.includes(value);
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
142
|
var DSelect = /*#__PURE__*/forwardRef(InternalSelect);
|
|
149
143
|
export default DSelect;
|
package/dist/esm/DTable/index.js
CHANGED
|
@@ -2,12 +2,12 @@ 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
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组件
|
|
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 } from 'react';
|
|
13
13
|
import { message, Table } from 'antd';
|
|
@@ -1,71 +1,71 @@
|
|
|
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 {
|
|
8
|
-
width: 100%;
|
|
9
|
-
height: 100%;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
// 隐藏表头最后一个滚动样式单元格
|
|
13
|
-
// .ant-table-thead .ant-table-cell-scrollbar {
|
|
14
|
-
// position: absolute;
|
|
15
|
-
// top: -1px;
|
|
16
|
-
// border: none;
|
|
17
|
-
// box-shadow: none;
|
|
18
|
-
// background-color: #2e404d;
|
|
19
|
-
// }
|
|
20
|
-
|
|
21
|
-
.ant-table-body {
|
|
22
|
-
position: absolute;
|
|
23
|
-
overflow-y: auto !important;
|
|
24
|
-
min-width: 100%;
|
|
25
|
-
max-width: 100%;
|
|
26
|
-
min-height: calc(100% - 56px);
|
|
27
|
-
max-height: calc(100% - 56px);
|
|
28
|
-
|
|
29
|
-
// 表内单元格不省略
|
|
30
|
-
.ant-table-tbody > tr > td.ant-table-cell.d-table-cell-wrap {
|
|
31
|
-
white-space: initial;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// x轨道的宽度和y轨道的高度
|
|
35
|
-
&::-webkit-scrollbar {
|
|
36
|
-
width: 4px;
|
|
37
|
-
height: 8px;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// 轨道拖动部分的背景颜色
|
|
41
|
-
&::-webkit-scrollbar-thumb {
|
|
42
|
-
background-color: #0084ff;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// 轨道背景颜色
|
|
46
|
-
&::-webkit-scrollbar-track {
|
|
47
|
-
background-color: #f1f1f1;
|
|
48
|
-
border-radius: 2px;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// x、y两条轨道的交叉处
|
|
52
|
-
&::-webkit-scrollbar-corner {
|
|
53
|
-
background-color: #f1f1f1;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.ant-spin-nested-loading > div > .ant-spin {
|
|
58
|
-
max-height: initial;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.ant-pagination-total-text span {
|
|
62
|
-
color: #40a9ff;
|
|
63
|
-
font-weight: bold;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
&.height-on-page {
|
|
67
|
-
.ant-table {
|
|
68
|
-
height: calc(100% - 56px);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
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 {
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: 100%;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// 隐藏表头最后一个滚动样式单元格
|
|
13
|
+
// .ant-table-thead .ant-table-cell-scrollbar {
|
|
14
|
+
// position: absolute;
|
|
15
|
+
// top: -1px;
|
|
16
|
+
// border: none;
|
|
17
|
+
// box-shadow: none;
|
|
18
|
+
// background-color: #2e404d;
|
|
19
|
+
// }
|
|
20
|
+
|
|
21
|
+
.ant-table-body {
|
|
22
|
+
position: absolute;
|
|
23
|
+
overflow-y: auto !important;
|
|
24
|
+
min-width: 100%;
|
|
25
|
+
max-width: 100%;
|
|
26
|
+
min-height: calc(100% - 56px);
|
|
27
|
+
max-height: calc(100% - 56px);
|
|
28
|
+
|
|
29
|
+
// 表内单元格不省略
|
|
30
|
+
.ant-table-tbody > tr > td.ant-table-cell.d-table-cell-wrap {
|
|
31
|
+
white-space: initial;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// x轨道的宽度和y轨道的高度
|
|
35
|
+
&::-webkit-scrollbar {
|
|
36
|
+
width: 4px;
|
|
37
|
+
height: 8px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// 轨道拖动部分的背景颜色
|
|
41
|
+
&::-webkit-scrollbar-thumb {
|
|
42
|
+
background-color: #0084ff;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// 轨道背景颜色
|
|
46
|
+
&::-webkit-scrollbar-track {
|
|
47
|
+
background-color: #f1f1f1;
|
|
48
|
+
border-radius: 2px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// x、y两条轨道的交叉处
|
|
52
|
+
&::-webkit-scrollbar-corner {
|
|
53
|
+
background-color: #f1f1f1;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.ant-spin-nested-loading > div > .ant-spin {
|
|
58
|
+
max-height: initial;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.ant-pagination-total-text span {
|
|
62
|
+
color: #40a9ff;
|
|
63
|
+
font-weight: bold;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&.height-on-page {
|
|
67
|
+
.ant-table {
|
|
68
|
+
height: calc(100% - 56px);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
@import '../commonStyle/index.less';
|
|
2
|
-
|
|
3
|
-
.@{prefix}-tree-select-dropdown .ant-select-tree-node-content-wrapper {
|
|
4
|
-
overflow: hidden;
|
|
5
|
-
white-space: nowrap;
|
|
6
|
-
text-overflow: ellipsis;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.@{prefix}-tree-select-dropdown .ant-select-tree-node-content-wrapper .ant-select-tree-title {
|
|
10
|
-
overflow: hidden;
|
|
11
|
-
}
|
|
1
|
+
@import '../commonStyle/index.less';
|
|
2
|
+
|
|
3
|
+
.@{prefix}-tree-select-dropdown .ant-select-tree-node-content-wrapper {
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
white-space: nowrap;
|
|
6
|
+
text-overflow: ellipsis;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.@{prefix}-tree-select-dropdown .ant-select-tree-node-content-wrapper .ant-select-tree-title {
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
}
|