From f52b4c9a598dc400c3379f800b2f1157f339159f Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 24 Oct 2024 13:24:45 +0200 Subject: [PATCH 1/2] fix: refs #7524 vnProgressModal --- src/components/common/VnProgressModal.vue | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/src/components/common/VnProgressModal.vue b/src/components/common/VnProgressModal.vue index cfd948d5f..99bf15a7e 100644 --- a/src/components/common/VnProgressModal.vue +++ b/src/components/common/VnProgressModal.vue @@ -9,10 +9,6 @@ const $props = defineProps({ type: Number, //Progress value (1.0 > x > 0.0) required: true, }, - showDialog: { - type: Boolean, - required: true, - }, cancelled: { type: Boolean, required: false, @@ -24,25 +20,17 @@ const emit = defineEmits(['cancel', 'close']); const dialogRef = ref(null); -const _showDialog = computed({ - get: () => $props.showDialog, - set: (value) => { - if (value) dialogRef.value.show(); - }, +const showDialog = defineModel('showDialog', { + type: Boolean, + default: false, }); const _progress = computed(() => $props.progress); - const progressLabel = computed(() => `${Math.round($props.progress * 100)}%`); - -const cancel = () => { - dialogRef.value.hide(); - emit('cancel'); -};