@pointcloud/pcloud-components 0.1.32 → 0.1.34
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 +39 -31
- package/dist/esm/AdvancedFilter/FormFilter.d.ts +4 -4
- package/dist/esm/AdvancedFilter/index.d.ts +5 -5
- package/dist/esm/AdvancedFilter/interface.d.ts +101 -101
- package/dist/esm/AnimatedScrollList/index.d.ts +7 -7
- package/dist/esm/AnimatedScrollList/interface.d.ts +71 -71
- package/dist/esm/AspectRatio/index.d.ts +9 -9
- package/dist/esm/AuthComponent/index.d.ts +3 -3
- package/dist/esm/AuthComponent/interface.d.ts +24 -24
- package/dist/esm/CRUD/config.d.ts +2 -0
- package/dist/esm/CRUD/config.js +21 -0
- package/dist/esm/CRUD/index.d.ts +98 -0
- package/dist/esm/CRUD/index.js +669 -0
- package/dist/esm/CRUD/index.less +140 -0
- package/dist/esm/CRUD/toolbar.d.ts +16 -0
- package/dist/esm/CRUD/toolbar.js +249 -0
- package/dist/esm/ColorPicker/index.d.ts +17 -18
- package/dist/esm/ColorPicker/interface.d.ts +164 -164
- package/dist/esm/ConfigProvider/index.d.ts +6 -6
- package/dist/esm/ConfigProvider/index.js +7 -13
- package/dist/esm/ConfigProvider/interface.d.ts +9 -9
- package/dist/esm/ContextMenu/index.d.ts +28 -28
- package/dist/esm/DCascader/index.d.ts +24 -24
- package/dist/esm/DForm/DItem/index.d.ts +5 -5
- package/dist/esm/DForm/DItem/itemType.d.ts +123 -119
- package/dist/esm/DForm/DItem/itemsRender.d.ts +47 -45
- package/dist/esm/DForm/DItem/itemsRender.js +6 -0
- package/dist/esm/DForm/helper.d.ts +8 -8
- package/dist/esm/DForm/index.d.ts +29 -29
- package/dist/esm/DInput/index.d.ts +19 -19
- package/dist/esm/DModal/index.d.ts +19 -18
- package/dist/esm/DModal/index.js +11 -9
- package/dist/esm/DModal/interface.d.ts +8 -14
- package/dist/esm/DRangePicker/index.d.ts +7 -0
- package/dist/esm/DRangePicker/index.js +24 -0
- package/dist/esm/DRangePicker/index.less +30 -0
- package/dist/esm/DRangePicker/interface.d.ts +5 -0
- package/dist/esm/DRangePicker/interface.js +1 -0
- package/dist/esm/DSelect/index.d.ts +24 -24
- package/dist/esm/DTable/index.d.ts +62 -46
- package/dist/esm/DTable/index.js +43 -13
- package/dist/esm/DTreeSelect/index.d.ts +16 -16
- package/dist/esm/DUpload/helper.d.ts +107 -107
- package/dist/esm/DUpload/index.d.ts +55 -55
- package/dist/esm/ErrorBoundary/index.d.ts +5 -6
- package/dist/esm/IPAddress/index.d.ts +20 -20
- package/dist/esm/IconFont/index.d.ts +17 -17
- package/dist/esm/InfiniteScrollList/index.d.ts +63 -63
- package/dist/esm/LabelValue/index.d.ts +16 -16
- package/dist/esm/LabelValue/interface.d.ts +39 -39
- package/dist/esm/Loading/hooks/useLoading.d.ts +6 -6
- package/dist/esm/Loading/index.d.ts +10 -10
- package/dist/esm/Loading/interface.d.ts +23 -23
- package/dist/esm/Loading/loading.d.ts +9 -8
- package/dist/esm/Loading/loading.js +48 -23
- package/dist/esm/Loading/styles/index.less +37 -25
- package/dist/esm/LoginForm/defaultConfig.d.ts +4 -4
- package/dist/esm/LoginForm/index.d.ts +21 -21
- package/dist/esm/ModalForm/index.d.ts +13 -11
- package/dist/esm/ModalForm/index.js +76 -7
- package/dist/esm/NoData/index.d.ts +4 -5
- package/dist/esm/NoData/interface.d.ts +13 -13
- package/dist/esm/OrgTree/index.d.ts +5 -5
- package/dist/esm/OrgTree/interface.d.ts +41 -41
- package/dist/esm/PictureCard/index.d.ts +16 -16
- package/dist/esm/RCropper/handler.d.ts +16 -16
- package/dist/esm/RCropper/index.d.ts +4 -4
- package/dist/esm/RCropper/interface.d.ts +70 -70
- package/dist/esm/RCropper/svgIcons.d.ts +28 -28
- package/dist/esm/RCropper/toolbar.d.ts +5 -5
- package/dist/esm/RndDrag/index.d.ts +5 -6
- package/dist/esm/ScrollNumber/index.d.ts +7 -8
- package/dist/esm/SignaturePad/index.d.ts +32 -32
- package/dist/esm/TypewriterText/index.d.ts +5 -5
- package/dist/esm/TypewriterText/interface.d.ts +42 -42
- package/dist/esm/WordCloud/index.d.ts +10 -11
- package/dist/esm/index.d.ts +66 -62
- package/dist/esm/index.js +3 -1
- package/dist/umd/pcloud-components.min.css +1 -1
- package/dist/umd/pcloud-components.min.js +1 -1
- package/package.json +15 -5
|
@@ -2,7 +2,7 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["delay"],
|
|
5
|
+
var _excluded = ["delay", "isBodyContainer"],
|
|
6
6
|
_excluded2 = ["container"];
|
|
7
7
|
import { Spin } from 'antd';
|
|
8
8
|
import classNames from 'classnames';
|
|
@@ -10,37 +10,45 @@ import { useContext, useEffect, useRef, useState } from 'react';
|
|
|
10
10
|
import ReactDOM from 'react-dom';
|
|
11
11
|
import { ConfigContext } from "../ConfigProvider";
|
|
12
12
|
import "./styles/index.less";
|
|
13
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
14
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
15
|
function Loading(props) {
|
|
17
16
|
var delay = props.delay,
|
|
17
|
+
isBodyContainer = props.isBodyContainer,
|
|
18
18
|
other = _objectWithoutProperties(props, _excluded);
|
|
19
19
|
var _useContext = useContext(ConfigContext),
|
|
20
20
|
prefixCls = _useContext.prefixCls,
|
|
21
21
|
getPrefixCls = _useContext.getPrefixCls;
|
|
22
22
|
var classname = getPrefixCls('loading');
|
|
23
|
-
var wrapperClass = classNames(_defineProperty({}, "".concat(prefixCls, "-loading"), !!prefixCls), classname
|
|
23
|
+
var wrapperClass = classNames(_defineProperty({}, "".concat(prefixCls, "-loading"), !!prefixCls), classname, {
|
|
24
|
+
'body-container': isBodyContainer
|
|
25
|
+
});
|
|
24
26
|
var _useState = useState(false),
|
|
25
27
|
_useState2 = _slicedToArray(_useState, 2),
|
|
26
28
|
visible = _useState2[0],
|
|
27
29
|
setVisible = _useState2[1];
|
|
28
30
|
var timer = useRef();
|
|
29
31
|
useEffect(function () {
|
|
30
|
-
|
|
32
|
+
if (isBodyContainer) {
|
|
33
|
+
document.body.style.overflow = 'hidden';
|
|
34
|
+
}
|
|
31
35
|
return function () {
|
|
32
|
-
|
|
36
|
+
if (isBodyContainer) {
|
|
37
|
+
document.body.style.overflow = '';
|
|
38
|
+
}
|
|
33
39
|
};
|
|
34
|
-
}, []);
|
|
40
|
+
}, [isBodyContainer]);
|
|
35
41
|
useEffect(function () {
|
|
36
|
-
timer.current = setTimeout(function () {
|
|
42
|
+
timer.current = window.setTimeout(function () {
|
|
37
43
|
return setVisible(true);
|
|
38
44
|
}, delay || 0);
|
|
39
45
|
return function () {
|
|
40
|
-
|
|
46
|
+
if (timer.current) {
|
|
47
|
+
window.clearTimeout(timer.current);
|
|
48
|
+
}
|
|
41
49
|
};
|
|
42
50
|
}, [delay]);
|
|
43
|
-
if (!visible) return
|
|
51
|
+
if (!visible) return null;
|
|
44
52
|
return /*#__PURE__*/_jsxs("div", {
|
|
45
53
|
className: wrapperClass,
|
|
46
54
|
children: [/*#__PURE__*/_jsx("div", {
|
|
@@ -62,24 +70,41 @@ Loading.newInstance = function newNotificationInstance(args) {
|
|
|
62
70
|
var _ref = args || {},
|
|
63
71
|
container = _ref.container,
|
|
64
72
|
otherProps = _objectWithoutProperties(_ref, _excluded2);
|
|
65
|
-
var
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
element
|
|
71
|
-
element.style.position = 'relative';
|
|
73
|
+
var element;
|
|
74
|
+
var createdDiv = document.createElement('div');
|
|
75
|
+
var isBodyContainer = !container || container === document.body;
|
|
76
|
+
if (isBodyContainer) {
|
|
77
|
+
document.body.appendChild(createdDiv);
|
|
78
|
+
element = createdDiv;
|
|
72
79
|
} else {
|
|
73
|
-
|
|
80
|
+
// eslint-disable-next-line react/no-find-dom-node
|
|
81
|
+
var containerElement = ReactDOM.findDOMNode(container);
|
|
82
|
+
element = containerElement;
|
|
83
|
+
|
|
84
|
+
// 确保容器有相对定位
|
|
85
|
+
if (element) {
|
|
86
|
+
var computedStyle = window.getComputedStyle(element);
|
|
87
|
+
if (!computedStyle.position || computedStyle.position === 'static') {
|
|
88
|
+
element.style.position = 'relative';
|
|
89
|
+
}
|
|
90
|
+
element.appendChild(createdDiv);
|
|
91
|
+
}
|
|
74
92
|
}
|
|
75
|
-
|
|
93
|
+
|
|
94
|
+
// 在新创建的div元素上渲染Loading组件,避免替换原有内容
|
|
95
|
+
ReactDOM.render( /*#__PURE__*/_jsx(Loading, _objectSpread(_objectSpread({}, otherProps), {}, {
|
|
96
|
+
isBodyContainer: isBodyContainer
|
|
97
|
+
})), createdDiv);
|
|
76
98
|
return {
|
|
77
99
|
destroy: function destroy() {
|
|
78
|
-
ReactDOM.unmountComponentAtNode(
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
100
|
+
ReactDOM.unmountComponentAtNode(createdDiv);
|
|
101
|
+
// 如果是我们创建的div,则从DOM中移除
|
|
102
|
+
if (createdDiv && createdDiv.parentNode) {
|
|
103
|
+
createdDiv.parentNode.removeChild(createdDiv);
|
|
104
|
+
}
|
|
105
|
+
// 如果是body容器,清理overflow样式
|
|
106
|
+
if (isBodyContainer) {
|
|
107
|
+
document.body.style.overflow = '';
|
|
83
108
|
}
|
|
84
109
|
}
|
|
85
110
|
};
|
|
@@ -1,25 +1,37 @@
|
|
|
1
|
-
@import '../../commonStyle/index.less';
|
|
2
|
-
|
|
3
|
-
.@{prefix}-loading {
|
|
4
|
-
.mask {
|
|
5
|
-
position:
|
|
6
|
-
top: 0;
|
|
7
|
-
left: 0;
|
|
8
|
-
z-index: 100000;
|
|
9
|
-
width: 100%;
|
|
10
|
-
height: 100%;
|
|
11
|
-
overflow: hidden;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
1
|
+
@import '../../commonStyle/index.less';
|
|
2
|
+
|
|
3
|
+
.@{prefix}-loading {
|
|
4
|
+
.mask {
|
|
5
|
+
position: absolute;
|
|
6
|
+
top: 0;
|
|
7
|
+
left: 0;
|
|
8
|
+
z-index: 100000;
|
|
9
|
+
width: 100%;
|
|
10
|
+
height: 100%;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
background: rgba(0, 0, 0, 30%); // 添加半透明背景色
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.loading {
|
|
16
|
+
position: absolute;
|
|
17
|
+
top: 50%;
|
|
18
|
+
left: 50%;
|
|
19
|
+
z-index: 100001;
|
|
20
|
+
padding: 20px;
|
|
21
|
+
background: rgba(255, 255, 255, 90%); // 调整背景透明度
|
|
22
|
+
border-radius: 10px;
|
|
23
|
+
box-shadow: 3px 3px 3px rgba(0, 0, 0, 20%); // 调整阴影
|
|
24
|
+
transform: translate(-50%, -50%);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* 当挂载到body时使用fixed定位 */
|
|
28
|
+
&.body-container {
|
|
29
|
+
.mask {
|
|
30
|
+
position: fixed;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.loading {
|
|
34
|
+
position: fixed;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { InputItemProps, PasswordItemProps, ButtonItemProps } from '../DForm/DItem/itemType';
|
|
2
|
-
export declare const defaultUsernameItem: InputItemProps;
|
|
3
|
-
export declare const defaultPasswordItem: PasswordItemProps;
|
|
4
|
-
export declare const defaultLoginButtonItem: ButtonItemProps;
|
|
1
|
+
import type { InputItemProps, PasswordItemProps, ButtonItemProps } from '../DForm/DItem/itemType';
|
|
2
|
+
export declare const defaultUsernameItem: InputItemProps;
|
|
3
|
+
export declare const defaultPasswordItem: PasswordItemProps;
|
|
4
|
+
export declare const defaultLoginButtonItem: ButtonItemProps;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { FormProps, FormInstance } from 'antd';
|
|
3
|
-
import { type DItemProps } from "
|
|
4
|
-
export interface LoginFormProps extends Omit<FormProps, 'onFinish'> {
|
|
5
|
-
/** 登录表单额外的表单项 */
|
|
6
|
-
extraItems?: DItemProps[];
|
|
7
|
-
/** 点击登录按钮的回调 */
|
|
8
|
-
onFinish?: (values: any) => void | Promise<any>;
|
|
9
|
-
/** 登录按钮文本 */
|
|
10
|
-
loginText?: string;
|
|
11
|
-
/** 是否禁用登录按钮 */
|
|
12
|
-
loginButtonDisabled?: boolean;
|
|
13
|
-
/** 用户名表单项配置 */
|
|
14
|
-
usernameItem?: Partial<DItemProps>;
|
|
15
|
-
/** 密码表单项配置 */
|
|
16
|
-
passwordItem?: Partial<DItemProps>;
|
|
17
|
-
/** 登录按钮表单项配置 */
|
|
18
|
-
loginButtonItem?: Partial<DItemProps>;
|
|
19
|
-
}
|
|
20
|
-
declare const LoginForm: React.ForwardRefExoticComponent<LoginFormProps & React.RefAttributes<FormInstance<any>>>;
|
|
21
|
-
export default LoginForm;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FormProps, FormInstance } from 'antd';
|
|
3
|
+
import { type DItemProps } from "..";
|
|
4
|
+
export interface LoginFormProps extends Omit<FormProps, 'onFinish'> {
|
|
5
|
+
/** 登录表单额外的表单项 */
|
|
6
|
+
extraItems?: DItemProps[];
|
|
7
|
+
/** 点击登录按钮的回调 */
|
|
8
|
+
onFinish?: (values: any) => void | Promise<any>;
|
|
9
|
+
/** 登录按钮文本 */
|
|
10
|
+
loginText?: string;
|
|
11
|
+
/** 是否禁用登录按钮 */
|
|
12
|
+
loginButtonDisabled?: boolean;
|
|
13
|
+
/** 用户名表单项配置 */
|
|
14
|
+
usernameItem?: Partial<DItemProps>;
|
|
15
|
+
/** 密码表单项配置 */
|
|
16
|
+
passwordItem?: Partial<DItemProps>;
|
|
17
|
+
/** 登录按钮表单项配置 */
|
|
18
|
+
loginButtonItem?: Partial<DItemProps>;
|
|
19
|
+
}
|
|
20
|
+
declare const LoginForm: React.ForwardRefExoticComponent<LoginFormProps & React.RefAttributes<FormInstance<any>>>;
|
|
21
|
+
export default LoginForm;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { DFormProps, DModalProps } from "
|
|
3
|
-
export
|
|
4
|
-
modalProps: DModalProps & {
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
formProps: DFormProps
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DFormProps, DModalProps } from "..";
|
|
3
|
+
export type ModalFormProps = {
|
|
4
|
+
modalProps: DModalProps & {
|
|
5
|
+
onError?: (_error: any) => void;
|
|
6
|
+
};
|
|
7
|
+
formProps: DFormProps & {
|
|
8
|
+
values?: any;
|
|
9
|
+
};
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
};
|
|
12
|
+
declare const _default: (props: ModalFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default _default;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
3
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
2
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
5
|
import { DForm, DModal } from "./..";
|
|
6
|
+
import { useEffect, useState, useMemo } from 'react';
|
|
4
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
8
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
9
|
export default (function (props) {
|
|
@@ -10,18 +13,83 @@ export default (function (props) {
|
|
|
10
13
|
children = props.children;
|
|
11
14
|
var _ref = modalProps || {},
|
|
12
15
|
open = _ref.open,
|
|
13
|
-
onOk = _ref.onOk
|
|
16
|
+
onOk = _ref.onOk,
|
|
17
|
+
onError = _ref.onError;
|
|
18
|
+
// 使用内部isLoading状态,当外部没有提供confirmLoading时自动管理
|
|
19
|
+
var _useState = useState(false),
|
|
20
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
21
|
+
isLoading = _useState2[0],
|
|
22
|
+
setIsLoading = _useState2[1];
|
|
14
23
|
var _DForm$useForm = DForm.useForm(),
|
|
15
24
|
_DForm$useForm2 = _slicedToArray(_DForm$useForm, 1),
|
|
16
25
|
form = _DForm$useForm2[0];
|
|
26
|
+
var formInstance = (formProps === null || formProps === void 0 ? void 0 : formProps.form) || form;
|
|
27
|
+
var finalLoading = useMemo(function () {
|
|
28
|
+
return modalProps.confirmLoading !== undefined ? modalProps.confirmLoading : isLoading;
|
|
29
|
+
}, [isLoading, modalProps.confirmLoading]);
|
|
17
30
|
var modalFooter = !!(formProps !== null && formProps !== void 0 && formProps.disabled) ? {
|
|
18
31
|
footer: null
|
|
19
32
|
} : {};
|
|
20
|
-
var handleOk = function
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
33
|
+
var handleOk = /*#__PURE__*/function () {
|
|
34
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
35
|
+
var values;
|
|
36
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
37
|
+
while (1) switch (_context.prev = _context.next) {
|
|
38
|
+
case 0:
|
|
39
|
+
_context.prev = 0;
|
|
40
|
+
_context.next = 3;
|
|
41
|
+
return form.validateFields();
|
|
42
|
+
case 3:
|
|
43
|
+
values = _context.sent;
|
|
44
|
+
if (!onOk) {
|
|
45
|
+
_context.next = 8;
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
// 如果外部没有提供loading状态,内部自动管理
|
|
49
|
+
if (modalProps.confirmLoading === undefined) {
|
|
50
|
+
setIsLoading(true);
|
|
51
|
+
}
|
|
52
|
+
_context.next = 8;
|
|
53
|
+
return onOk === null || onOk === void 0 ? void 0 : onOk(values);
|
|
54
|
+
case 8:
|
|
55
|
+
_context.next = 14;
|
|
56
|
+
break;
|
|
57
|
+
case 10:
|
|
58
|
+
_context.prev = 10;
|
|
59
|
+
_context.t0 = _context["catch"](0);
|
|
60
|
+
console.error('Form validation failed:', _context.t0);
|
|
61
|
+
onError === null || onError === void 0 || onError(_context.t0);
|
|
62
|
+
case 14:
|
|
63
|
+
_context.prev = 14;
|
|
64
|
+
if (modalProps.confirmLoading === undefined) {
|
|
65
|
+
setIsLoading(false);
|
|
66
|
+
}
|
|
67
|
+
return _context.finish(14);
|
|
68
|
+
case 17:
|
|
69
|
+
case "end":
|
|
70
|
+
return _context.stop();
|
|
71
|
+
}
|
|
72
|
+
}, _callee, null, [[0, 10, 14, 17]]);
|
|
73
|
+
}));
|
|
74
|
+
return function handleOk() {
|
|
75
|
+
return _ref2.apply(this, arguments);
|
|
76
|
+
};
|
|
77
|
+
}();
|
|
78
|
+
useEffect(function () {
|
|
79
|
+
if (open) {
|
|
80
|
+
var _Object$keys;
|
|
81
|
+
formInstance.resetFields();
|
|
82
|
+
var values = formProps === null || formProps === void 0 ? void 0 : formProps.values;
|
|
83
|
+
var isEmpty = values && ((_Object$keys = Object.keys(values)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) === 0 && (values === null || values === void 0 ? void 0 : values.constructor) === Object;
|
|
84
|
+
if (isEmpty) {
|
|
85
|
+
formInstance.setFieldsValue({});
|
|
86
|
+
} else {
|
|
87
|
+
formInstance.setFieldsValue(values);
|
|
88
|
+
}
|
|
89
|
+
} else {
|
|
90
|
+
setIsLoading(false);
|
|
91
|
+
}
|
|
92
|
+
}, [open, formProps.values]);
|
|
25
93
|
return /*#__PURE__*/_jsxs(DModal, _objectSpread(_objectSpread(_objectSpread({
|
|
26
94
|
open: open,
|
|
27
95
|
style: {
|
|
@@ -34,7 +102,8 @@ export default (function (props) {
|
|
|
34
102
|
bodyStyle: {
|
|
35
103
|
maxHeight: '600px',
|
|
36
104
|
overflowY: 'auto'
|
|
37
|
-
}
|
|
105
|
+
},
|
|
106
|
+
confirmLoading: finalLoading
|
|
38
107
|
}, modalFooter), _objectSpread(_objectSpread({}, modalProps), {}, {
|
|
39
108
|
onOk: handleOk
|
|
40
109
|
})), {}, {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
export default NoData;
|
|
1
|
+
import { INoDataProps } from './interface';
|
|
2
|
+
import './styles/index.less';
|
|
3
|
+
declare const NoData: (props: INoDataProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export default NoData;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export interface INoDataProps {
|
|
2
|
-
/**
|
|
3
|
-
* @description 无数据时的文字描述
|
|
4
|
-
* @default 暂无结果
|
|
5
|
-
*/
|
|
6
|
-
emptyText?: string;
|
|
7
|
-
/**
|
|
8
|
-
* @description 无数据时展示的图片
|
|
9
|
-
* @default 内置的base64图片
|
|
10
|
-
*/
|
|
11
|
-
src?: string;
|
|
12
|
-
}
|
|
13
|
-
export
|
|
1
|
+
export interface INoDataProps {
|
|
2
|
+
/**
|
|
3
|
+
* @description 无数据时的文字描述
|
|
4
|
+
* @default 暂无结果
|
|
5
|
+
*/
|
|
6
|
+
emptyText?: string;
|
|
7
|
+
/**
|
|
8
|
+
* @description 无数据时展示的图片
|
|
9
|
+
* @default 内置的base64图片
|
|
10
|
+
*/
|
|
11
|
+
src?: string;
|
|
12
|
+
}
|
|
13
|
+
export type NoDataProps = INoDataProps;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { OrgTreeProps } from './interface';
|
|
3
|
-
import './index.less';
|
|
4
|
-
declare const OrgTree: import("react").ForwardRefExoticComponent<OrgTreeProps & import("react").RefAttributes<any>>;
|
|
5
|
-
export default OrgTree;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { OrgTreeProps } from './interface';
|
|
3
|
+
import './index.less';
|
|
4
|
+
declare const OrgTree: import("react").ForwardRefExoticComponent<OrgTreeProps & import("react").RefAttributes<any>>;
|
|
5
|
+
export default OrgTree;
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export interface OrgTreeNode {
|
|
3
|
-
/** 节点唯一标识 */
|
|
4
|
-
id: string | number;
|
|
5
|
-
/** 节点显示文本 */
|
|
6
|
-
label: string;
|
|
7
|
-
/** 节点标题 */
|
|
8
|
-
title?: string;
|
|
9
|
-
/** 子节点 */
|
|
10
|
-
children?: OrgTreeNode[];
|
|
11
|
-
/** 节点是否展开 */
|
|
12
|
-
expand?: boolean;
|
|
13
|
-
/** 节点是否可折叠 */
|
|
14
|
-
collapsable?: boolean;
|
|
15
|
-
/** 自定义节点类名 */
|
|
16
|
-
className?: string;
|
|
17
|
-
/** 节点数据 */
|
|
18
|
-
[key: string]: any;
|
|
19
|
-
}
|
|
20
|
-
export interface OrgTreeProps {
|
|
21
|
-
/** 组织树数据 */
|
|
22
|
-
data: OrgTreeNode;
|
|
23
|
-
/** 水平方向布局 */
|
|
24
|
-
horizontal?: boolean;
|
|
25
|
-
/** 是否可折叠 */
|
|
26
|
-
collapsable?: boolean;
|
|
27
|
-
/** 是否展开所有节点 */
|
|
28
|
-
expandAll?: boolean;
|
|
29
|
-
/** 自定义节点渲染 */
|
|
30
|
-
/** 自定义类名 */
|
|
31
|
-
className?: string;
|
|
32
|
-
/** 自定义样式 */
|
|
33
|
-
style?: React.CSSProperties;
|
|
34
|
-
/** 标签宽度 */
|
|
35
|
-
labelWidth?: string | number;
|
|
36
|
-
/** 标签自定义类名 */
|
|
37
|
-
labelClassName?: string;
|
|
38
|
-
onClick?: (event: React.MouseEvent, node: OrgTreeNode) => void;
|
|
39
|
-
/** 自定义渲染节点内容 */
|
|
40
|
-
renderContent?: (node: OrgTreeNode) => React.ReactNode;
|
|
41
|
-
}
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface OrgTreeNode {
|
|
3
|
+
/** 节点唯一标识 */
|
|
4
|
+
id: string | number;
|
|
5
|
+
/** 节点显示文本 */
|
|
6
|
+
label: string;
|
|
7
|
+
/** 节点标题 */
|
|
8
|
+
title?: string;
|
|
9
|
+
/** 子节点 */
|
|
10
|
+
children?: OrgTreeNode[];
|
|
11
|
+
/** 节点是否展开 */
|
|
12
|
+
expand?: boolean;
|
|
13
|
+
/** 节点是否可折叠 */
|
|
14
|
+
collapsable?: boolean;
|
|
15
|
+
/** 自定义节点类名 */
|
|
16
|
+
className?: string;
|
|
17
|
+
/** 节点数据 */
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
}
|
|
20
|
+
export interface OrgTreeProps {
|
|
21
|
+
/** 组织树数据 */
|
|
22
|
+
data: OrgTreeNode;
|
|
23
|
+
/** 水平方向布局 */
|
|
24
|
+
horizontal?: boolean;
|
|
25
|
+
/** 是否可折叠 */
|
|
26
|
+
collapsable?: boolean;
|
|
27
|
+
/** 是否展开所有节点 */
|
|
28
|
+
expandAll?: boolean;
|
|
29
|
+
/** 自定义节点渲染 */
|
|
30
|
+
/** 自定义类名 */
|
|
31
|
+
className?: string;
|
|
32
|
+
/** 自定义样式 */
|
|
33
|
+
style?: React.CSSProperties;
|
|
34
|
+
/** 标签宽度 */
|
|
35
|
+
labelWidth?: string | number;
|
|
36
|
+
/** 标签自定义类名 */
|
|
37
|
+
labelClassName?: string;
|
|
38
|
+
onClick?: (event: React.MouseEvent, node: OrgTreeNode) => void;
|
|
39
|
+
/** 自定义渲染节点内容 */
|
|
40
|
+
renderContent?: (node: OrgTreeNode) => React.ReactNode;
|
|
41
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ImageProps } from 'antd';
|
|
3
|
-
import './index.less';
|
|
4
|
-
interface IPictureCardProps extends Omit<ImageProps, 'src' | 'width' | 'content'> {
|
|
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) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export
|
|
16
|
-
export default PictureCard;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ImageProps } from 'antd';
|
|
3
|
+
import './index.less';
|
|
4
|
+
interface IPictureCardProps extends Omit<ImageProps, 'src' | 'width' | 'content'> {
|
|
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) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export type PictureCardProps = IPictureCardProps;
|
|
16
|
+
export default PictureCard;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { RCropperActionHandlers } from './interface';
|
|
3
|
-
import type Cropper from 'cropperjs';
|
|
4
|
-
export declare function createCropperHandlers(cropperInstanceRef: React.RefObject<Cropper | null>, imgTransformRef: React.RefObject<number[] | undefined>, props: {
|
|
5
|
-
onCrop?: (base64: string, file?: File) => void;
|
|
6
|
-
onZoom?: (transform: number[] | undefined) => void;
|
|
7
|
-
onRotate?: (transform: number[] | undefined) => void;
|
|
8
|
-
onFlip?: (transform: number[] | undefined) => void;
|
|
9
|
-
onReset?: (transform: number[] | undefined) => void;
|
|
10
|
-
onCancelCrop?: (info: {
|
|
11
|
-
x: number;
|
|
12
|
-
y: number;
|
|
13
|
-
width: number;
|
|
14
|
-
height: number;
|
|
15
|
-
}) => void;
|
|
16
|
-
}): RCropperActionHandlers;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { RCropperActionHandlers } from './interface';
|
|
3
|
+
import type Cropper from 'cropperjs';
|
|
4
|
+
export declare function createCropperHandlers(cropperInstanceRef: React.RefObject<Cropper | null>, imgTransformRef: React.RefObject<number[] | undefined>, props: {
|
|
5
|
+
onCrop?: (base64: string, file?: File) => void;
|
|
6
|
+
onZoom?: (transform: number[] | undefined) => void;
|
|
7
|
+
onRotate?: (transform: number[] | undefined) => void;
|
|
8
|
+
onFlip?: (transform: number[] | undefined) => void;
|
|
9
|
+
onReset?: (transform: number[] | undefined) => void;
|
|
10
|
+
onCancelCrop?: (info: {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
}) => void;
|
|
16
|
+
}): RCropperActionHandlers;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { RCropperProps } from './interface';
|
|
3
|
-
declare const RCropper: React.ForwardRefExoticComponent<RCropperProps & React.RefAttributes<unknown>>;
|
|
4
|
-
export default RCropper;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { RCropperProps } from './interface';
|
|
3
|
+
declare const RCropper: React.ForwardRefExoticComponent<RCropperProps & React.RefAttributes<unknown>>;
|
|
4
|
+
export default RCropper;
|