@ccs-ui/rc-pro 1.2.0-beta-1 → 1.2.0-beta-2
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FormProps } from 'antd';
|
|
2
2
|
import { DialogFormRef } from './form';
|
|
3
3
|
import { CcsDialogModalProps } from './hook';
|
|
4
|
-
declare const DialogRequestButton: ({ auth, formRef, extraBtn, formInitialValues, request, onCancel, onRequestBefore, }: Pick<CcsDialogModalProps, "auth" | "request" | "
|
|
4
|
+
declare const DialogRequestButton: ({ auth, formRef, extraBtn, formInitialValues, request, onCancel, onRequestBefore, }: Pick<CcsDialogModalProps, "auth" | "request" | "onRequestBefore" | "onCancel" | "extraBtn"> & {
|
|
5
5
|
formRef: React.RefObject<DialogFormRef>;
|
|
6
6
|
formInitialValues: FormProps['initialValues'];
|
|
7
7
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FormProps } from 'antd';
|
|
2
2
|
import { DialogFormRef } from './form';
|
|
3
3
|
import { CcsDialogModalProps } from './hook';
|
|
4
|
-
declare const DialogSelfOkButton: ({ auth, formRef, extraBtn, formInitialValues, onCancel, onOk, }: Pick<CcsDialogModalProps, "auth" | "
|
|
4
|
+
declare const DialogSelfOkButton: ({ auth, formRef, extraBtn, formInitialValues, onCancel, onOk, }: Pick<CcsDialogModalProps, "auth" | "onCancel" | "extraBtn" | "onOk"> & {
|
|
5
5
|
formRef: React.RefObject<DialogFormRef>;
|
|
6
6
|
formInitialValues: FormProps['initialValues'];
|
|
7
7
|
}) => import("react/jsx-runtime").JSX.Element;
|
package/es/dialog/HookDrawer.js
CHANGED
|
@@ -21,7 +21,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
21
21
|
var HookDrawer = function HookDrawer(_ref, ref) {
|
|
22
22
|
var hookAfterClose = _ref.afterClose,
|
|
23
23
|
config = _ref.config;
|
|
24
|
-
console.log('config', config);
|
|
25
24
|
var _useState = useState(function () {
|
|
26
25
|
if (config.open === undefined) {
|
|
27
26
|
return _objectSpread(_objectSpread({}, config), {}, {
|
|
@@ -110,7 +109,6 @@ var HookDrawer = function HookDrawer(_ref, ref) {
|
|
|
110
109
|
ref: buttonRef
|
|
111
110
|
});
|
|
112
111
|
};
|
|
113
|
-
console.log('innerConfig.styles?.body', innerConfig.styles);
|
|
114
112
|
return /*#__PURE__*/_jsx(Drawer, _objectSpread(_objectSpread({
|
|
115
113
|
afterOpenChange: function afterOpenChange(open) {
|
|
116
114
|
if (!open) afterClose();
|
package/es/dialog/button.js
CHANGED
|
@@ -93,7 +93,6 @@ export default function CcsDialogButtons(_ref2) {
|
|
|
93
93
|
children: btns
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
|
-
console.log('btns', btns);
|
|
97
96
|
CcsUtils.showWarning(!!buttonRef.current, "\u68C0\u6D4B\u5230".concat(buttonType === 'modal' ? 'openModal' : 'openDrawer', "\u4F20\u5165request\u53C2\u6570\uFF0CButtons\u5C06\u4E0D\u80FD\u751F\u6548\u3002"));
|
|
98
97
|
(_buttonRef$current = buttonRef.current) === null || _buttonRef$current === void 0 || _buttonRef$current.onSetButtons(btns);
|
|
99
98
|
});
|
package/es/dialog/hook.js
CHANGED
|
@@ -13,6 +13,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
13
13
|
import _debounce from 'lodash/debounce';
|
|
14
14
|
import React from 'react';
|
|
15
15
|
import { createRoot } from 'react-dom/client';
|
|
16
|
+
import { CcsUtils } from '..';
|
|
16
17
|
import HookDrawer from "./HookDrawer";
|
|
17
18
|
import HookModal from "./HookModal";
|
|
18
19
|
import usePatchElement from "./usePatchElement";
|
|
@@ -72,6 +73,7 @@ export default function useCcsDialog() {
|
|
|
72
73
|
// 加载了contextHolder
|
|
73
74
|
closeFunc = holderRef.current.patchElement(modal);
|
|
74
75
|
} else {
|
|
76
|
+
CcsUtils.showWarning(true, "\u672A\u5C06contextHolder\u63D2\u5165\u7EC4\u4EF6\u4E2D\uFF0C\u5C06\u65E0\u6CD5\u9002\u914Dantd\u4E3B\u9898\u914D\u7F6E\u548C\u83B7\u53D6context\u3002");
|
|
75
77
|
// 未加载contextHolder,创建dom
|
|
76
78
|
var dialogEle = document.createElement('div');
|
|
77
79
|
document.body.append(dialogEle);
|
|
@@ -135,6 +137,7 @@ export default function useCcsDialog() {
|
|
|
135
137
|
// 加载了contextHolder
|
|
136
138
|
closeFunc = (_holderRef$current = holderRef.current) === null || _holderRef$current === void 0 ? void 0 : _holderRef$current.patchElement(modal);
|
|
137
139
|
} else {
|
|
140
|
+
CcsUtils.showWarning(true, "\u672A\u5C06contextHolder\u63D2\u5165\u7EC4\u4EF6\u4E2D\uFF0C\u5C06\u65E0\u6CD5\u9002\u914Dantd\u4E3B\u9898\u914D\u7F6E\u548C\u83B7\u53D6context\u3002");
|
|
138
141
|
// 未加载contextHolder,创建dom
|
|
139
142
|
var dialogEle = document.createElement('div');
|
|
140
143
|
document.body.append(dialogEle);
|