@pointcloud/pcloud-components 0.1.21 → 0.1.23

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.
Files changed (60) hide show
  1. package/README.md +1 -1
  2. package/dist/esm/AdvancedFilter/FormFilter.js +3 -3
  3. package/dist/esm/AdvancedFilter/interface.d.ts +3 -3
  4. package/dist/esm/AdvancedFilter/styles/index.less +146 -146
  5. package/dist/esm/ColorPicker/index.js +1 -1
  6. package/dist/esm/ColorPicker/index.less +18 -18
  7. package/dist/esm/ColorPicker/interface.d.ts +3 -3
  8. package/dist/esm/ConfigProvider/interface.d.ts +1 -1
  9. package/dist/esm/DCascader/index.js +6 -6
  10. package/dist/esm/DCascader/index.less +24 -24
  11. package/dist/esm/DForm/DItem/itemsRender.js +2 -0
  12. package/dist/esm/DForm/helper.js +6 -6
  13. package/dist/esm/DForm/index.js +1 -1
  14. package/dist/esm/DForm/index.less +45 -45
  15. package/dist/esm/DInput/index.js +14 -14
  16. package/dist/esm/DModal/interface.d.ts +2 -2
  17. package/dist/esm/DModal/styles/index.less +27 -27
  18. package/dist/esm/DSelect/index.js +39 -45
  19. package/dist/esm/DTable/index.js +6 -6
  20. package/dist/esm/DTable/index.less +71 -71
  21. package/dist/esm/DTreeSelect/index.less +11 -11
  22. package/dist/esm/DUpload/helper.js +47 -47
  23. package/dist/esm/DUpload/index.d.ts +1 -1
  24. package/dist/esm/DUpload/index.js +6 -6
  25. package/dist/esm/DUpload/index.less +19 -19
  26. package/dist/esm/ErrorBoundary/index.less +44 -44
  27. package/dist/esm/IPAddress/index.d.ts +23 -0
  28. package/dist/esm/IPAddress/index.js +243 -0
  29. package/dist/esm/IPAddress/index.less +63 -0
  30. package/dist/esm/IconFont/index.d.ts +17 -0
  31. package/dist/esm/IconFont/index.js +27 -0
  32. package/dist/esm/InfiniteScrollList/styles/index.less +22 -22
  33. package/dist/esm/LabelValue/interface.d.ts +1 -1
  34. package/dist/esm/LabelValue/styles/index.less +23 -23
  35. package/dist/esm/Loading/hooks/useLoading.d.ts +6 -0
  36. package/dist/esm/Loading/hooks/useLoading.js +35 -0
  37. package/dist/esm/Loading/index.d.ts +5 -4
  38. package/dist/esm/Loading/index.js +9 -9
  39. package/dist/esm/Loading/interface.d.ts +6 -3
  40. package/dist/esm/Loading/loading.d.ts +2 -4
  41. package/dist/esm/Loading/loading.js +5 -3
  42. package/dist/esm/Loading/styles/index.less +25 -25
  43. package/dist/esm/NoData/styles/index.less +24 -24
  44. package/dist/esm/PictureCard/index.d.ts +1 -1
  45. package/dist/esm/PictureCard/index.less +28 -28
  46. package/dist/esm/RCropper/handler.d.ts +16 -0
  47. package/dist/esm/RCropper/handler.js +146 -0
  48. package/dist/esm/RCropper/index.d.ts +4 -0
  49. package/dist/esm/RCropper/index.js +183 -0
  50. package/dist/esm/RCropper/interface.d.ts +70 -0
  51. package/dist/esm/RCropper/interface.js +1 -0
  52. package/dist/esm/RCropper/styles/toolbar.less +25 -0
  53. package/dist/esm/RCropper/toolbar.d.ts +5 -0
  54. package/dist/esm/RCropper/toolbar.js +74 -0
  55. package/dist/esm/commonStyle/index.less +1 -1
  56. package/dist/esm/index.d.ts +7 -1
  57. package/dist/esm/index.js +5 -2
  58. package/dist/umd/pcloud-components.min.css +1 -1
  59. package/dist/umd/pcloud-components.min.js +1 -1
  60. package/package.json +108 -106
@@ -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
- enableCompose && setComposeFlag(true);
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?: (...args: any[]) => any;
11
- onCancel?: (...args: any[]) => any;
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 (params) {
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' && setLoading(true);
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;
@@ -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
+ }
@@ -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) {
@@ -26,7 +26,7 @@ declare type DUploadProps = Omit<UploadProps, 'fileList' | 'onChange' | 'customR
26
26
  itemClassName?: string;
27
27
  enablePreview?: boolean | ((file: DUploadFile) => boolean);
28
28
  };
29
- declare const DUpload: React.ForwardRefExoticComponent<Omit<UploadProps<any>, "onChange" | "fileList" | "customRequest" | "onRemove" | "onDownload" | "onPreview"> & {
29
+ declare const DUpload: React.ForwardRefExoticComponent<Omit<UploadProps<any>, "fileList" | "onChange" | "customRequest" | "onRemove" | "onDownload" | "onPreview"> & {
30
30
  /** 初始文件列表(相当于defaultFileList,但优先级高于defaultFileList) */
31
31
  value?: DUploadFile | DUploadFile[] | undefined;
32
32
  /** 文件列表(在Form组件中表现为受控列表,在一般情况下相当于初始文件列表,其优先级高于value属性) */
@@ -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';
@@ -1,19 +1,19 @@
1
- @import '../commonStyle/index.less';
2
-
3
- .@{prefix}-upload {
4
- .preview .ant-upload-list-item-actions a[target='_blank'][rel='noopener noreferrer'] {
5
- opacity: initial !important;
6
- pointer-events: initial !important;
7
- }
8
-
9
- .ant-upload-list.ant-upload-list-picture-card .ant-upload-span {
10
- .ant-upload-list-item-thumbnail {
11
- height: 46px;
12
- }
13
-
14
- .ant-upload-list-item-name {
15
- position: absolute;
16
- display: initial;
17
- }
18
- }
19
- }
1
+ @import '../commonStyle/index.less';
2
+
3
+ .@{prefix}-upload {
4
+ .preview .ant-upload-list-item-actions a[target='_blank'][rel='noopener noreferrer'] {
5
+ opacity: initial !important;
6
+ pointer-events: initial !important;
7
+ }
8
+
9
+ .ant-upload-list.ant-upload-list-picture-card .ant-upload-span {
10
+ .ant-upload-list-item-thumbnail {
11
+ height: 46px;
12
+ }
13
+
14
+ .ant-upload-list-item-name {
15
+ position: absolute;
16
+ display: initial;
17
+ }
18
+ }
19
+ }