feature: label error proxy added

This commit is contained in:
Paul Valerie GOMA 2025-07-27 00:30:34 +02:00
parent f15fdb8e18
commit 605f6af3b9

View File

@ -0,0 +1,23 @@
<script setup lang="ts">
import { onMounted, onUpdated, watch } from 'vue';
const props = defineProps<{
hasError: boolean
}>();
const emit = defineEmits<{
(e: 'update:error', value: boolean): void
}>();
onMounted(() => {
emit('update:error', props.hasError);
});
onUpdated(() => {
emit('update:error', props.hasError);
});
watch(() => props.hasError, (val) => {
emit('update:error', val);
});
</script>