Skip to content

Commit 08b6e77

Browse files
committed
fix: 修复对话框modal组件方法名错误
1 parent 6a89814 commit 08b6e77

File tree

1 file changed

+9
-3
lines changed
  • packages/@core/ui-kit/popup-ui/src/modal

1 file changed

+9
-3
lines changed

packages/@core/ui-kit/popup-ui/src/modal/modal.vue

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ function escapeKeyDown(e: KeyboardEvent) {
180180
}
181181
}
182182
183-
function handerOpenAutoFocus(e: Event) {
183+
function handleOpenAutoFocus(e: Event) {
184184
if (!openAutoFocus.value) {
185185
e?.preventDefault();
186186
}
@@ -209,6 +209,12 @@ const getForceMount = computed(() => {
209209
return !unref(destroyOnClose) && unref(firstOpened);
210210
});
211211
212+
const handleOpened = () => {
213+
requestAnimationFrame(() => {
214+
props.modalApi?.onOpened();
215+
});
216+
};
217+
212218
function handleClosed() {
213219
isClosed.value = true;
214220
props.modalApi?.onClosed();
@@ -253,8 +259,8 @@ function handleClosed() {
253259
@escape-key-down="escapeKeyDown"
254260
@focus-outside="handleFocusOutside"
255261
@interact-outside="interactOutside"
256-
@open-auto-focus="handerOpenAutoFocus"
257-
@opened="() => modalApi?.onOpened()"
262+
@open-auto-focus="handleOpenAutoFocus"
263+
@opened="handleOpened"
258264
@pointer-down-outside="pointerDownOutside"
259265
>
260266
<DialogHeader

0 commit comments

Comments
 (0)