diff --git a/resources/assets/js/pages/manage/components/ChatInput/index.vue b/resources/assets/js/pages/manage/components/ChatInput/index.vue index 2d4222915..ed132f347 100755 --- a/resources/assets/js/pages/manage/components/ChatInput/index.vue +++ b/resources/assets/js/pages/manage/components/ChatInput/index.vue @@ -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>)+|(
<\/p>)+$/gi, '')
+ html = html.replace(/^(
\s*<\/p>)+|(
\s*<\/p>)+$/gi, '') + html = html.replace(/^(
<\/p>)+|(
<\/p>)+$/gi, '')
this._content = html
this.$emit('input', this._content)
this.$nextTick(_ => {