perf: 按住Ctrl/Command键可连续选择表情

This commit is contained in:
kuaifan 2025-03-08 12:13:25 +08:00
parent ed8e443f3a
commit 617c466ac0
3 changed files with 14 additions and 2 deletions

View File

@ -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)

View File

@ -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;
}
}

View File

@ -39,6 +39,9 @@ export default {
keyboardHeight: 0, // 键盘高度
safeAreaBottom: 0, // 安全区域底部高度
// 是否按下Ctrl/Command键
isModKey: false,
// App通知权限
appNotificationPermission: true,