react-toolkits 2.13.17 → 2.13.18
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/CHANGELOG.md +6 -0
- package/lib/index.js +2 -5
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/lib/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { jwtDecode } from 'jwt-decode';
|
|
|
3
3
|
import { useStore, create, createStore } from 'zustand';
|
|
4
4
|
import { persist, createJSONStorage } from 'zustand/middleware';
|
|
5
5
|
import * as Antd2 from 'antd';
|
|
6
|
-
import { Modal,
|
|
6
|
+
import { Modal, Form, Spin, Result, Table, Button, Card, Input, Select, theme, Space, Tag, Typography, Alert, Divider, Menu, App, Switch, InputNumber, Row, Col, Breadcrumb, Descriptions, Skeleton, Empty, Dropdown, Tooltip, Popconfirm, Collapse, Checkbox } from 'antd';
|
|
7
7
|
import { forwardRef, lazy, useContext, useMemo, useState, useEffect, useImperativeHandle, cloneElement, useRef, createContext, memo, useCallback, Fragment as Fragment$1, Suspense } from 'react';
|
|
8
8
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
9
9
|
import { last, has, template, get, isEqual, first } from 'lodash-es';
|
|
@@ -1043,12 +1043,9 @@ function useModal(props) {
|
|
|
1043
1043
|
const open = isOpen(_id);
|
|
1044
1044
|
const [confirmLoading, setConfirmLoading] = useState(false);
|
|
1045
1045
|
const isRenderFunction = typeof content === "function";
|
|
1046
|
-
const [loading, setLoading] = useState(false);
|
|
1047
1046
|
const _show = async () => {
|
|
1048
1047
|
show(_id);
|
|
1049
|
-
setLoading(true);
|
|
1050
1048
|
await afterOpen?.();
|
|
1051
|
-
setLoading(false);
|
|
1052
1049
|
};
|
|
1053
1050
|
const _hide = () => {
|
|
1054
1051
|
hide(_id);
|
|
@@ -1065,7 +1062,7 @@ function useModal(props) {
|
|
|
1065
1062
|
setConfirmLoading(false);
|
|
1066
1063
|
}
|
|
1067
1064
|
};
|
|
1068
|
-
const internalModal = /* @__PURE__ */ jsx(Modal, { ...modalProps, open, confirmLoading, onOk, onCancel, children:
|
|
1065
|
+
const internalModal = /* @__PURE__ */ jsx(Modal, { ...modalProps, open, confirmLoading, onOk, onCancel, children: isRenderFunction ? content({ hide: _hide }) : content });
|
|
1069
1066
|
return {
|
|
1070
1067
|
id: _id,
|
|
1071
1068
|
show: _show,
|