From a0aa04fd8c72bf5960e86246ffac6493e41fc5bd Mon Sep 17 00:00:00 2001 From: kuaifan Date: Sat, 12 Apr 2025 15:08:33 +0800 Subject: [PATCH] no message --- .../manage/components/ChatInput/index.vue | 4 ++-- .../pages/manage/components/DialogWrapper.vue | 16 +++++++------- .../js/pages/manage/components/TaskDetail.vue | 21 +++++++++++-------- resources/assets/js/store/state.js | 2 +- resources/mobile | 2 +- 5 files changed, 24 insertions(+), 21 deletions(-) diff --git a/resources/assets/js/pages/manage/components/ChatInput/index.vue b/resources/assets/js/pages/manage/components/ChatInput/index.vue index 08d0b2dc8..2da90ed63 100755 --- a/resources/assets/js/pages/manage/components/ChatInput/index.vue +++ b/resources/assets/js/pages/manage/components/ChatInput/index.vue @@ -608,7 +608,7 @@ export default { recordConvertFooterStyle() { const {recordConvertFocus, keyboardShow, keyboardHeight} = this; - return (recordConvertFocus && keyboardShow && keyboardHeight > 120) ? { + return (recordConvertFocus && keyboardShow && keyboardHeight > 120 && $A.isIos()) ? { alignItems: 'flex-start', transform: 'translateY(12px)' } : {} @@ -715,7 +715,7 @@ export default { chatInputBoxStyle({iOSDevices, fullInput, keyboardShow, viewportHeight, safeAreaSize}) { const style = {} - if (iOSDevices && fullInput && keyboardShow && viewportHeight > 0) { + if (iOSDevices && fullInput && keyboardShow && viewportHeight > 0 && $A.isIos()) { style.height = Math.max(100, viewportHeight - 70 - safeAreaSize.top) + 'px' } else { style.paddingBottom = `${safeAreaSize.bottom}px` diff --git a/resources/assets/js/pages/manage/components/DialogWrapper.vue b/resources/assets/js/pages/manage/components/DialogWrapper.vue index 412950499..aaf45bfe1 100644 --- a/resources/assets/js/pages/manage/components/DialogWrapper.vue +++ b/resources/assets/js/pages/manage/components/DialogWrapper.vue @@ -819,7 +819,6 @@ export default { preventRangeLoad: 0, // 大于0阻止范围加载 preventToBottom: false, // 阻止滚动到底部 scrollToBottomRefresh: false, // 滚动到底部重新获取消息 - androidKeyboardVisible: false, // Android键盘是否可见 replyMsgAutoMention: false, // 允许回复消息后自动@ waitUnreadData: new Map(), // 等待未读数据 replyEmojiIngs: {}, // 是否回复表情中(避免重复回复) @@ -881,6 +880,8 @@ export default { 'cacheTranslationLanguage', 'longpressData', 'viewportHeight', + 'keyboardShow', + 'keyboardHeight', ]), ...mapGetters(['isLoad', 'isMessengerPage', 'getDialogQuote']), @@ -1022,23 +1023,23 @@ export default { }, isDefaultSize() { - return this.windowScrollY === 0 && !this.androidKeyboardVisible + return !(this.keyboardShow && this.keyboardHeight > 120) }, quickShow() { - return this.quickMsgs.length > 0 && this.isDefaultSize && this.quoteId === 0 + return this.isDefaultSize && this.quickMsgs.length > 0 && this.quoteId === 0 }, todoShow() { - return this.todoList.length > 0 && this.isDefaultSize && this.quoteId === 0 + return this.isDefaultSize && this.todoList.length > 0 && this.quoteId === 0 }, typeShow() { - return this.msgTypes.length > 1 && this.isDefaultSize && !this.searchShow + return this.isDefaultSize && this.msgTypes.length > 1 && !this.searchShow }, topShow() { - return this.topMsg && this.isDefaultSize && !this.searchShow && this.msgType === '' + return this.isDefaultSize && this.topMsg && !this.searchShow && this.msgType === '' }, wrapperClass() { @@ -1385,7 +1386,6 @@ export default { }, windowHeight() { - this.androidKeyboardVisible = $A.isAndroid() && $A.eeuiAppKeyboardStatus() requestAnimationFrame(_ => { this.$refs.input?.updateTools() }) @@ -2272,7 +2272,7 @@ export default { onTouchStart() { // Android 阻止长按反馈导致失去焦点页面抖动 - if (this.androidKeyboardVisible) { + if (this.keyboardShow) { $A.eeuiAppSetDisabledUserLongClickSelect(500); } }, diff --git a/resources/assets/js/pages/manage/components/TaskDetail.vue b/resources/assets/js/pages/manage/components/TaskDetail.vue index 3bcf29d7c..4bd28b986 100755 --- a/resources/assets/js/pages/manage/components/TaskDetail.vue +++ b/resources/assets/js/pages/manage/components/TaskDetail.vue @@ -97,7 +97,7 @@ - + {{$L('该任务尚未被领取,点击这里')}} 900 ? 200 : 70; - return { - maxHeight: (height - factor - 30) + 'px' + const {modalMode, keyboardShow, windowHeight, hasOpenDialog} = this; + const style = {} + if (modalMode) { + if (hasOpenDialog) { + style.maxHeight = `${Math.min(1100, windowHeight) - (windowHeight > 900 ? 200 : 70) - 30}px`; + } + if (keyboardShow && $A.isIos()) { + style.overflow = 'hidden' } } - return {} + return style }, cutTime() { diff --git a/resources/assets/js/store/state.js b/resources/assets/js/store/state.js index 230fbfcd1..527fd85bb 100644 --- a/resources/assets/js/store/state.js +++ b/resources/assets/js/store/state.js @@ -43,7 +43,7 @@ export default { labelWidth: windowWidth > 576 ? 'auto' : '', }, - // 键盘状态(仅iOS) + // 键盘状态 keyboardShow: false, // 键盘可见 keyboardHeight: 0, // 键盘高度 diff --git a/resources/mobile b/resources/mobile index b9d4772f6..7be2bcdaa 160000 --- a/resources/mobile +++ b/resources/mobile @@ -1 +1 @@ -Subproject commit b9d4772f665d36e018f35d791f3c8b9a934c035e +Subproject commit 7be2bcdaa7ad68b1912099b6a60e92cb679aab46