@ccs-ui/rc-pro 2.2.1-beta-1 → 2.2.1
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/es/dialog/button.d.ts +2 -2
- package/es/dialog/hook.js +1 -3
- package/package.json +1 -1
package/es/dialog/button.d.ts
CHANGED
|
@@ -11,12 +11,12 @@ export type DialogButtonsProps<T> = Pick<CcsDialogModalProps, 'okText' | 'onClos
|
|
|
11
11
|
/** 隐藏取消按钮 */
|
|
12
12
|
hideCancel?: boolean;
|
|
13
13
|
/** 返回Promise false 则阻止弹窗关闭 */
|
|
14
|
-
onOk?: (values?: T) => Promise<boolean> | boolean;
|
|
14
|
+
onOk?: (values?: T) => Promise<boolean> | boolean | undefined | void;
|
|
15
15
|
};
|
|
16
16
|
export type DialogButtonRef = {
|
|
17
17
|
onSetButtons: (e: React.ReactElement) => void;
|
|
18
18
|
};
|
|
19
|
-
export declare const DialogButtonHolder: <TParams, TData>({ auth, extraBtn, formRef, request, onOk, onClose, buttonRef, requestFieldNames, formInitialValues, preventRequestHandle, }: Pick<CcsDialogModalProps<TParams, TData>, "
|
|
19
|
+
export declare const DialogButtonHolder: <TParams, TData>({ auth, extraBtn, formRef, request, onOk, onClose, buttonRef, requestFieldNames, formInitialValues, preventRequestHandle, }: Pick<CcsDialogModalProps<TParams, TData>, "auth" | "request" | "onOk" | "onClose" | "extraBtn" | "requestFieldNames" | "preventRequestHandle"> & {
|
|
20
20
|
formRef: React.RefObject<DialogFormRef<TParams>>;
|
|
21
21
|
formInitialValues: FormProps['initialValues'];
|
|
22
22
|
buttonRef: RefObject<DialogButtonRef>;
|
package/es/dialog/hook.js
CHANGED
|
@@ -80,7 +80,6 @@ export default function useCcsDialog() {
|
|
|
80
80
|
},
|
|
81
81
|
dialogRef: modalRef
|
|
82
82
|
}, "modal-".concat(modalUuid));
|
|
83
|
-
console.log('modal CcsPageContext ...', CcsPageContext);
|
|
84
83
|
// 添加page上下文
|
|
85
84
|
if (CcsPageContext && CcsPageContext.id) {
|
|
86
85
|
dialog = /*#__PURE__*/_jsx(PageContext.Provider, {
|
|
@@ -153,7 +152,7 @@ export default function useCcsDialog() {
|
|
|
153
152
|
},
|
|
154
153
|
dialogRef: dialogRef
|
|
155
154
|
}, "drawer-".concat(drawerUuid));
|
|
156
|
-
|
|
155
|
+
|
|
157
156
|
// 添加page上下文
|
|
158
157
|
if (CcsPageContext && CcsPageContext.id) {
|
|
159
158
|
dialog = /*#__PURE__*/_jsx(PageContext.Provider, {
|
|
@@ -199,7 +198,6 @@ export default function useCcsDialog() {
|
|
|
199
198
|
}
|
|
200
199
|
},
|
|
201
200
|
update: function update(newConfig) {
|
|
202
|
-
console.log('newConfig', newConfig, dialogRef.current);
|
|
203
201
|
function updateAction() {
|
|
204
202
|
var _dialogRef$current2;
|
|
205
203
|
(_dialogRef$current2 = dialogRef.current) === null || _dialogRef$current2 === void 0 || _dialogRef$current2.update(newConfig);
|