fix: 修复对话框modal组件方法名错误
This commit is contained in:
parent
6a89814b83
commit
08b6e7713e
@ -180,7 +180,7 @@ function escapeKeyDown(e: KeyboardEvent) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function handerOpenAutoFocus(e: Event) {
|
function handleOpenAutoFocus(e: Event) {
|
||||||
if (!openAutoFocus.value) {
|
if (!openAutoFocus.value) {
|
||||||
e?.preventDefault();
|
e?.preventDefault();
|
||||||
}
|
}
|
||||||
@ -209,6 +209,12 @@ const getForceMount = computed(() => {
|
|||||||
return !unref(destroyOnClose) && unref(firstOpened);
|
return !unref(destroyOnClose) && unref(firstOpened);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const handleOpened = () => {
|
||||||
|
requestAnimationFrame(() => {
|
||||||
|
props.modalApi?.onOpened();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
function handleClosed() {
|
function handleClosed() {
|
||||||
isClosed.value = true;
|
isClosed.value = true;
|
||||||
props.modalApi?.onClosed();
|
props.modalApi?.onClosed();
|
||||||
@ -253,8 +259,8 @@ function handleClosed() {
|
|||||||
@escape-key-down="escapeKeyDown"
|
@escape-key-down="escapeKeyDown"
|
||||||
@focus-outside="handleFocusOutside"
|
@focus-outside="handleFocusOutside"
|
||||||
@interact-outside="interactOutside"
|
@interact-outside="interactOutside"
|
||||||
@open-auto-focus="handerOpenAutoFocus"
|
@open-auto-focus="handleOpenAutoFocus"
|
||||||
@opened="() => modalApi?.onOpened()"
|
@opened="handleOpened"
|
||||||
@pointer-down-outside="pointerDownOutside"
|
@pointer-down-outside="pointerDownOutside"
|
||||||
>
|
>
|
||||||
<DialogHeader
|
<DialogHeader
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user