fix: use vue3 v-model bindings
see: https://v3.vuejs.org/guide/migration/v-model.html
This commit is contained in:
parent
2ef2bb7700
commit
51a740f53c
29 changed files with 114 additions and 96 deletions
|
|
@ -39,14 +39,14 @@ export default {
|
|||
computed: {
|
||||
...mapState(['loading']),
|
||||
task() {
|
||||
return this.value
|
||||
return this.modelValue
|
||||
},
|
||||
textIdentifier() {
|
||||
return this.task?.getTextIdentifier() || ''
|
||||
},
|
||||
},
|
||||
props: {
|
||||
value: {
|
||||
modelValue: {
|
||||
required: true,
|
||||
},
|
||||
canWrite: {
|
||||
|
|
@ -54,6 +54,9 @@ export default {
|
|||
default: false,
|
||||
},
|
||||
},
|
||||
|
||||
emits: ['update:modelValue'],
|
||||
|
||||
methods: {
|
||||
save(title) {
|
||||
// We only want to save if the title was actually changed.
|
||||
|
|
@ -73,7 +76,7 @@ export default {
|
|||
|
||||
this.$store.dispatch('tasks/update', newTask)
|
||||
.then((task) => {
|
||||
this.$emit('input', task)
|
||||
this.$emit('update:modelValue', task)
|
||||
this.showSavedMessage = true
|
||||
setTimeout(() => {
|
||||
this.showSavedMessage = false
|
||||
|
|
|
|||
Reference in a new issue