yandere_fe/src/components/user_note/user_note.js

32 lines
513 B
JavaScript
Raw Normal View History

2022-08-20 13:02:27 -04:00
const UserNote = {
props: {
user: Object,
relationship: Object
},
data () {
return {
localNote: '',
editing: false
}
},
computed: {
shouldShow () {
return this.relationship.note || this.editing
}
},
methods: {
startEditing () {
this.localNote = this.relationship.note
this.editing = true
},
cancelEditing () {
this.editing = false
},
finalizeEditing () {
this.editing = false
}
}
}
export default UserNote