perf: 移动设备优化消息输入框菜单

This commit is contained in:
kuaifan 2023-12-07 18:31:25 +08:00
parent ad1cc964c9
commit b7fc815d58

View File

@ -252,6 +252,12 @@ export default {
type: Object, type: Object,
default: () => ({}) default: () => ({})
}, },
toolbar: {
type: Array,
default: () => {
return ['bold', 'strike', 'italic', 'underline', {'list': 'ordered'}, {'list': 'bullet'}, 'blockquote', 'code-block']
},
},
maxlength: { maxlength: {
type: Number type: Number
}, },
@ -496,7 +502,7 @@ export default {
separateSendButton() { separateSendButton() {
return $A.jsonParse(window.localStorage.getItem("__keyboard:data__"))?.separate_send_button === 'open'; return $A.jsonParse(window.localStorage.getItem("__keyboard:data__"))?.separate_send_button === 'open';
}, },
}, },
watch: { watch: {
// Watch content change // Watch content change
@ -658,9 +664,7 @@ export default {
readOnly: false, readOnly: false,
placeholder: this.placeholder, placeholder: this.placeholder,
modules: { modules: {
toolbar: [ toolbar: this.$isEEUiApp || this.windowTouch ? false : this.toolbar,
['bold', 'strike', 'italic', 'underline', {'list': 'ordered'}, {'list': 'bullet'}, 'blockquote', 'code-block']
],
keyboard: { keyboard: {
bindings: { bindings: {
'short enter': { 'short enter': {
@ -1244,9 +1248,7 @@ export default {
readOnly: false, readOnly: false,
placeholder: this.placeholder, placeholder: this.placeholder,
modules: { modules: {
toolbar: [ toolbar: this.toolbar,
['bold', 'strike', 'italic', 'underline', {'list': 'ordered'}, {'list': 'bullet'}, 'blockquote', 'code-block']
],
mention: this.quillMention() mention: this.quillMention()
} }
}, this.options)) }, this.options))
@ -1350,7 +1352,7 @@ export default {
}) })
}) })
moreUser.sort((a, b) => a.last_at > b.last_at ? -1 : (a.last_at < b.last_at ? 1 : 0)); moreUser.sort((a, b) => a.last_at > b.last_at ? -1 : (a.last_at < b.last_at ? 1 : 0));
// //
this.userList = list this.userList = list
this.userCache = []; this.userCache = [];
if (moreUser.length > 0) { if (moreUser.length > 0) {