feat: popup component support overlay blur effect (#5359)

This commit is contained in:
Netfan
2025-01-11 23:37:17 +08:00
committed by GitHub
parent cb9c8db5ba
commit 6719e2679f
12 changed files with 86 additions and 4 deletions

View File

@@ -85,12 +85,16 @@ export interface DrawerProps {
* 是否自动聚焦
*/
openAutoFocus?: boolean;
/**
* 弹窗遮罩模糊效果
*/
overlayBlur?: number;
/**
* 抽屉位置
* @default right
*/
placement?: DrawerPlacement;
/**
* 是否显示取消按钮
* @default true

View File

@@ -68,6 +68,7 @@ const {
loading: showLoading,
modal,
openAutoFocus,
overlayBlur,
placement,
showCancelButton,
showConfirmButton,
@@ -140,6 +141,7 @@ const getAppendTo = computed(() => {
:open="state?.isOpen"
:side="placement"
:z-index="zIndex"
:overlay-blur="overlayBlur"
@close-auto-focus="handleFocusOutside"
@closed="() => drawerApi?.onClosed()"
@escape-key-down="escapeKeyDown"

View File

@@ -99,6 +99,10 @@ export interface ModalProps {
* 是否自动聚焦
*/
openAutoFocus?: boolean;
/**
* 弹窗遮罩模糊效果
*/
overlayBlur?: number;
/**
* 是否显示取消按钮
* @default true

View File

@@ -77,6 +77,7 @@ const {
loading: showLoading,
modal,
openAutoFocus,
overlayBlur,
showCancelButton,
showConfirmButton,
title,
@@ -196,6 +197,7 @@ const getAppendTo = computed(() => {
:open="state?.isOpen"
:show-close="closable"
:z-index="zIndex"
:overlay-blur="overlayBlur"
close-class="top-3"
@close-auto-focus="handleFocusOutside"
@closed="() => modalApi?.onClosed()"