From 617c466ac03137fbc2873d3e89066c592182a54b Mon Sep 17 00:00:00 2001 From: kuaifan Date: Sat, 8 Mar 2025 12:13:25 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E6=8C=89=E4=BD=8FCtrl/Command=E9=94=AE?= =?UTF-8?q?=E5=8F=AF=E8=BF=9E=E7=BB=AD=E9=80=89=E6=8B=A9=E8=A1=A8=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/assets/js/App.vue | 7 +++++++ .../assets/js/pages/manage/components/ChatInput/index.vue | 6 ++++-- resources/assets/js/store/state.js | 3 +++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/resources/assets/js/App.vue b/resources/assets/js/App.vue index 5dcb62155..6fd607900 100755 --- a/resources/assets/js/App.vue +++ b/resources/assets/js/App.vue @@ -164,6 +164,13 @@ export default { immediate: true }, + isCtrlCommandPressed: { + handler(status) { + this.$store.state.isModKey = status + }, + immediate: true + }, + windowActive(active) { if (!active) { this.$store.dispatch("audioStop", true) diff --git a/resources/assets/js/pages/manage/components/ChatInput/index.vue b/resources/assets/js/pages/manage/components/ChatInput/index.vue index fdd257c23..f6d053124 100755 --- a/resources/assets/js/pages/manage/components/ChatInput/index.vue +++ b/resources/assets/js/pages/manage/components/ChatInput/index.vue @@ -516,6 +516,8 @@ export default { 'dialogMsgs', 'cacheKeyboard', + + 'isModKey', ]), isEnterSend({cacheKeyboard}) { @@ -1419,7 +1421,7 @@ export default { if (item.type === 'emoji') { this.quill.insertText(this.rangeIndex, item.text); this.rangeIndex += item.text.length - if (this.windowLandscape) { + if (this.windowLandscape && !this.isModKey) { this.showEmoji = false; } } else if (item.type === 'emoticon') { @@ -1427,7 +1429,7 @@ export default { if (item.asset === "emosearch") { this.$emit('input', "") } - if (this.windowLandscape) { + if (this.windowLandscape && !this.isModKey) { this.showEmoji = false; } } diff --git a/resources/assets/js/store/state.js b/resources/assets/js/store/state.js index 62dbf401c..fb914964c 100644 --- a/resources/assets/js/store/state.js +++ b/resources/assets/js/store/state.js @@ -39,6 +39,9 @@ export default { keyboardHeight: 0, // 键盘高度 safeAreaBottom: 0, // 安全区域底部高度 + // 是否按下Ctrl/Command键 + isModKey: false, + // App通知权限 appNotificationPermission: true,