Skip to content

Commit 3a74ad5

Browse files
committed
feat: add prop "closable" to the afcl dialog
1 parent 94b8c01 commit 3a74ad5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

adminforth/spa/src/afcl/Dialog.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ interface DialogProps {
7676
clickToCloseOutside?: boolean
7777
beforeCloseFunction?: (() => void | Promise<void>) | null
7878
beforeOpenFunction?: (() => void | Promise<void>) | null
79+
closable?: boolean
7980
}
8081
8182
const props = withDefaults(defineProps<DialogProps>(), {
@@ -87,6 +88,7 @@ const props = withDefaults(defineProps<DialogProps>(), {
8788
clickToCloseOutside: true,
8889
beforeCloseFunction: null,
8990
beforeOpenFunction: null,
91+
closable: true,
9092
})
9193
9294
onMounted(async () => {
@@ -95,6 +97,7 @@ onMounted(async () => {
9597
modal.value = new Modal(
9698
modalEl.value,
9799
{
100+
closable: props.closable,
98101
backdrop: props.clickToCloseOutside ? 'dynamic' : 'static',
99102
onHide: async () => {
100103
if (props.beforeCloseFunction) {

0 commit comments

Comments
 (0)