We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
BaseDialog
@close
1 parent a42d719 commit ea7f807Copy full SHA for ea7f807
ui/src/components/BaseDialog.vue
@@ -1,6 +1,7 @@
1
<template>
2
<v-dialog
3
v-model="showDialog"
4
+ @update:model-value="handleModelValueChange"
5
:fullscreen
6
:max-width
7
>
@@ -24,10 +25,13 @@ const props = defineProps<{
24
25
forceFullscreen?: boolean
26
}>();
27
28
+const emit = defineEmits(["close"]);
29
const showDialog = defineModel<boolean>({ required: true });
30
const { smAndDown, thresholds } = useDisplay();
31
const fullscreen = computed(() => props.forceFullscreen || smAndDown.value);
32
const maxWidth = computed(() => fullscreen.value ? undefined : thresholds.value[props.threshold || "sm"]);
33
34
+const handleModelValueChange = (value: boolean) => { if (!value) emit("close"); };
35
+
36
defineExpose({ fullscreen, maxWidth });
37
</script>
0 commit comments