no message

This commit is contained in:
wangdongbo 2026-02-11 17:10:54 +08:00
parent 0ecef71467
commit f64a5864ef

View File

@ -8,7 +8,8 @@
<view class="input-area">
<textarea v-if="!showVoiceInput" class="text-input" v-model="inputText" placeholder="我来说两句..."
@confirm="sendTextMessage" @focus="handleInputFocus" @input="handleInput"
:auto-height="true" :show-confirm-bar="false" :adjust-position="false"
:auto-height="true" :show-confirm-bar="false" :adjust-position="false" :hold-keyboard="true"
ref="textareaRef"
/>
<input v-else class="voice-input-btn" :class="{ recording: isRecording }" @touchstart="startRecord"
@touchmove="onRecordTouchMove" @touchend="stopRecord" @touchcancel="cancelRecord" :placeholder="isRecording ? '松开发送' : '按住说话'" disabled>
@ -101,6 +102,7 @@ const showVoiceInput = ref(false);
const showMorePanel = ref(false);
const isRecording = ref(false);
const recordingText = ref("录音中...");
const textareaRef = ref(null);
const cloudCustomData = computed(() => {
const arr = [
props.chatRoomBusiness.businessType,
@ -168,8 +170,19 @@ const initRecorderManager = () => {
const sendTextMessage = async () => {
if (!inputText.value.trim()) return;
await sendMessage("text", inputText.value);
const textToSend = inputText.value;
inputText.value = "";
await sendMessage("text", textToSend);
//
nextTick(() => {
// focus
//
setTimeout(() => {
// hold-keyboard
}, 50);
});
};
//