feat: modal and drawer locking improve (#5648)

* feat: add `unlock` for modalApi

* fix: modal's close button style in locking

* fix: fix modal's close button disabled on locking

* feat: add `lock` and `unlock` for drawerApi
This commit is contained in:
Netfan
2025-03-04 22:00:32 +08:00
committed by GitHub
parent decd9c55e5
commit f380452ef0
10 changed files with 95 additions and 21 deletions

View File

@@ -180,4 +180,12 @@ export class ModalApi {
}
return this;
}
/**
* 解除弹窗的锁定状态
* @description 解除由lock方法设置的锁定状态是lock(false)的别名
*/
unlock() {
return this.lock(false);
}
}

View File

@@ -200,12 +200,13 @@ const getAppendTo = computed(() => {
"
:modal="modal"
:open="state?.isOpen"
:show-close="submitting ? false : closable"
:show-close="closable"
:z-index="zIndex"
:overlay-blur="overlayBlur"
close-class="top-3"
@close-auto-focus="handleFocusOutside"
@closed="() => modalApi?.onClosed()"
:close-disabled="submitting"
@escape-key-down="escapeKeyDown"
@focus-outside="handleFocusOutside"
@interact-outside="interactOutside"