@pointcloud/pcloud-components 0.1.18 → 0.1.20
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 +323 -314
- package/dist/esm/AdvancedFilter/interface.d.ts +4 -0
- package/dist/esm/AuthComponent/index.d.ts +2 -2
- package/dist/esm/AuthComponent/interface.d.ts +2 -1
- package/dist/esm/ConfigProvider/interface.d.ts +1 -1
- package/dist/esm/DForm/DItem/itemType.d.ts +1 -1
- 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 -7
- package/dist/esm/DForm/index.less +44 -32
- package/dist/esm/DModal/index.d.ts +1 -0
- package/dist/esm/DModal/index.js +1 -0
- package/dist/esm/ErrorBoundary/index.d.ts +2 -2
- package/dist/esm/InfiniteScrollList/index.d.ts +54 -0
- package/dist/esm/InfiniteScrollList/index.js +169 -0
- package/dist/esm/InfiniteScrollList/styles/index.less +22 -0
- package/dist/esm/LabelValue/index.d.ts +1 -2
- package/dist/esm/LabelValue/interface.d.ts +2 -1
- package/dist/esm/Loading/index.d.ts +3 -3
- package/dist/esm/Loading/interface.d.ts +2 -1
- package/dist/esm/Loading/loading.js +0 -1
- package/dist/esm/ModalForm/index.d.ts +11 -0
- package/dist/esm/ModalForm/index.js +45 -0
- package/dist/esm/NoData/index.d.ts +2 -2
- package/dist/esm/NoData/interface.d.ts +2 -1
- package/dist/esm/PictureCard/index.d.ts +16 -0
- package/dist/esm/PictureCard/index.js +79 -0
- package/dist/esm/PictureCard/index.less +28 -0
- package/dist/esm/WordCloud/index.d.ts +7 -0
- package/dist/esm/WordCloud/index.js +21 -0
- package/dist/esm/index.d.ts +14 -3
- package/dist/esm/index.js +5 -1
- package/dist/umd/pcloud-components.min.css +1 -1
- package/dist/umd/pcloud-components.min.js +1 -1
- package/package.json +105 -99
|
@@ -95,3 +95,7 @@ export interface FilterProps extends FormProps {
|
|
|
95
95
|
*/
|
|
96
96
|
icon?: React.ReactNode;
|
|
97
97
|
}
|
|
98
|
+
export declare type AdvancedFilterProps = FilterProps;
|
|
99
|
+
export declare type FormFilterProps = FProps;
|
|
100
|
+
export declare type FotmItemProps = FormItem;
|
|
101
|
+
export declare type InputSearchProps = InputProps;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
declare const AuthComponent: ({ value, noAuthContent, children, authList, fieldName }:
|
|
2
|
+
import { IAuthComponentProps } from './interface';
|
|
3
|
+
declare const AuthComponent: ({ value, noAuthContent, children, authList, fieldName }: IAuthComponentProps) => JSX.Element;
|
|
4
4
|
export default AuthComponent;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export interface
|
|
2
|
+
export interface IAuthComponentProps {
|
|
3
3
|
/**
|
|
4
4
|
* @description 权限值
|
|
5
5
|
*/
|
|
@@ -21,3 +21,4 @@ export interface AuthComponentProps {
|
|
|
21
21
|
*/
|
|
22
22
|
children?: React.ReactNode;
|
|
23
23
|
}
|
|
24
|
+
export declare type AuthComponentProps = IAuthComponentProps;
|
|
@@ -8,4 +8,4 @@ export interface ConfigProviderProps {
|
|
|
8
8
|
getPrefixCls?: (componentName: string, customPrefix?: string) => string;
|
|
9
9
|
children?: React.ReactNode;
|
|
10
10
|
}
|
|
11
|
-
export declare type OtherProps = Omit<ConfigProviderProps, '
|
|
11
|
+
export declare type OtherProps = Omit<ConfigProviderProps, 'children'>;
|
|
@@ -12,7 +12,7 @@ export declare type DItemBaseProps = {
|
|
|
12
12
|
/** label标签文本,同antd Form.Item的label,只能是string */
|
|
13
13
|
label?: string;
|
|
14
14
|
/** name标签文本,同antd Form.Item的name */
|
|
15
|
-
name?: string;
|
|
15
|
+
name?: string | number | (string | number)[];
|
|
16
16
|
/** Form.Item 的其他属性 */
|
|
17
17
|
formItemProps?: FormItemProps & {
|
|
18
18
|
grid?: Omit<ColProps, 'prefixCls'>;
|
|
@@ -38,6 +38,6 @@ declare const renderMap: {
|
|
|
38
38
|
dUpload: (props: DUploadProps, formItemProps: FormItemProps, render: (props: any) => ReactNode, children: DUploadProps['children']) => JSX.Element;
|
|
39
39
|
button: (props: ButtonProps, formItemProps: FormItemProps, label: DItemBaseProps['label']) => JSX.Element;
|
|
40
40
|
divider: (props: DividerProps, formItemProps: FormItemProps, label: DItemBaseProps['label']) => JSX.Element;
|
|
41
|
-
other: (formItemProps: FormItemProps, children:
|
|
41
|
+
other: (formItemProps: FormItemProps, children: ReactNode) => JSX.Element;
|
|
42
42
|
};
|
|
43
43
|
export default renderMap;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
/*
|
|
3
|
-
* @Author : wangfeihu
|
|
4
|
-
* @Date : 2023-06-12 17:35:10
|
|
5
|
-
* @LastEditors : frank
|
|
6
|
-
* @LastEditTime : 2023-12-20 15:40:13
|
|
7
|
-
* @Description : 根据renderType渲染对应的表单项组件
|
|
2
|
+
/*
|
|
3
|
+
* @Author : wangfeihu
|
|
4
|
+
* @Date : 2023-06-12 17:35:10
|
|
5
|
+
* @LastEditors : frank
|
|
6
|
+
* @LastEditTime : 2023-12-20 15:40:13
|
|
7
|
+
* @Description : 根据renderType渲染对应的表单项组件
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { AutoComplete, Button, Cascader, Checkbox, DatePicker, Divider, Form, Input, InputNumber, Mentions, Radio, Rate, Select, Slider, Switch, TimePicker, Transfer, TreeSelect, Upload } from 'antd';
|
package/dist/esm/DForm/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 = ["className", "defaultItemProps", "items", "children", "layout", "autoComplete"];
|
|
5
|
-
/*
|
|
6
|
-
* @Author : wangfeihu
|
|
7
|
-
* @Date : 2023-06-02 09:29:11
|
|
8
|
-
* @LastEditors : wangfeihu
|
|
9
|
-
* @LastEditTime : 2023-08-16 17:44:33
|
|
10
|
-
* @Description : 基于antd的Form组件
|
|
5
|
+
/*
|
|
6
|
+
* @Author : wangfeihu
|
|
7
|
+
* @Date : 2023-06-02 09:29:11
|
|
8
|
+
* @LastEditors : wangfeihu
|
|
9
|
+
* @LastEditTime : 2023-08-16 17:44:33
|
|
10
|
+
* @Description : 基于antd的Form组件
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import React, { forwardRef, useContext, useState, useEffect, useImperativeHandle } from 'react';
|
|
@@ -108,6 +108,5 @@ DForm.ErrorList = Form.ErrorList;
|
|
|
108
108
|
DForm.useForm = Form.useForm;
|
|
109
109
|
DForm.useFormInstance = Form.useFormInstance;
|
|
110
110
|
DForm.useWatch = Form.useWatch;
|
|
111
|
-
DForm.useForm = Form.useForm;
|
|
112
111
|
export {};
|
|
113
112
|
export default DForm;
|
|
@@ -1,32 +1,44 @@
|
|
|
1
|
-
@import '../commonStyle/index.less';
|
|
2
|
-
|
|
3
|
-
.@{prefix}-form {
|
|
4
|
-
.form-wrapper >
|
|
5
|
-
min-height: 32px;
|
|
6
|
-
margin-right: 0;
|
|
7
|
-
margin-bottom: 24px;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.@{prefix}-form.ant-form-inline.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
+
// .form-wrapper > .ant-form-item:last-child {
|
|
11
|
+
// margin-bottom: 0;
|
|
12
|
+
// }
|
|
13
|
+
|
|
14
|
+
.ant-input-number,
|
|
15
|
+
.ant-picker {
|
|
16
|
+
width: 100%;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.@{prefix}-form.ant-form-horizontal .ant-form-item-label {
|
|
21
|
+
min-width: 80px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.@{prefix}-form.ant-form-inline .form-wrapper,
|
|
25
|
+
.@{prefix}-form.ant-form-inline.inlineVertical .form-wrapper {
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-wrap: wrap;
|
|
28
|
+
align-items: flex-end;
|
|
29
|
+
height: min-content;
|
|
30
|
+
|
|
31
|
+
> .ant-form-item {
|
|
32
|
+
padding-right: 16px;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.@{prefix}-form.ant-form-inline.inlineVertical {
|
|
37
|
+
.ant-form-item-row {
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
|
|
40
|
+
.ant-form-item-label {
|
|
41
|
+
text-align: left;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -9,6 +9,7 @@ declare namespace DModal {
|
|
|
9
9
|
export var error: import("antd/lib/modal/confirm").ModalFunc;
|
|
10
10
|
export var warning: import("antd/lib/modal/confirm").ModalFunc;
|
|
11
11
|
export var confirm: import("antd/lib/modal/confirm").ModalFunc;
|
|
12
|
+
export var destroyAll: () => void;
|
|
12
13
|
var _a: ({ content, onOk, onCancel, zIndex }: DeleteModalProps) => {
|
|
13
14
|
destroy: () => void;
|
|
14
15
|
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
package/dist/esm/DModal/index.js
CHANGED
|
@@ -56,6 +56,7 @@ DModal.success = Modal.success;
|
|
|
56
56
|
DModal.error = Modal.error;
|
|
57
57
|
DModal.warning = Modal.warning;
|
|
58
58
|
DModal.confirm = Modal.confirm;
|
|
59
|
+
DModal.destroyAll = Modal.destroyAll;
|
|
59
60
|
DModal.delete = function (_ref) {
|
|
60
61
|
var content = _ref.content,
|
|
61
62
|
onOk = _ref.onOk,
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './styles/index.less';
|
|
3
|
+
interface ISLProps<T, P> {
|
|
4
|
+
/**
|
|
5
|
+
* @description 容器id
|
|
6
|
+
* @default scrollableDiv
|
|
7
|
+
*/
|
|
8
|
+
containerId?: string;
|
|
9
|
+
/**
|
|
10
|
+
* @description 列表项的唯一标识字段
|
|
11
|
+
* @default id
|
|
12
|
+
*/
|
|
13
|
+
itemKey?: string;
|
|
14
|
+
/**
|
|
15
|
+
* @description 容器高度(超过此高度将滚动)
|
|
16
|
+
*/
|
|
17
|
+
containerHeight: number | string;
|
|
18
|
+
/**
|
|
19
|
+
* @description 列表请求的初始参数
|
|
20
|
+
*/
|
|
21
|
+
initialParams?: any;
|
|
22
|
+
/**
|
|
23
|
+
* @description 列表请求方法
|
|
24
|
+
* @param params 请求参数
|
|
25
|
+
* @returns Promise<{ data: { total: number; records: any[] } }>
|
|
26
|
+
*/
|
|
27
|
+
loadMore: (params?: T) => Promise<{
|
|
28
|
+
data: {
|
|
29
|
+
total: number;
|
|
30
|
+
records: any[];
|
|
31
|
+
};
|
|
32
|
+
}>;
|
|
33
|
+
/**
|
|
34
|
+
* @description 列表项的渲染方法
|
|
35
|
+
* @param item 列表项数据
|
|
36
|
+
* @returns React.ReactNode
|
|
37
|
+
*/
|
|
38
|
+
renderItem: (item: P, index: number) => React.ReactNode;
|
|
39
|
+
grid?: object;
|
|
40
|
+
className?: string;
|
|
41
|
+
/**
|
|
42
|
+
* @description 滚动阈值,默认为 100px
|
|
43
|
+
* @default 100px
|
|
44
|
+
*/
|
|
45
|
+
scrollThreshold?: string | number;
|
|
46
|
+
/**
|
|
47
|
+
* @description 滚动高度达到此参数值才出现 BackTop
|
|
48
|
+
* @default 200
|
|
49
|
+
*/
|
|
50
|
+
visibilityHeight?: number;
|
|
51
|
+
}
|
|
52
|
+
export declare type InfiniteScrollListProps<T, P> = ISLProps<T, P>;
|
|
53
|
+
declare const _default: React.MemoExoticComponent<(<T, P>(props: ISLProps<T, P>) => JSX.Element)>;
|
|
54
|
+
export default _default;
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
2
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
3
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
4
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
5
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
6
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
|
+
import { BackTop, Divider, List, Spin } from 'antd';
|
|
8
|
+
import React, { useCallback, useEffect, useRef, useState, useContext } from 'react';
|
|
9
|
+
import InfiniteScroll from 'react-infinite-scroll-component';
|
|
10
|
+
import classNames from 'classnames';
|
|
11
|
+
import { ConfigContext } from "../ConfigProvider";
|
|
12
|
+
import "./styles/index.less";
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
+
var InfiniteScrollList = function InfiniteScrollList(props) {
|
|
16
|
+
var _listData$data2, _listData$data3;
|
|
17
|
+
var loadMore = props.loadMore,
|
|
18
|
+
_props$initialParams = props.initialParams,
|
|
19
|
+
initialParams = _props$initialParams === void 0 ? {} : _props$initialParams,
|
|
20
|
+
_props$itemKey = props.itemKey,
|
|
21
|
+
itemKey = _props$itemKey === void 0 ? 'id' : _props$itemKey,
|
|
22
|
+
_props$containerId = props.containerId,
|
|
23
|
+
containerId = _props$containerId === void 0 ? 'scrollableDiv' : _props$containerId,
|
|
24
|
+
containerHeight = props.containerHeight,
|
|
25
|
+
_props$className = props.className,
|
|
26
|
+
className = _props$className === void 0 ? '' : _props$className,
|
|
27
|
+
grid = props.grid,
|
|
28
|
+
_props$scrollThreshol = props.scrollThreshold,
|
|
29
|
+
scrollThreshold = _props$scrollThreshol === void 0 ? '100px' : _props$scrollThreshol,
|
|
30
|
+
_props$visibilityHeig = props.visibilityHeight,
|
|
31
|
+
visibilityHeight = _props$visibilityHeig === void 0 ? 200 : _props$visibilityHeig,
|
|
32
|
+
_renderItem = props.renderItem;
|
|
33
|
+
var _useContext = useContext(ConfigContext),
|
|
34
|
+
prefixCls = _useContext.prefixCls,
|
|
35
|
+
getPrefixCls = _useContext.getPrefixCls;
|
|
36
|
+
var classname = getPrefixCls('infinite-scroll-wrapper');
|
|
37
|
+
var wrapperClass = classNames(_defineProperty({}, "".concat(prefixCls, "-infinite-scroll-wrapper"), !!prefixCls), classname, className);
|
|
38
|
+
var scrollRef = useRef(null);
|
|
39
|
+
var _useState = useState({
|
|
40
|
+
total: 0,
|
|
41
|
+
data: []
|
|
42
|
+
}),
|
|
43
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
44
|
+
listData = _useState2[0],
|
|
45
|
+
setListData = _useState2[1];
|
|
46
|
+
var _useState3 = useState(false),
|
|
47
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
48
|
+
isLoading = _useState4[0],
|
|
49
|
+
setIsLoading = _useState4[1];
|
|
50
|
+
var _useState5 = useState(_objectSpread({
|
|
51
|
+
current: 1,
|
|
52
|
+
size: 10
|
|
53
|
+
}, initialParams)),
|
|
54
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
55
|
+
pageParams = _useState6[0],
|
|
56
|
+
setPageParams = _useState6[1];
|
|
57
|
+
var handleLoadMore = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
58
|
+
var _listData$data, _yield$loadMore, data, total, records;
|
|
59
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
60
|
+
while (1) switch (_context.prev = _context.next) {
|
|
61
|
+
case 0:
|
|
62
|
+
if (!isLoading) {
|
|
63
|
+
_context.next = 2;
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
return _context.abrupt("return");
|
|
67
|
+
case 2:
|
|
68
|
+
setIsLoading(true);
|
|
69
|
+
_context.prev = 3;
|
|
70
|
+
_context.next = 6;
|
|
71
|
+
return loadMore(_objectSpread({}, pageParams));
|
|
72
|
+
case 6:
|
|
73
|
+
_yield$loadMore = _context.sent;
|
|
74
|
+
data = _yield$loadMore.data;
|
|
75
|
+
total = data.total, records = data.records;
|
|
76
|
+
if ((records === null || records === void 0 ? void 0 : records.length) > 0 && (listData === null || listData === void 0 ? void 0 : (_listData$data = listData.data) === null || _listData$data === void 0 ? void 0 : _listData$data.length) < total) {
|
|
77
|
+
setPageParams(function (prevParams) {
|
|
78
|
+
return _objectSpread(_objectSpread({}, prevParams), {}, {
|
|
79
|
+
current: prevParams.current + 1
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
setListData(function (prevData) {
|
|
84
|
+
return {
|
|
85
|
+
total: total,
|
|
86
|
+
data: total > 0 ? [].concat(_toConsumableArray(prevData.data), _toConsumableArray(records || [])) : []
|
|
87
|
+
};
|
|
88
|
+
});
|
|
89
|
+
setIsLoading(false);
|
|
90
|
+
_context.next = 17;
|
|
91
|
+
break;
|
|
92
|
+
case 14:
|
|
93
|
+
_context.prev = 14;
|
|
94
|
+
_context.t0 = _context["catch"](3);
|
|
95
|
+
setIsLoading(false);
|
|
96
|
+
case 17:
|
|
97
|
+
_context.prev = 17;
|
|
98
|
+
setIsLoading(false);
|
|
99
|
+
return _context.finish(17);
|
|
100
|
+
case 20:
|
|
101
|
+
case "end":
|
|
102
|
+
return _context.stop();
|
|
103
|
+
}
|
|
104
|
+
}, _callee, null, [[3, 14, 17, 20]]);
|
|
105
|
+
})), [loadMore, isLoading, pageParams]);
|
|
106
|
+
useEffect(function () {
|
|
107
|
+
if (Reflect.ownKeys(initialParams).length > 0 && pageParams.current !== 1) {
|
|
108
|
+
var _scrollRef$current;
|
|
109
|
+
scrollRef === null || scrollRef === void 0 ? void 0 : (_scrollRef$current = scrollRef.current) === null || _scrollRef$current === void 0 ? void 0 : _scrollRef$current.scrollTo({
|
|
110
|
+
top: 0,
|
|
111
|
+
behavior: 'smooth'
|
|
112
|
+
});
|
|
113
|
+
setPageParams(_objectSpread({
|
|
114
|
+
current: 1
|
|
115
|
+
}, initialParams));
|
|
116
|
+
}
|
|
117
|
+
handleLoadMore();
|
|
118
|
+
}, [initialParams]);
|
|
119
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
120
|
+
id: containerId,
|
|
121
|
+
className: "scroll-container",
|
|
122
|
+
ref: scrollRef,
|
|
123
|
+
style: {
|
|
124
|
+
height: containerHeight,
|
|
125
|
+
overflowY: 'auto'
|
|
126
|
+
},
|
|
127
|
+
children: [/*#__PURE__*/_jsx(InfiniteScroll, {
|
|
128
|
+
className: "".concat(wrapperClass, " ").concat(className, " "),
|
|
129
|
+
scrollableTarget: containerId,
|
|
130
|
+
dataLength: listData === null || listData === void 0 ? void 0 : (_listData$data2 = listData.data) === null || _listData$data2 === void 0 ? void 0 : _listData$data2.length,
|
|
131
|
+
next: handleLoadMore,
|
|
132
|
+
hasMore: (listData === null || listData === void 0 ? void 0 : (_listData$data3 = listData.data) === null || _listData$data3 === void 0 ? void 0 : _listData$data3.length) < (listData === null || listData === void 0 ? void 0 : listData.total),
|
|
133
|
+
loader: /*#__PURE__*/_jsx("div", {
|
|
134
|
+
style: {
|
|
135
|
+
textAlign: 'center'
|
|
136
|
+
},
|
|
137
|
+
children: /*#__PURE__*/_jsx(Spin, {
|
|
138
|
+
tip: "\u62FC\u547D\u52A0\u8F7D\u4E2D..."
|
|
139
|
+
})
|
|
140
|
+
}),
|
|
141
|
+
endMessage: (listData === null || listData === void 0 ? void 0 : listData.total) > 0 && /*#__PURE__*/_jsx(Divider, {
|
|
142
|
+
plain: true,
|
|
143
|
+
children: "\u5DF2\u7ECF\u5230\u5E95\u90E8\u4E86"
|
|
144
|
+
}),
|
|
145
|
+
scrollThreshold: scrollThreshold,
|
|
146
|
+
inverse: false,
|
|
147
|
+
children: /*#__PURE__*/_jsx(List, {
|
|
148
|
+
grid: grid,
|
|
149
|
+
dataSource: listData.data,
|
|
150
|
+
renderItem: function renderItem(item, index) {
|
|
151
|
+
return /*#__PURE__*/_jsx(List.Item, {
|
|
152
|
+
children: _renderItem(item, index)
|
|
153
|
+
}, item[itemKey]);
|
|
154
|
+
}
|
|
155
|
+
})
|
|
156
|
+
}), /*#__PURE__*/_jsx(BackTop, {
|
|
157
|
+
className: "backtop",
|
|
158
|
+
target: function target() {
|
|
159
|
+
return (scrollRef === null || scrollRef === void 0 ? void 0 : scrollRef.current) || document.body;
|
|
160
|
+
},
|
|
161
|
+
visibilityHeight: visibilityHeight,
|
|
162
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
163
|
+
className: "up",
|
|
164
|
+
children: "\u56DE\u5230\u9876\u90E8"
|
|
165
|
+
})
|
|
166
|
+
})]
|
|
167
|
+
});
|
|
168
|
+
};
|
|
169
|
+
export default /*#__PURE__*/React.memo(InfiniteScrollList);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
@import '../../commonStyle/index.less';
|
|
2
|
+
|
|
3
|
+
.@{prefix}-infinite-scroll-wrapper {
|
|
4
|
+
.ant-list .ant-row {
|
|
5
|
+
margin-right: 0 !important;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.scroll-container {
|
|
10
|
+
position: relative;
|
|
11
|
+
|
|
12
|
+
.backtop {
|
|
13
|
+
right: 50px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.up {
|
|
17
|
+
background: #007aff;
|
|
18
|
+
color: #fff;
|
|
19
|
+
text-align: center;
|
|
20
|
+
border-radius: 3px;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ILabelValueProps } from './interface';
|
|
3
3
|
import './styles/index.less';
|
|
4
|
-
export declare type LabelValueProps = ILabelValueProps;
|
|
5
4
|
declare function LabelValue({ label, value, emptyValue, className, noWrap, noColon }: ILabelValueProps): JSX.Element;
|
|
6
5
|
declare namespace LabelValue {
|
|
7
6
|
var defaultProps: {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import Loading from './loading';
|
|
2
|
-
import {
|
|
2
|
+
import { ILoadingProps, LoadingInstanceProps } from './interface';
|
|
3
3
|
declare const _default: {
|
|
4
|
-
open(params?: LoadingInstanceProps):
|
|
4
|
+
open(params?: LoadingInstanceProps): ILoadingProps;
|
|
5
5
|
close(): void;
|
|
6
|
-
getInstance():
|
|
6
|
+
getInstance(): ILoadingProps;
|
|
7
7
|
};
|
|
8
8
|
export default _default;
|
|
9
9
|
export { Loading };
|
|
@@ -7,8 +7,9 @@ export interface LoadingInstanceProps extends SpinProps {
|
|
|
7
7
|
*/
|
|
8
8
|
container?: ReactInstance | undefined;
|
|
9
9
|
}
|
|
10
|
-
export interface
|
|
10
|
+
export interface ILoadingProps {
|
|
11
11
|
open: (param: LoadingInstanceProps) => React.ReactDOM;
|
|
12
12
|
close: () => void;
|
|
13
13
|
getInstance: () => React.ReactDOM;
|
|
14
14
|
}
|
|
15
|
+
export declare type LoadingProps = ILoadingProps;
|
|
@@ -10,7 +10,6 @@ import { ConfigContext } from "../ConfigProvider";
|
|
|
10
10
|
import "./styles/index.less";
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
12
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
var parentElement;
|
|
14
13
|
function Loading(props) {
|
|
15
14
|
var _props$tip = props.tip,
|
|
16
15
|
tip = _props$tip === void 0 ? '数据请求中...' : _props$tip;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DFormProps, DModalProps } from "./..";
|
|
3
|
+
export declare type ModalFormProps = {
|
|
4
|
+
modalProps: DModalProps & {
|
|
5
|
+
width?: number;
|
|
6
|
+
};
|
|
7
|
+
formProps: DFormProps;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
};
|
|
10
|
+
declare const _default: (props: ModalFormProps) => JSX.Element;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
+
import { DForm, DModal } from "./..";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
export default (function (props) {
|
|
7
|
+
var _props$modalProps = props.modalProps,
|
|
8
|
+
modalProps = _props$modalProps === void 0 ? {} : _props$modalProps,
|
|
9
|
+
formProps = props.formProps,
|
|
10
|
+
children = props.children;
|
|
11
|
+
var _ref = modalProps || {},
|
|
12
|
+
open = _ref.open,
|
|
13
|
+
onOk = _ref.onOk;
|
|
14
|
+
var _DForm$useForm = DForm.useForm(),
|
|
15
|
+
_DForm$useForm2 = _slicedToArray(_DForm$useForm, 1),
|
|
16
|
+
form = _DForm$useForm2[0];
|
|
17
|
+
var modalFooter = !!(formProps !== null && formProps !== void 0 && formProps.disabled) ? {
|
|
18
|
+
footer: null
|
|
19
|
+
} : {};
|
|
20
|
+
var handleOk = function handleOk() {
|
|
21
|
+
form.validateFields().then(function (values) {
|
|
22
|
+
onOk === null || onOk === void 0 ? void 0 : onOk(values);
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
return /*#__PURE__*/_jsxs(DModal, _objectSpread(_objectSpread(_objectSpread({
|
|
26
|
+
open: open,
|
|
27
|
+
style: {
|
|
28
|
+
height: 'auto'
|
|
29
|
+
},
|
|
30
|
+
centered: true,
|
|
31
|
+
destroyOnClose: true,
|
|
32
|
+
okText: "\u786E\u5B9A",
|
|
33
|
+
cancelText: "\u53D6\u6D88",
|
|
34
|
+
bodyStyle: {
|
|
35
|
+
maxHeight: '600px',
|
|
36
|
+
overflowY: 'auto'
|
|
37
|
+
}
|
|
38
|
+
}, modalFooter), _objectSpread(_objectSpread({}, modalProps), {}, {
|
|
39
|
+
onOk: handleOk
|
|
40
|
+
})), {}, {
|
|
41
|
+
children: [children, /*#__PURE__*/_jsx(DForm, _objectSpread(_objectSpread({}, formProps), {}, {
|
|
42
|
+
form: form
|
|
43
|
+
}))]
|
|
44
|
+
}));
|
|
45
|
+
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { INoDataProps } from './interface';
|
|
3
3
|
import './styles/index.less';
|
|
4
|
-
declare const NoData: (props:
|
|
4
|
+
declare const NoData: (props: INoDataProps) => JSX.Element;
|
|
5
5
|
export default NoData;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ImageProps } from 'antd';
|
|
3
|
+
import './index.less';
|
|
4
|
+
interface IPictureCardProps extends Omit<ImageProps, 'src' | 'width'> {
|
|
5
|
+
className?: string;
|
|
6
|
+
layout?: 'vertical' | 'horizontal';
|
|
7
|
+
src: ImageProps['src'] | ImageProps['src'][];
|
|
8
|
+
imageWidth?: ImageProps['width'];
|
|
9
|
+
content?: React.ReactNode;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
hoverable?: boolean;
|
|
12
|
+
bordered?: boolean;
|
|
13
|
+
}
|
|
14
|
+
declare const PictureCard: (props: IPictureCardProps) => JSX.Element;
|
|
15
|
+
export declare type PictureCardProps = IPictureCardProps;
|
|
16
|
+
export default PictureCard;
|