Add disabled state for task titles
This commit is contained in:
parent
79c8783fdb
commit
d0e304e43b
3 changed files with 16 additions and 3 deletions
|
|
@ -8,10 +8,11 @@
|
|||
</h1>
|
||||
<div class="is-done" v-if="task.done">Done</div>
|
||||
<h1
|
||||
class="title input"
|
||||
:class="{'disabled': !canWrite}"
|
||||
@focusout="save()"
|
||||
@keyup.ctrl.enter="save()"
|
||||
class="title input"
|
||||
contenteditable="true"
|
||||
:contenteditable="canWrite ? 'true' : 'false'"
|
||||
ref="taskTitle">
|
||||
{{ task.title }}
|
||||
</h1>
|
||||
|
|
@ -49,6 +50,10 @@ export default {
|
|||
value: {
|
||||
required: true,
|
||||
},
|
||||
canWrite: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
value(newVal) {
|
||||
|
|
|
|||
Reference in a new issue