#7524 hotfix-vnProgressModal #866

Merged
jorgep merged 2 commits from 7524-hotfix-vnProgressModal into master 2024-10-24 12:10:27 +00:00
1 changed files with 6 additions and 18 deletions

View File

@ -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)}%`);
Review

Duda: porque no se hace Math.round(_progress*100)

Duda: porque no se hace Math.round(_progress*100)
Review

No lo sé , es de mindShore.

No lo sé , es de mindShore.
const cancel = () => {
dialogRef.value.hide();
emit('cancel');
};
</script>
<template>
<QDialog ref="dialogRef" v-model="_showDialog" @hide="onDialogHide">
<QDialog ref="dialogRef" v-model="showDialog" @hide="emit('close')">
<QCard class="full-width dialog">
<QCardSection class="row">
<span class="text-h6">{{ t('Progress') }}</span>
<QSpace />
<QBtn icon="close" flat round dense @click="emit('close')" />
<QBtn icon="close" flat round dense v-close-popup />
</QCardSection>
<QCardSection>
<div class="column">
@ -80,7 +68,7 @@ const cancel = () => {
type="button"
flat
class="text-primary"
@click="cancel()"
v-close-popup
>
{{ t('globals.cancel') }}
</QBtn>