codevdesign 1.0.20 → 1.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -29,10 +29,14 @@
|
|
|
29
29
|
</template>
|
|
30
30
|
|
|
31
31
|
<script setup lang="ts">
|
|
32
|
-
import { ref, computed, onMounted, nextTick } from 'vue'
|
|
32
|
+
import { ref, computed, onMounted, nextTick, watch } from 'vue'
|
|
33
33
|
import type { VForm } from 'vuetify/components'
|
|
34
34
|
|
|
35
|
-
const emit = defineEmits
|
|
35
|
+
const emit = defineEmits<{
|
|
36
|
+
'update:modelValue': [string | null]
|
|
37
|
+
'update:codeBudgetairesProp': [string[]]
|
|
38
|
+
'update:valide': [boolean] // 👈 nouveau
|
|
39
|
+
}>()
|
|
36
40
|
|
|
37
41
|
const props = withDefaults(
|
|
38
42
|
defineProps<{
|
|
@@ -60,6 +64,16 @@
|
|
|
60
64
|
const format = props.format
|
|
61
65
|
const activerExtension = props.activerExtension
|
|
62
66
|
|
|
67
|
+
onMounted(() => {
|
|
68
|
+
derniereValeurSauvegardee.value = codeBudgetaire.value
|
|
69
|
+
})
|
|
70
|
+
|
|
71
|
+
const placeholder = computed(() => {
|
|
72
|
+
const base = format.replace(/9/g, '0')
|
|
73
|
+
const extension = activerExtension ? '-XXX/XXX' : ''
|
|
74
|
+
return base + extension
|
|
75
|
+
})
|
|
76
|
+
|
|
63
77
|
const estValide = computed(() => {
|
|
64
78
|
const val = codeBudgetaire.value?.toUpperCase().trim() || ''
|
|
65
79
|
const base = val.slice(0, 15)
|
|
@@ -245,13 +259,7 @@
|
|
|
245
259
|
}
|
|
246
260
|
}
|
|
247
261
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
})
|
|
251
|
-
|
|
252
|
-
const placeholder = computed(() => {
|
|
253
|
-
const base = format.replace(/9/g, '0')
|
|
254
|
-
const extension = activerExtension ? '-XXX/XXX' : ''
|
|
255
|
-
return base + extension
|
|
262
|
+
watch(estValide, value => {
|
|
263
|
+
emit('update:valide', value)
|
|
256
264
|
})
|
|
257
265
|
</script>
|