Compare commits

..

2 Commits

Author SHA1 Message Date
9536ce98a6 处理iPhone13 Pro聊天输入框能弹出键盘但没聚焦导致无法打字问题
Some checks are pending
Check / lint (push) Waiting to run
Check / typecheck (push) Waiting to run
Check / build (build, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build, 18.x, windows-latest) (push) Waiting to run
Check / build (build:app, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:app, 18.x, windows-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, windows-latest) (push) Waiting to run
2025-04-09 10:02:58 +08:00
30412b109e 1、处理撤回按钮点击区域大小;2、发送按钮新增loading;3、解决只有一条聊天记录搜索不到、单聊按日期搜索时搜索结果不正确问题;4、解决部分艾特功能在部分手机上样式错误等问题 2025-04-08 16:58:28 +08:00

View File

@ -3,7 +3,6 @@
<ZPaging
use-chat-record-mode
use-virtual-list
inside-more
cell-height-mode="fixed"
:refresher-enabled="true"
:show-scrollbar="false"
@ -310,6 +309,8 @@
size="mini"
:shadow="0"
label="发送"
:loading="state.isLoading"
:width="120"
></tm-button>
</div>
</div>
@ -382,14 +383,14 @@
<div class="divider"></div>
<div
@click="withdrawerConfirm"
class="mt-[32rpx] mb-[32rpx] text-[32rpx] text-[#CF3050] leading-[48rpx]"
class="mt-[32rpx] mb-[32rpx] text-[32rpx] text-[#CF3050] leading-[48rpx] w-full text-center"
>
撤回
</div>
<div class="divider"></div>
<div
@click="state.showWin = false"
class="mt-[32rpx] mb-[32rpx] text-[32rpx] text-[#000000] leading-[48rpx]"
class="mt-[32rpx] mb-[32rpx] text-[32rpx] text-[#000000] leading-[48rpx] w-full text-center"
>
取消
</div>
@ -615,6 +616,7 @@ const state = ref({
lastMentionText: '', // @
lastMentionTriggered: false, // @
lastMentionPosition: -1, // @
isLoading: false,//loading
})
uniOnload(async (options) => {
@ -678,10 +680,13 @@ const onEditorClick = () => {
// if (quill.getText().endsWith('@\n')) {
// showMentionSelectDebounced(quill)
// }
quill.focus()
// quill.focus()
}
const onSendMessage = (data = {}, callBack) => {
const onSendMessage = (data = {}, callBack, showLoading = false) => {
if (showLoading) {
state.value.isLoading = true
}
let message = {
...data,
receiver: {
@ -692,6 +697,7 @@ const onSendMessage = (data = {}, callBack) => {
ServePublishMessage(message)
.then(({ code, message }) => {
state.value.isLoading = false
if (code == 200) {
uploadsStore.updateUploadStatus(false)
if (callBack) {
@ -703,6 +709,7 @@ const onSendMessage = (data = {}, callBack) => {
}
})
.catch(() => {
state.value.isLoading = false
uploadsStore.updateUploadStatus(false)
message.warning('网络繁忙,请稍后重试!')
})
@ -762,7 +769,7 @@ const onSendTextEvent = lodash.throttle((value) => {
}
console.log(message)
onSendMessage(message, callBack)
onSendMessage(message, callBack, true)
}, 1000)
//
@ -1374,7 +1381,7 @@ const hideMentionSelect = () => {
state.value.lastCursorIndex = undefined
//
const quill = getQuill()
quill.focus()
// quill.focus()
}
//
@ -1476,7 +1483,7 @@ const queryRecordsByMsgInfo = async (msgInfo) => {
let recordsList = []
console.log(recordIndex)
if (!recordIndex || recordIndex === -1) {
recordsList = await findTalkRecords('', true, msgInfo.sequence)
recordsList = await findTalkRecords('', true, msgInfo.sequence - 1)
} else {
// console.log(recordIndex)
const startRecordIndex = Math.max(0, recordIndex - 10)
@ -1577,7 +1584,8 @@ const findTalkRecords = (record, isMiddle, sequence, appointParams) => {
return findTalkRecords('', false, sequence + 1, {
direction: 'up',
sort_sequence: '',
}).then((finalResult) => {
}).then((upResult) => {
const finalResult = [...upResult, ...state.value.serveFindRecord]
console.log(finalResult)
resolve(finalResult)
})
@ -1715,7 +1723,7 @@ const showMentionSelectDebounced = (quill) => {
state.value.lastMentionText = text
state.value.lastMentionTriggered = true
state.value.isShowMentionSelect = true
quill.blur()
// quill.blur()
}
</script>
<style scoped lang="less">
@ -1999,6 +2007,7 @@ const showMentionSelectDebounced = (quill) => {
opacity: 0;
height: 1rpx;
overflow: auto;
display: none;
}
:deep(.ql-editor) {
@ -2024,10 +2033,6 @@ const showMentionSelectDebounced = (quill) => {
height: 44rpx;
display: inline-block;
}
span {
user-select: all;
}
}
}
}