mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-12 08:58:11 +00:00
修复可以发一个空格消息的问题
This commit is contained in:
parent
2f649c0a9e
commit
c2b754d682
@ -128,6 +128,10 @@ export default {
|
||||
components: {ChatEmoji},
|
||||
directives: {touchmouse, TransferDom, clickoutside},
|
||||
props: {
|
||||
value: {
|
||||
type: [String, Number],
|
||||
default: ''
|
||||
},
|
||||
dialogId: {
|
||||
type: Number,
|
||||
default: 0
|
||||
@ -136,10 +140,6 @@ export default {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
value: {
|
||||
type: [String, Number],
|
||||
default: ''
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: ''
|
||||
@ -528,7 +528,8 @@ export default {
|
||||
this.quill.deleteText(this.maxlength, this.quill.getLength());
|
||||
}
|
||||
let html = this.$refs.editor.children[0].innerHTML
|
||||
html = html.replace(/^(<p><br><\/p>)+|(<p><br><\/p>)+$/gi, '')
|
||||
html = html.replace(/^(<p>\s*<\/p>)+|(<p>\s*<\/p>)+$/gi, '')
|
||||
html = html.replace(/^(<p><br\/*><\/p>)+|(<p><br\/*><\/p>)+$/gi, '')
|
||||
this._content = html
|
||||
this.$emit('input', this._content)
|
||||
this.$nextTick(_ => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user