fix: 聊天输入框内容为空时仍可以长安发送显示发送菜单

This commit is contained in:
Pang 2023-12-16 22:59:25 +08:00
parent c5879e4376
commit e2a9906de0

View File

@ -115,7 +115,7 @@
class="chat-send" class="chat-send"
:class="sendClass" :class="sendClass"
v-touchmouse="clickSend" v-touchmouse="clickSend"
v-longpress="{callback: longSend, delay: 300}"> v-longpress="{callback: onShowMenu, delay: 300}">
<EPopover <EPopover
v-model="showMenu" v-model="showMenu"
:visibleArrow="false" :visibleArrow="false"
@ -447,7 +447,7 @@ export default {
}, },
sendClass() { sendClass() {
if (this.value) { if (this.filterInvalidLine(this.value)) {
return 'sender'; return 'sender';
} }
if (this.recordReady) { if (this.recordReady) {
@ -1032,7 +1032,7 @@ export default {
return; return;
} }
if (event.button === 2){ if (event.button === 2){
this.showMenu = true; this.onShowMenu()
} }
break; break;
@ -1057,7 +1057,7 @@ export default {
} }
}, },
longSend() { onShowMenu() {
if (this.sendClass === 'recorder' || !this.sendMenu) { if (this.sendClass === 'recorder' || !this.sendMenu) {
return; return;
} }