@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/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# pcloud-components
|
|
2
2
|
|
|
3
|
-
>)  ?style=flat&logo=antdesign>)  >)  ?style=flat&logo=antdesign>)  ?style=flat&logo=webcomponentsdotorg>) ?style=flat>)
|
|
4
4
|
|
|
5
5
|
pcloud-components 是一套基于 Antd v4.24.16+ React v17 开发的业务组件库。
|
|
6
6
|
该项目已经发布到 Npm 仓库,可以直接使用, 点击[pcloud-components 地址](https://www.npmjs.com/package/@pointcloud/pcloud-components)访问。
|
|
@@ -70,15 +70,15 @@ export default (function (props) {
|
|
|
70
70
|
values = _objectSpread(_objectSpread({}, values), formatTime(_defineProperty({}, item, values[item])));
|
|
71
71
|
}
|
|
72
72
|
});
|
|
73
|
-
onSearch
|
|
73
|
+
onSearch === null || onSearch === void 0 || onSearch(values);
|
|
74
74
|
};
|
|
75
75
|
var valuesChange = function valuesChange(v) {
|
|
76
76
|
var value = formatTime(v);
|
|
77
|
-
onValuesChange
|
|
77
|
+
onValuesChange === null || onValuesChange === void 0 || onValuesChange(value);
|
|
78
78
|
};
|
|
79
79
|
var reset = function reset() {
|
|
80
80
|
form.resetFields();
|
|
81
|
-
onReset
|
|
81
|
+
onReset === null || onReset === void 0 || onReset();
|
|
82
82
|
};
|
|
83
83
|
var renderComponent = function renderComponent(type, item) {
|
|
84
84
|
switch (type) {
|
|
@@ -34,11 +34,11 @@ export interface FormProps {
|
|
|
34
34
|
/**
|
|
35
35
|
* @description 筛选项值变更时触发
|
|
36
36
|
*/
|
|
37
|
-
onValuesChange?: (
|
|
37
|
+
onValuesChange?: (_values: any) => void;
|
|
38
38
|
/**
|
|
39
39
|
* @description 点击查询按钮时触发
|
|
40
40
|
*/
|
|
41
|
-
onSearch?: (
|
|
41
|
+
onSearch?: (_v: any) => void;
|
|
42
42
|
/**
|
|
43
43
|
* @description 点击重置按钮时触发
|
|
44
44
|
*/
|
|
@@ -67,7 +67,7 @@ export interface InputProps {
|
|
|
67
67
|
/**
|
|
68
68
|
* @description input检索框回车时或点击检索图标时触发
|
|
69
69
|
*/
|
|
70
|
-
inputSearch?: (
|
|
70
|
+
inputSearch?: (_v: any) => void;
|
|
71
71
|
}
|
|
72
72
|
export interface FilterProps extends FormProps {
|
|
73
73
|
/**
|
|
@@ -1,146 +1,146 @@
|
|
|
1
|
-
@import '../../commonStyle/index.less';
|
|
2
|
-
|
|
3
|
-
.@{prefix}-search-filter {
|
|
4
|
-
align-items: center;
|
|
5
|
-
width: 100%;
|
|
6
|
-
margin-top: 10px;
|
|
7
|
-
background-color: #fff;
|
|
8
|
-
|
|
9
|
-
span.ant-collapse-header-text {
|
|
10
|
-
display: inline-block;
|
|
11
|
-
width: 100%;
|
|
12
|
-
cursor: auto !important;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.ant-collapse-content-box {
|
|
16
|
-
padding: 0;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.search-header {
|
|
20
|
-
display: flex;
|
|
21
|
-
width: 100%;
|
|
22
|
-
|
|
23
|
-
.left {
|
|
24
|
-
max-width: 100%;
|
|
25
|
-
overflow: hidden;
|
|
26
|
-
white-space: no-wrap;
|
|
27
|
-
text-overflow: ellipsis;
|
|
28
|
-
|
|
29
|
-
:global {
|
|
30
|
-
.ant-radio-wrapper:first-child {
|
|
31
|
-
border-left: 1px solid #d9d9d9;
|
|
32
|
-
border-radius: 5px 0 0 5px;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.ant-radio-wrapper:last-child {
|
|
36
|
-
border-radius: 0 5px 5px 0;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.ant-radio-wrapper {
|
|
40
|
-
margin-right: 0;
|
|
41
|
-
padding: 4px 6px;
|
|
42
|
-
border: 1px solid #d9d9d9;
|
|
43
|
-
border-top-width: 1px;
|
|
44
|
-
border-left: 1px solid #fff;
|
|
45
|
-
border-left-width: 1px;
|
|
46
|
-
|
|
47
|
-
.ant-radio {
|
|
48
|
-
display: none;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.ant-radio-wrapper:hover {
|
|
53
|
-
color: #1890ff;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.ant-radio-wrapper-checked {
|
|
57
|
-
z-index: 1;
|
|
58
|
-
color: #1890ff;
|
|
59
|
-
background: #fff;
|
|
60
|
-
border: 1px solid #1890ff;
|
|
61
|
-
border-left: 1px solid #1890ff !important;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.right {
|
|
67
|
-
display: flex;
|
|
68
|
-
justify-content: center;
|
|
69
|
-
|
|
70
|
-
.input {
|
|
71
|
-
width: 200px;
|
|
72
|
-
border-radius: 4px;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.button {
|
|
76
|
-
margin-left: 10px;
|
|
77
|
-
color: #fff;
|
|
78
|
-
background-color: #ff7e00;
|
|
79
|
-
border-radius: 4px;
|
|
80
|
-
|
|
81
|
-
&:active,
|
|
82
|
-
&:focus,
|
|
83
|
-
&:hover {
|
|
84
|
-
border-color: transparent;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.icon {
|
|
88
|
-
margin-left: 8px;
|
|
89
|
-
transition: transform 0.4s;
|
|
90
|
-
|
|
91
|
-
&.down {
|
|
92
|
-
transform: rotateZ(180deg);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
&.up {
|
|
96
|
-
transform: rotateZ(0deg);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.title {
|
|
104
|
-
display: flex;
|
|
105
|
-
align-items: center;
|
|
106
|
-
margin: 0 10px;
|
|
107
|
-
padding-bottom: 10px;
|
|
108
|
-
font-weight: bold;
|
|
109
|
-
border-bottom: 1px solid #f0f0f0;
|
|
110
|
-
|
|
111
|
-
span.icon {
|
|
112
|
-
width: 4px;
|
|
113
|
-
height: 16px;
|
|
114
|
-
margin-right: 6px;
|
|
115
|
-
background-color: #ff7e00;
|
|
116
|
-
border-radius: 2px;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.search-content {
|
|
121
|
-
.filter-row {
|
|
122
|
-
display: flex;
|
|
123
|
-
flex-wrap: wrap;
|
|
124
|
-
width: 100%;
|
|
125
|
-
padding: 10px;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.filter-col {
|
|
129
|
-
height: 30px;
|
|
130
|
-
margin-bottom: 10px;
|
|
131
|
-
line-height: 30px;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.filter-col .ant-picker {
|
|
135
|
-
width: 100%;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.search-btn {
|
|
139
|
-
justify-content: center;
|
|
140
|
-
|
|
141
|
-
> button {
|
|
142
|
-
margin: 0 5px;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
1
|
+
@import '../../commonStyle/index.less';
|
|
2
|
+
|
|
3
|
+
.@{prefix}-search-filter {
|
|
4
|
+
align-items: center;
|
|
5
|
+
width: 100%;
|
|
6
|
+
margin-top: 10px;
|
|
7
|
+
background-color: #fff;
|
|
8
|
+
|
|
9
|
+
span.ant-collapse-header-text {
|
|
10
|
+
display: inline-block;
|
|
11
|
+
width: 100%;
|
|
12
|
+
cursor: auto !important;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.ant-collapse-content-box {
|
|
16
|
+
padding: 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.search-header {
|
|
20
|
+
display: flex;
|
|
21
|
+
width: 100%;
|
|
22
|
+
|
|
23
|
+
.left {
|
|
24
|
+
max-width: 100%;
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
white-space: no-wrap;
|
|
27
|
+
text-overflow: ellipsis;
|
|
28
|
+
|
|
29
|
+
:global {
|
|
30
|
+
.ant-radio-wrapper:first-child {
|
|
31
|
+
border-left: 1px solid #d9d9d9;
|
|
32
|
+
border-radius: 5px 0 0 5px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.ant-radio-wrapper:last-child {
|
|
36
|
+
border-radius: 0 5px 5px 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.ant-radio-wrapper {
|
|
40
|
+
margin-right: 0;
|
|
41
|
+
padding: 4px 6px;
|
|
42
|
+
border: 1px solid #d9d9d9;
|
|
43
|
+
border-top-width: 1px;
|
|
44
|
+
border-left: 1px solid #fff;
|
|
45
|
+
border-left-width: 1px;
|
|
46
|
+
|
|
47
|
+
.ant-radio {
|
|
48
|
+
display: none;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.ant-radio-wrapper:hover {
|
|
53
|
+
color: #1890ff;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.ant-radio-wrapper-checked {
|
|
57
|
+
z-index: 1;
|
|
58
|
+
color: #1890ff;
|
|
59
|
+
background: #fff;
|
|
60
|
+
border: 1px solid #1890ff;
|
|
61
|
+
border-left: 1px solid #1890ff !important;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.right {
|
|
67
|
+
display: flex;
|
|
68
|
+
justify-content: center;
|
|
69
|
+
|
|
70
|
+
.input {
|
|
71
|
+
width: 200px;
|
|
72
|
+
border-radius: 4px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.button {
|
|
76
|
+
margin-left: 10px;
|
|
77
|
+
color: #fff;
|
|
78
|
+
background-color: #ff7e00;
|
|
79
|
+
border-radius: 4px;
|
|
80
|
+
|
|
81
|
+
&:active,
|
|
82
|
+
&:focus,
|
|
83
|
+
&:hover {
|
|
84
|
+
border-color: transparent;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.icon {
|
|
88
|
+
margin-left: 8px;
|
|
89
|
+
transition: transform 0.4s;
|
|
90
|
+
|
|
91
|
+
&.down {
|
|
92
|
+
transform: rotateZ(180deg);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&.up {
|
|
96
|
+
transform: rotateZ(0deg);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.title {
|
|
104
|
+
display: flex;
|
|
105
|
+
align-items: center;
|
|
106
|
+
margin: 0 10px;
|
|
107
|
+
padding-bottom: 10px;
|
|
108
|
+
font-weight: bold;
|
|
109
|
+
border-bottom: 1px solid #f0f0f0;
|
|
110
|
+
|
|
111
|
+
span.icon {
|
|
112
|
+
width: 4px;
|
|
113
|
+
height: 16px;
|
|
114
|
+
margin-right: 6px;
|
|
115
|
+
background-color: #ff7e00;
|
|
116
|
+
border-radius: 2px;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.search-content {
|
|
121
|
+
.filter-row {
|
|
122
|
+
display: flex;
|
|
123
|
+
flex-wrap: wrap;
|
|
124
|
+
width: 100%;
|
|
125
|
+
padding: 10px;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.filter-col {
|
|
129
|
+
height: 30px;
|
|
130
|
+
margin-bottom: 10px;
|
|
131
|
+
line-height: 30px;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.filter-col .ant-picker {
|
|
135
|
+
width: 100%;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.search-btn {
|
|
139
|
+
justify-content: center;
|
|
140
|
+
|
|
141
|
+
> button {
|
|
142
|
+
margin: 0 5px;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface AspectRatioProps {
|
|
3
|
+
ratio?: number;
|
|
4
|
+
className?: string;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
style?: React.CSSProperties;
|
|
7
|
+
}
|
|
8
|
+
declare function AspectRatio({ ratio, className, children, style }: AspectRatioProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default AspectRatio;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import React, { useRef, useEffect } from 'react';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
function AspectRatio(_ref) {
|
|
5
|
+
var _ref$ratio = _ref.ratio,
|
|
6
|
+
ratio = _ref$ratio === void 0 ? 16 / 9 : _ref$ratio,
|
|
7
|
+
_ref$className = _ref.className,
|
|
8
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
9
|
+
children = _ref.children,
|
|
10
|
+
style = _ref.style;
|
|
11
|
+
var ref = useRef(null);
|
|
12
|
+
useEffect(function () {
|
|
13
|
+
// 兼容旧浏览器:如果不支持 aspect-ratio,则用 padding-top
|
|
14
|
+
var el = ref.current;
|
|
15
|
+
if (!el) return;
|
|
16
|
+
var test = document.createElement('div');
|
|
17
|
+
if (!('aspectRatio' in test.style)) {
|
|
18
|
+
// 不支持 aspect-ratio
|
|
19
|
+
el.style.position = 'relative';
|
|
20
|
+
el.style.width = '100%';
|
|
21
|
+
el.style.height = '';
|
|
22
|
+
el.style.paddingTop = "".concat(100 / ratio, "%");
|
|
23
|
+
// 包裹 children 的 div 绝对定位
|
|
24
|
+
if (el.firstElementChild) {
|
|
25
|
+
el.firstElementChild.style.position = 'absolute';
|
|
26
|
+
el.firstElementChild.style.inset = '0';
|
|
27
|
+
el.firstElementChild.style.width = '100%';
|
|
28
|
+
el.firstElementChild.style.height = '100%';
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}, [ratio]);
|
|
32
|
+
return /*#__PURE__*/_jsx("div", {
|
|
33
|
+
ref: ref,
|
|
34
|
+
className: className,
|
|
35
|
+
style: _objectSpread({
|
|
36
|
+
aspectRatio: "".concat(ratio),
|
|
37
|
+
width: '100%',
|
|
38
|
+
height: '100%',
|
|
39
|
+
display: 'flex',
|
|
40
|
+
alignItems: 'center',
|
|
41
|
+
justifyContent: 'center'
|
|
42
|
+
}, style),
|
|
43
|
+
children: children
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
export default AspectRatio;
|
|
@@ -48,7 +48,7 @@ var ColorPicker = function ColorPicker(props) {
|
|
|
48
48
|
// eslint-disable-next-line no-unused-expressions, @typescript-eslint/no-unused-expressions
|
|
49
49
|
onChange && onChange(e);
|
|
50
50
|
};
|
|
51
|
-
var handleChangeComplete = function handleChangeComplete(
|
|
51
|
+
var handleChangeComplete = function handleChangeComplete() {
|
|
52
52
|
var _color = color !== null && color !== void 0 && color.a ? "rgba(".concat(color === null || color === void 0 ? void 0 : color.r, ",").concat(color === null || color === void 0 ? void 0 : color.g, ",").concat(color === null || color === void 0 ? void 0 : color.b, ",").concat(color === null || color === void 0 ? void 0 : color.a, ")") : initColor;
|
|
53
53
|
// eslint-disable-next-line no-unused-expressions, @typescript-eslint/no-unused-expressions
|
|
54
54
|
onChangeComplete && onChangeComplete(_color);
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
@import '../commonStyle/index.less';
|
|
2
|
-
|
|
3
|
-
.@{prefix}-color-picker {
|
|
4
|
-
.sketch-picker {
|
|
5
|
-
padding: 0 !important;
|
|
6
|
-
box-shadow: none !important;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.trigger {
|
|
11
|
-
display: inline-block;
|
|
12
|
-
width: 60px;
|
|
13
|
-
height: 26px;
|
|
14
|
-
border: 5px solid #fff;
|
|
15
|
-
border-radius: 2px;
|
|
16
|
-
box-shadow: 0 0 2px #000;
|
|
17
|
-
cursor: pointer;
|
|
18
|
-
}
|
|
1
|
+
@import '../commonStyle/index.less';
|
|
2
|
+
|
|
3
|
+
.@{prefix}-color-picker {
|
|
4
|
+
.sketch-picker {
|
|
5
|
+
padding: 0 !important;
|
|
6
|
+
box-shadow: none !important;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.trigger {
|
|
11
|
+
display: inline-block;
|
|
12
|
+
width: 60px;
|
|
13
|
+
height: 26px;
|
|
14
|
+
border: 5px solid #fff;
|
|
15
|
+
border-radius: 2px;
|
|
16
|
+
box-shadow: 0 0 2px #000;
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
}
|
|
@@ -20,12 +20,12 @@ interface ComponentProps {
|
|
|
20
20
|
* 颜色值变化时触发
|
|
21
21
|
* @param v 色值对象
|
|
22
22
|
*/
|
|
23
|
-
onChange?: (
|
|
23
|
+
onChange?: (_v?: string) => void;
|
|
24
24
|
/**
|
|
25
25
|
* 颜色变化完成时触发
|
|
26
26
|
* @param v 颜色值 rgba
|
|
27
27
|
*/
|
|
28
|
-
onChangeComplete?: (
|
|
28
|
+
onChangeComplete?: (_v?: string) => void;
|
|
29
29
|
}
|
|
30
30
|
export interface ColorPickerProps extends ComponentProps {
|
|
31
31
|
/**
|
|
@@ -43,7 +43,7 @@ export interface ColorPickerProps extends ComponentProps {
|
|
|
43
43
|
/**
|
|
44
44
|
* 点击确定时的回调函数
|
|
45
45
|
*/
|
|
46
|
-
onConfirm: (
|
|
46
|
+
onConfirm: (_v: string) => void;
|
|
47
47
|
}
|
|
48
48
|
export interface TwitterPickerProps extends ComponentProps {
|
|
49
49
|
/**
|
|
@@ -5,7 +5,7 @@ export interface ConfigProviderProps {
|
|
|
5
5
|
* @default pui
|
|
6
6
|
*/
|
|
7
7
|
prefixCls?: string;
|
|
8
|
-
getPrefixCls?: (
|
|
8
|
+
getPrefixCls?: (_componentName: string, _customPrefix?: string) => string;
|
|
9
9
|
children?: React.ReactNode;
|
|
10
10
|
}
|
|
11
11
|
export declare type OtherProps = Omit<ConfigProviderProps, 'children'>;
|
|
@@ -3,12 +3,12 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
5
|
var _excluded = ["className", "popupClassName", "fieldNames", "options", "onChange", "loadData", "onLoadData", "loading"];
|
|
6
|
-
/*
|
|
7
|
-
* @Author : wangfeihu
|
|
8
|
-
* @Date : 2023-05-18 13:35:38
|
|
9
|
-
* @LastEditors : wangfeihu
|
|
10
|
-
* @LastEditTime : 2023-07-12 09:44:01
|
|
11
|
-
* @Description : 基于antd的Cascader组件
|
|
6
|
+
/*
|
|
7
|
+
* @Author : wangfeihu
|
|
8
|
+
* @Date : 2023-05-18 13:35:38
|
|
9
|
+
* @LastEditors : wangfeihu
|
|
10
|
+
* @LastEditTime : 2023-07-12 09:44:01
|
|
11
|
+
* @Description : 基于antd的Cascader组件
|
|
12
12
|
*/
|
|
13
13
|
import React, { useRef, forwardRef, useState, useEffect, useMemo, useContext } from 'react';
|
|
14
14
|
import { Cascader } from 'antd';
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
@import '../commonStyle/index.less';
|
|
2
|
-
|
|
3
|
-
.@{prefix}-cascader-dropdown .ant-cascader-menu {
|
|
4
|
-
&::-webkit-scrollbar {
|
|
5
|
-
width: 8px;
|
|
6
|
-
height: 8px;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
// 轨道拖动部分的背景颜色
|
|
10
|
-
&::-webkit-scrollbar-thumb {
|
|
11
|
-
background-color: rgba(0, 0, 0, 50%);
|
|
12
|
-
border-radius: 8px;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
// 轨道背景颜色
|
|
16
|
-
&::-webkit-scrollbar-track {
|
|
17
|
-
border-radius: 2px;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
// x、y两条轨道的交叉处
|
|
21
|
-
&::-webkit-scrollbar-corner {
|
|
22
|
-
background-color: #f1f1f1;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
1
|
+
@import '../commonStyle/index.less';
|
|
2
|
+
|
|
3
|
+
.@{prefix}-cascader-dropdown .ant-cascader-menu {
|
|
4
|
+
&::-webkit-scrollbar {
|
|
5
|
+
width: 8px;
|
|
6
|
+
height: 8px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// 轨道拖动部分的背景颜色
|
|
10
|
+
&::-webkit-scrollbar-thumb {
|
|
11
|
+
background-color: rgba(0, 0, 0, 50%);
|
|
12
|
+
border-radius: 8px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// 轨道背景颜色
|
|
16
|
+
&::-webkit-scrollbar-track {
|
|
17
|
+
border-radius: 2px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// x、y两条轨道的交叉处
|
|
21
|
+
&::-webkit-scrollbar-corner {
|
|
22
|
+
background-color: #f1f1f1;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -8,6 +8,7 @@ import { DSelectProps } from '../../DSelect';
|
|
|
8
8
|
import { DCascaderProps } from '../../DCascader';
|
|
9
9
|
import { DTreeSelectProps } from '../../DTreeSelect';
|
|
10
10
|
import { DUploadProps } from '../../DUpload';
|
|
11
|
+
import { IPAddressProps } from '../../IPAddress';
|
|
11
12
|
export declare type DItemBaseProps = {
|
|
12
13
|
/** label标签文本,同antd Form.Item的label,只能是string */
|
|
13
14
|
label?: string;
|
|
@@ -30,6 +31,9 @@ declare type CustomItemProps = DItemBaseProps & HTMLAttributes<HTMLElement> & {
|
|
|
30
31
|
declare type DInputItemProps = {
|
|
31
32
|
renderType?: 'dInput';
|
|
32
33
|
} & DItemBaseProps & DInputProps;
|
|
34
|
+
declare type DIpAddressProps = {
|
|
35
|
+
renderType?: 'ipAddress';
|
|
36
|
+
} & DItemBaseProps & IPAddressProps;
|
|
33
37
|
declare type InputItemProps = {
|
|
34
38
|
renderType?: 'input';
|
|
35
39
|
} & DItemBaseProps & InputProps;
|
|
@@ -111,5 +115,5 @@ declare type ButtonItemProps = {
|
|
|
111
115
|
declare type DividerItemProps = {
|
|
112
116
|
renderType?: 'divider';
|
|
113
117
|
} & DItemBaseProps & DividerProps;
|
|
114
|
-
export declare type DItemProps = CustomItemProps | DInputItemProps | InputItemProps | TextAreaItemProps | PasswordItemProps | InputNumberItemProps | AutoCompleteItemProps | DSelectItemProps | SelectItemProps | DCascaderItemProps | CascaderItemProps | DTreeSelectItemProps | TreeSelectItemProps | DatePickerItemProps | TimePickerItemProps | RangePickerItemProps | MentionItemProps | CheckboxItemProps | CheckboxGroupProps | DCheckboxGroupProps | RadioItemProps | RadioGroupProps | DRadioGorupProps | RateItemProps | SliderItemProps | SwitchItemProps | TransferItemProps | UploadItemProps | DUploadItemProps | ButtonItemProps | DividerItemProps;
|
|
118
|
+
export declare type DItemProps = CustomItemProps | DInputItemProps | DIpAddressProps | InputItemProps | TextAreaItemProps | PasswordItemProps | InputNumberItemProps | AutoCompleteItemProps | DSelectItemProps | SelectItemProps | DCascaderItemProps | CascaderItemProps | DTreeSelectItemProps | TreeSelectItemProps | DatePickerItemProps | TimePickerItemProps | RangePickerItemProps | MentionItemProps | CheckboxItemProps | CheckboxGroupProps | DCheckboxGroupProps | RadioItemProps | RadioGroupProps | DRadioGorupProps | RateItemProps | SliderItemProps | SwitchItemProps | TransferItemProps | UploadItemProps | DUploadItemProps | ButtonItemProps | DividerItemProps;
|
|
115
119
|
export {};
|
|
@@ -8,6 +8,7 @@ import { DInputProps } from '../../DInput';
|
|
|
8
8
|
import { DSelectProps } from '../../DSelect';
|
|
9
9
|
import { DTreeSelectProps } from '../../DTreeSelect';
|
|
10
10
|
import { DUploadProps } from '../../DUpload';
|
|
11
|
+
import { IPAddressProps } from '../../IPAddress';
|
|
11
12
|
import { DItemBaseProps } from './itemType';
|
|
12
13
|
declare const renderMap: {
|
|
13
14
|
dInput: (props: DInputProps, formItemProps: FormItemProps, label: DItemBaseProps['label']) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -15,6 +16,7 @@ declare const renderMap: {
|
|
|
15
16
|
textArea: (props: TextAreaProps, formItemProps: FormItemProps, label: DItemBaseProps['label']) => import("react/jsx-runtime").JSX.Element;
|
|
16
17
|
password: (props: PasswordProps, formItemProps: FormItemProps, label: DItemBaseProps['label']) => import("react/jsx-runtime").JSX.Element;
|
|
17
18
|
inputNumber: (props: InputNumberProps, formItemProps: FormItemProps, label: DItemBaseProps['label']) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
ipAddress: (props: IPAddressProps, formItemProps: FormItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
20
|
autoComplete: (props: AutoCompleteProps, formItemProps: FormItemProps, label: DItemBaseProps['label']) => import("react/jsx-runtime").JSX.Element;
|
|
19
21
|
dSelect: (props: DSelectProps, formItemProps: FormItemProps, label: DItemBaseProps['label']) => import("react/jsx-runtime").JSX.Element;
|
|
20
22
|
select: (props: SelectProps, formItemProps: FormItemProps, label: DItemBaseProps['label']) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -13,6 +13,7 @@ import DInput from "../../DInput";
|
|
|
13
13
|
import DSelect from "../../DSelect";
|
|
14
14
|
import DTreeSelect from "../../DTreeSelect";
|
|
15
15
|
import DUpload from "../../DUpload";
|
|
16
|
+
import IPAddress from "../../IPAddress";
|
|
16
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
18
|
var renderMap = {
|
|
18
19
|
dInput: function dInput(props, formItemProps, label) {
|
|
@@ -50,6 +51,11 @@ var renderMap = {
|
|
|
50
51
|
}, props))
|
|
51
52
|
}));
|
|
52
53
|
},
|
|
54
|
+
ipAddress: function ipAddress(props, formItemProps) {
|
|
55
|
+
return /*#__PURE__*/_jsx(Form.Item, _objectSpread(_objectSpread({}, formItemProps), {}, {
|
|
56
|
+
children: /*#__PURE__*/_jsx(IPAddress, _objectSpread({}, props))
|
|
57
|
+
}));
|
|
58
|
+
},
|
|
53
59
|
autoComplete: function autoComplete(props, formItemProps, label) {
|
|
54
60
|
var _props = props;
|
|
55
61
|
return /*#__PURE__*/_jsx(Form.Item, _objectSpread(_objectSpread({}, formItemProps), {}, {
|
|
@@ -128,6 +134,7 @@ var renderMap = {
|
|
|
128
134
|
},
|
|
129
135
|
checkbox: function checkbox(props, formItemProps, label) {
|
|
130
136
|
return /*#__PURE__*/_jsx(Form.Item, _objectSpread(_objectSpread({}, formItemProps), {}, {
|
|
137
|
+
valuePropName: "checked",
|
|
131
138
|
children: /*#__PURE__*/_jsx(Checkbox, _objectSpread(_objectSpread({}, props), {}, {
|
|
132
139
|
children: label
|
|
133
140
|
}))
|
|
@@ -140,6 +147,7 @@ var renderMap = {
|
|
|
140
147
|
},
|
|
141
148
|
radio: function radio(props, formItemProps, label) {
|
|
142
149
|
return /*#__PURE__*/_jsx(Form.Item, _objectSpread(_objectSpread({}, formItemProps), {}, {
|
|
150
|
+
valuePropName: "checked",
|
|
143
151
|
children: /*#__PURE__*/_jsx(Radio, _objectSpread(_objectSpread({}, props), {}, {
|
|
144
152
|
children: label
|
|
145
153
|
}))
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export declare function cloneDeep<T>(value: T): T;
|
|
2
|
+
export declare function mergeWith<T, S>(object: T, source: S, customizer?: (_objValue: any, _srcValue: any, _key: string | number) => any): T & S;
|
|
1
3
|
/** 合并对象 */
|
|
2
4
|
declare function merge(object: any, sources: any, customizer?: (objValue: any, srcValue: any) => any): any;
|
|
3
5
|
declare const _default: {
|