Commit feb96dc8 by huanghezhen Committed by GitHub

fix: resolve onClosed method failure in connectedComponent of useVbenModal (#6309)

1 parent 470fd43b
...@@ -94,8 +94,9 @@ export function useVbenModal<TParentModalProps extends ModalProps = ModalProps>( ...@@ -94,8 +94,9 @@ export function useVbenModal<TParentModalProps extends ModalProps = ModalProps>(
injectData.options?.onOpenChange?.(isOpen); injectData.options?.onOpenChange?.(isOpen);
}; };
const onClosed = mergedOptions.onClosed;
mergedOptions.onClosed = () => { mergedOptions.onClosed = () => {
options.onClosed?.(); onClosed?.();
if (mergedOptions.destroyOnClose) { if (mergedOptions.destroyOnClose) {
injectData.reCreateModal?.(); injectData.reCreateModal?.();
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!