Skip to content

Commit 68883c1

Browse files
committed
fix: correct class binding logic in dialog pop-up
1 parent 0718c6a commit 68883c1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

adminforth/spa/src/afcl/Dialog.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
</div>
88
<Teleport to="body">
99
<div ref="modalEl" tabindex="-1" aria-hidden="true" class="hidden overflow-y-auto overflow-x-hidden fixed top-0 right-0 left-0 z-50 justify-center items-center w-full md:inset-0 h-full max-h-full">
10-
<div v-bind="$attrs" class="relative p-4 max-w-2xl max-h-full" :class="$attrs.class?.includes('w-') ? '' : 'w-full'">
11-
<!-- Modal content -->
10+
<div v-bind="$attrs" class="relative p-4 max-w-2xl max-h-full" :class="(typeof $attrs.class === 'string' && $attrs.class.includes('w-')) ? '' : 'w-full'">
1211
<div class="relative bg-lightDialogBackgorund rounded-lg shadow-sm dark:bg-darkDialogBackgorund">
1312
<!-- Modal header -->
1413
<div
@@ -66,7 +65,7 @@ const modal: Ref<Modal|null> = ref(null);
6665
interface DialogButton {
6766
label: string
6867
onclick: (dialog: any) => void
69-
type?: string
68+
options?: Record<string, any>
7069
}
7170
7271
interface DialogProps {

0 commit comments

Comments
 (0)