mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Disable Submit Button if comment is less than 3 characters
This commit is contained in:
parent
f6cf05743a
commit
05d393064a
@ -338,11 +338,15 @@ export default {
|
||||
return this.$store.getters['auth/user'].id === id
|
||||
},
|
||||
updateEditorContent(value) {
|
||||
const content = value.replace(/<(?:.|\n)*?>/gm, '').trim().length
|
||||
if (content < 3) {
|
||||
this.disabled = true
|
||||
} else {
|
||||
this.disabled = false
|
||||
}
|
||||
this.$refs.commentForm.update('content', value)
|
||||
},
|
||||
clearEditor() {
|
||||
this.loading = false
|
||||
this.disabled = false
|
||||
this.form.content = ' '
|
||||
},
|
||||
addComment(comment) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user