Browse Source

输入框placeholder禁止换行

hongxilin/hotfix-20250625101643-手机输入法弹出输入框上浮
no99 7 days ago
parent
commit
a93b73a2ba
  1. 62
      src/views/homePage.vue

62
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 AiEmotion from "./AiEmotion.vue";
import VConsole from 'vconsole';
import VConsole from "vconsole";
const vConsole = new VConsole();
@ -48,7 +48,7 @@ const emotionAudioStore = useEmotionAudioStore();
const audioStore = useAudioStore();
// store
const getCurrentAudioStore = () => {
return activeTab.value === 'AiEmotion' ? emotionAudioStore : audioStore;
return activeTab.value === "AiEmotion" ? emotionAudioStore : audioStore;
};
const isVoice = computed(() => {
@ -616,20 +616,56 @@ onMounted(async () => {
alt="夺宝奇兵大模型"
/>
<!-- 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 class="footer-second-line">
<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>
<img
v-if="!chatStore.isLoading"
@ -1055,6 +1091,12 @@ body {
max-height: 100px !important;
}
.msg-input:deep(.el-textarea__inner::placeholder) {
white-space: nowrap !important;
overflow: hidden !important;
text-overflow: ellipsis !important;
}
.msg-input {
min-height: 34px;
width: 100%;

Loading…
Cancel
Save