Merge branch 'main' of https://github.com/vbenjs/vue-vben-admin
This commit is contained in:
@@ -41,6 +41,7 @@ export class ModalApi {
|
||||
class: '',
|
||||
closeOnClickModal: true,
|
||||
closeOnPressEscape: true,
|
||||
confirmDisabled: false,
|
||||
confirmLoading: false,
|
||||
contentClass: '',
|
||||
draggable: false,
|
||||
|
@@ -35,6 +35,10 @@ export interface ModalProps {
|
||||
* @default true
|
||||
*/
|
||||
closeOnPressEscape?: boolean;
|
||||
/**
|
||||
* 禁用确认按钮
|
||||
*/
|
||||
confirmDisabled?: boolean;
|
||||
/**
|
||||
* 确定按钮 loading
|
||||
* @default false
|
||||
|
@@ -59,6 +59,7 @@ const {
|
||||
closable,
|
||||
closeOnClickModal,
|
||||
closeOnPressEscape,
|
||||
confirmDisabled,
|
||||
confirmLoading,
|
||||
confirmText,
|
||||
contentClass,
|
||||
@@ -235,7 +236,7 @@ function handleFocusOutside(e: Event) {
|
||||
ref="wrapperRef"
|
||||
:class="
|
||||
cn('relative min-h-40 flex-1 overflow-y-auto p-3', contentClass, {
|
||||
'overflow-hidden': showLoading,
|
||||
'pointer-events-none overflow-hidden': showLoading,
|
||||
})
|
||||
"
|
||||
>
|
||||
@@ -285,6 +286,7 @@ function handleFocusOutside(e: Event) {
|
||||
<component
|
||||
:is="components.PrimaryButton || VbenButton"
|
||||
v-if="showConfirmButton"
|
||||
:disabled="confirmDisabled"
|
||||
:loading="confirmLoading"
|
||||
@click="() => modalApi?.onConfirm()"
|
||||
>
|
||||
|
Reference in New Issue
Block a user