Browse Source

Merge branch 'hongxilin/hotfix-20250625101643-手机输入法弹出输入框上浮' into ds

songjie/feature-20250628160649-上线前优化
no99 7 days ago
parent
commit
bf2d6eef92
  1. 68
      src/views/homePage.vue

68
src/views/homePage.vue

@ -32,7 +32,7 @@ import msgBtn from "../assets/img/homePage/tail/msg.png";
import feedbackBtn from "../assets/img/Feedback/feedbackBtn.png"; import feedbackBtn from "../assets/img/Feedback/feedbackBtn.png";
import AiEmotion from "./AiEmotion.vue"; import AiEmotion from "./AiEmotion.vue";
import VConsole from 'vconsole';
import VConsole from "vconsole";
const vConsole = new VConsole(); const vConsole = new VConsole();
@ -48,7 +48,7 @@ const emotionAudioStore = useEmotionAudioStore();
const audioStore = useAudioStore(); const audioStore = useAudioStore();
// store // store
const getCurrentAudioStore = () => { const getCurrentAudioStore = () => {
return activeTab.value === 'AiEmotion' ? emotionAudioStore : audioStore;
return activeTab.value === "AiEmotion" ? emotionAudioStore : audioStore;
}; };
const isVoice = computed(() => { const isVoice = computed(() => {
@ -58,7 +58,7 @@ const isVoice = computed(() => {
const toggleVoice = () => { const toggleVoice = () => {
const currentStore = getCurrentAudioStore(); const currentStore = getCurrentAudioStore();
if (!currentStore.isVoiceEnabled) { if (!currentStore.isVoiceEnabled) {
// //
currentStore.toggleVoice(); currentStore.toggleVoice();
@ -168,13 +168,13 @@ const sendMessage = async () => {
ElMessage.error("请先登录"); ElMessage.error("请先登录");
return; return;
} }
// //
if (!message.value || !message.value.trim()) { if (!message.value || !message.value.trim()) {
ElMessage.warning("输入内容不能为空"); ElMessage.warning("输入内容不能为空");
return; return;
} }
isScrolling.value = false; isScrolling.value = false;
// AiEmotion // AiEmotion
@ -616,20 +616,56 @@ onMounted(async () => {
alt="夺宝奇兵大模型" alt="夺宝奇兵大模型"
/> />
<!-- AI情绪大模型按钮 --> <!-- AI情绪大模型按钮 -->
<img :src="activeTab === 'AiEmotion' ? emotionButton01 : emotionButton02
" @click="setActiveTab('AiEmotion', 1)" class="action-btn model-btn" alt="AI情绪大模型" />
<img v-if="getCurrentAudioStore().isVoiceEnabled && !getCurrentAudioStore().isPlaying" :src="voice" @click="toggleVoice" class="action-btn" />
<img v-else-if="getCurrentAudioStore().isVoiceEnabled && getCurrentAudioStore().isPlaying" :src="voice" @click="toggleVoice" class="action-btn" style="opacity: 0.7; animation: pulse 1.5s infinite;" />
<img v-else :src="voiceNoActive" @click="toggleVoice" class="action-btn" />
<img
:src="
activeTab === 'AiEmotion' ? emotionButton01 : emotionButton02
"
@click="setActiveTab('AiEmotion', 1)"
class="action-btn model-btn"
alt="AI情绪大模型"
/>
<img
v-if="
getCurrentAudioStore().isVoiceEnabled &&
!getCurrentAudioStore().isPlaying
"
:src="voice"
@click="toggleVoice"
class="action-btn"
/>
<img
v-else-if="
getCurrentAudioStore().isVoiceEnabled &&
getCurrentAudioStore().isPlaying
"
:src="voice"
@click="toggleVoice"
class="action-btn"
style="opacity: 0.7; animation: pulse 1.5s infinite"
/>
<img
v-else
:src="voiceNoActive"
@click="toggleVoice"
class="action-btn"
/>
</div> </div>
</div> </div>
<!-- 第二行输入框 --> <!-- 第二行输入框 -->
<div class="footer-second-line"> <div class="footer-second-line">
<img :src="msgBtn" class="msg-icon" /> <img :src="msgBtn" class="msg-icon" />
<el-input type="textarea" v-model="message" @focus="onFocus" @blur="onBlur"
:autosize="{ minRows: 1, maxRows: 4 }" placeholder="请输入股票名称或股票代码..." class="msg-input"
@keydown.enter.exact.prevent="isLoading ? null : sendMessage()" resize="none">
<el-input
type="textarea"
v-model="message"
@focus="onFocus"
@blur="onBlur"
:autosize="{ minRows: 1, maxRows: 4 }"
placeholder="请输入股票名称或股票代码..."
class="msg-input"
@keydown.enter.exact.prevent="isLoading ? null : sendMessage()"
resize="none"
>
</el-input> </el-input>
<img <img
v-if="!chatStore.isLoading" v-if="!chatStore.isLoading"
@ -1055,6 +1091,12 @@ body {
max-height: 100px !important; max-height: 100px !important;
} }
.msg-input:deep(.el-textarea__inner::placeholder) {
white-space: nowrap !important;
overflow: hidden !important;
text-overflow: ellipsis !important;
}
.msg-input { .msg-input {
min-height: 34px; min-height: 34px;
width: 100%; width: 100%;

Loading…
Cancel
Save