Commit 08b6e771 by zoumingjun

fix: 修复对话框modal组件方法名错误

1 parent 6a89814b
......@@ -180,7 +180,7 @@ function escapeKeyDown(e: KeyboardEvent) {
}
}
function handerOpenAutoFocus(e: Event) {
function handleOpenAutoFocus(e: Event) {
if (!openAutoFocus.value) {
e?.preventDefault();
}
......@@ -209,6 +209,12 @@ const getForceMount = computed(() => {
return !unref(destroyOnClose) && unref(firstOpened);
});
const handleOpened = () => {
requestAnimationFrame(() => {
props.modalApi?.onOpened();
});
};
function handleClosed() {
isClosed.value = true;
props.modalApi?.onClosed();
......@@ -253,8 +259,8 @@ function handleClosed() {
@escape-key-down="escapeKeyDown"
@focus-outside="handleFocusOutside"
@interact-outside="interactOutside"
@open-auto-focus="handerOpenAutoFocus"
@opened="() => modalApi?.onOpened()"
@open-auto-focus="handleOpenAutoFocus"
@opened="handleOpened"
@pointer-down-outside="pointerDownOutside"
>
<DialogHeader
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!