diff --git a/src/components/common/VnProgressModal.vue b/src/components/common/VnProgressModal.vue index cfd948d5f..23fb8ae70 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,30 +20,22 @@ 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'); -};