1
0

feat: use v-model more consequent (#2356)

Co-authored-by: Dominik Pschenitschni <mail@celement.de>
Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/2356
Reviewed-by: konrad <k@knt.li>
Co-authored-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
Co-committed-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
This commit is contained in:
Dominik Pschenitschni
2022-09-13 15:30:33 +00:00
committed by konrad
parent 2013924949
commit db8b8812af
18 changed files with 63 additions and 71 deletions

View File

@ -19,19 +19,19 @@
import {ref, watch} from 'vue'
import {PRIORITIES} from '@/constants/priorities'
const priority = ref(0)
const props = defineProps({
modelValue: {
default: 0,
type: Number,
default: 0,
},
disabled: {
default: false,
},
})
const emit = defineEmits(['update:modelValue', 'change'])
const emit = defineEmits(['update:modelValue'])
const priority = ref(0)
// FIXME: store value outside
// Set the priority to the :value every time it changes from the outside
@ -45,6 +45,5 @@ watch(
function updateData() {
emit('update:modelValue', priority.value)
emit('change')
}
</script>