You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
738 lines
19 KiB
738 lines
19 KiB
<script setup>
|
|
// 导入
|
|
import { ref, computed, onMounted, watch, nextTick } from "vue";
|
|
import { setHeight } from "../utils/setHeight";
|
|
import { getUserCountAPI } from "../api/AIxiaocaishen";
|
|
import { ElMessage } from 'element-plus'
|
|
import AIchat from "./AIchat.vue";
|
|
import AIfind from "./AIfind.vue";
|
|
import { useAppBridge } from '../assets/js/useAppBridge.js'
|
|
import { useDataStore } from '@/store/dataList.js'
|
|
import { useChatStore } from '../store/chat'
|
|
import { useAudioStore } from '../store/audio'
|
|
import _ from "lodash";
|
|
|
|
import logo from "../assets/img/homePage/logo.png";
|
|
import madeInHL from "../assets/img/homePage/madeInHL.png";
|
|
import getCountAll from "../assets/img/homePage/get-count-all.png";
|
|
import announcementBtn from "../assets/img/homePage/announcement.png";
|
|
import thinkActive from "../assets/img/homePage/tail/think-active.png";
|
|
import thinkNoActive from "../assets/img/homePage/tail/think-no-active.png";
|
|
import languageBtn from "../assets/img/homePage/tail/language.png";
|
|
import voice from "../assets/img/homePage/tail/voice.png";
|
|
import voiceNoActive from "../assets/img/homePage/tail/voice-no-active.png";
|
|
import sendBtn from "../assets/img/homePage/tail/send.png";
|
|
import msgBtn from "../assets/img/homePage/tail/msg.png";
|
|
|
|
|
|
// import { useUserStore } from "../store/userPessionCode.js";
|
|
const { getQueryVariable } = useDataStore()
|
|
|
|
|
|
|
|
// 变量
|
|
// 音频管理
|
|
const audioStore = useAudioStore()
|
|
const isVoice = computed(() => audioStore.isVoiceEnabled)
|
|
const toggleVoice = () => {
|
|
audioStore.toggleVoice()
|
|
}
|
|
// 将默认值改为从 sessionStorage 中获取,如果没有则使用默认值 'aifindCow'为第一个默认tab
|
|
const activeTab = ref(sessionStorage.getItem("activeTabAI") || "AIchat");
|
|
const activeIndex = ref(
|
|
parseInt(sessionStorage.getItem("activeIndexAI") || "0")
|
|
);
|
|
|
|
const tabs = computed(() => [
|
|
{
|
|
name: "AIchat",
|
|
label: "AI对话",
|
|
},
|
|
{
|
|
name: "AIfind",
|
|
label: "发现",
|
|
},
|
|
]);
|
|
|
|
// 修改 setActiveTab 方法,添加一个可选参数 forceAIchat
|
|
const setActiveTab = (tab, index, forceAIchat = false) => {
|
|
isScrolling.value = false; //回复滚动到底部方法
|
|
isAnnouncementVisible.value = false;
|
|
if (forceAIchat && activeTab.value !== "AIchat") {
|
|
activeTab.value = "AIchat";
|
|
activeIndex.value = 0;
|
|
sessionStorage.setItem("activeTabAI", "AIchat");
|
|
sessionStorage.setItem("activeIndexAI", "0");
|
|
} else {
|
|
activeTab.value = tab;
|
|
activeIndex.value = index;
|
|
sessionStorage.setItem("activeTabAI", tab);
|
|
sessionStorage.setItem("activeIndexAI", index.toString());
|
|
}
|
|
console.log(tab, index, "tab, index");
|
|
setHeight(document.getElementById("testId")); // 给父组件发送窗口高度
|
|
};
|
|
|
|
// 修改 activeComponent 的计算逻辑
|
|
const activeComponent = computed(() => {
|
|
if (isAnnouncementVisible.value) {
|
|
return Announcement;
|
|
}
|
|
return activeTab.value === "AIchat" ? AIchat : AIfind;
|
|
});
|
|
|
|
// 新增一个方法,调用时先判断是否处于 AIchat,若不在则跳转到 AIchat
|
|
const ensureAIchat = () => {
|
|
setActiveTab("AIchat", 0, true);
|
|
};
|
|
|
|
// 获取次数
|
|
// const UserCount = ref(0);
|
|
// const getUserCount = async () => {
|
|
// const result = await getUserCountAPI({ token: localStorage.getItem('localToken') });
|
|
// UserCount.value = result.data.hasCount;
|
|
// };
|
|
const UserCount = computed(() => chatStore.UserCount)
|
|
|
|
|
|
const getCount = () => {
|
|
console.log('点击了获取次数的按钮')
|
|
}
|
|
|
|
// 深度思考
|
|
const isThinking = ref(true);
|
|
const toggleThink = () => {
|
|
isThinking.value = !isThinking.value;
|
|
};
|
|
|
|
// 发送消息
|
|
const message = ref("");
|
|
// 传输对象
|
|
const messages = ref([]);
|
|
// 信息加载状态
|
|
const isLoading = computed(() => { chatStore.isLoading });
|
|
|
|
// 添加用户消息
|
|
const updateMessage = (title) => {
|
|
message.value = title;
|
|
// console.log("updateMessage 的值:", title);
|
|
};
|
|
const sendMessage = async () => {
|
|
if (localStorage.getItem('localToken') == null||localStorage.getItem('localToken') == '') {
|
|
ElMessage.error('请先登录');
|
|
return ;
|
|
}
|
|
isScrolling.value = false;
|
|
// 调用 ensureAIchat 确保跳转到 AIchat 页面
|
|
ensureAIchat();
|
|
|
|
if (!message.value) return;
|
|
if (chatStore.isLoading) return;
|
|
console.log(chatStore.isLoading, 'isLoading.value1111');
|
|
chatStore.setLoading(true);
|
|
|
|
console.log(chatStore.isLoading, 'isLoading.value2222');
|
|
|
|
// 发送消息时,设置 isLoading 为 true
|
|
messages.value = [
|
|
...messages.value,
|
|
{
|
|
sender: "user",
|
|
content: message.value,
|
|
timestamp: new Date().toISOString(),
|
|
}
|
|
];
|
|
|
|
// 重置消息输入框
|
|
|
|
message.value = "";
|
|
};
|
|
|
|
// 公告
|
|
// 引入公告组件
|
|
import Announcement from "./Announcement.vue";
|
|
|
|
// 新增一个变量来控制是否显示公告页面
|
|
const isAnnouncementVisible = ref(false);
|
|
|
|
const showAnnouncement = async () => {
|
|
console.log("打开公告");
|
|
isScrolling.value = false; //回复滚动到底部方法
|
|
setActiveTab('', -1); // 清空当前选中状态
|
|
|
|
isAnnouncementVisible.value = true; // 显示公告页面
|
|
};
|
|
|
|
// 点击剩余次数会弹出的弹窗
|
|
// 新增一个 ref 来控制弹窗的显示与隐藏
|
|
const dialogVisible = ref(false);
|
|
// 获取次数
|
|
const showCount = () => {
|
|
console.log("显示剩余次数");
|
|
// 显示弹窗
|
|
dialogVisible.value = true;
|
|
console.log("dialogVisible 的值:", dialogVisible.value); // 添加日志确认
|
|
};
|
|
|
|
// 保证发送消息时,滚动屏在底部
|
|
const chatStore = useChatStore()
|
|
const tabContent = ref(null);
|
|
const isScrolling = ref(false); //判断用户是否在滚动
|
|
|
|
const smoothScrollToBottom = async () => {
|
|
// console.log('调用滚动到底部的方法')
|
|
// await nextTick();
|
|
const container = tabContent.value;
|
|
// console.log(container, 'container')
|
|
// console.log(isScrolling.value, 'isScrolling.value')
|
|
if (!container) return;
|
|
|
|
await nextTick(); // 确保在DOM更新后执行
|
|
|
|
if (!isScrolling.value) {
|
|
container.scrollTop = container.scrollHeight - container.offsetHeight;
|
|
// container.scrollTop = container.scrollHeight;
|
|
// container.scrollTop = container.offsetHeight;
|
|
// container.scrollTop = container.scrollHeight + container.offsetHeight;
|
|
// console.log(container.scrollHeight, container.offsetHeight, container.scrollHeight - container.offsetHeight, container.scrollTop, "总长度", "可视长度", "位置")
|
|
}
|
|
|
|
}
|
|
|
|
const throttledSmoothScrollToBottom = _.throttle(smoothScrollToBottom, 500, { trailing: false });
|
|
|
|
watch(
|
|
() => chatStore.messages,
|
|
() => {
|
|
// console.log('messages变化了')
|
|
throttledSmoothScrollToBottom();
|
|
// setTimeout(throttledSmoothScrollToBottom, 100);
|
|
},
|
|
{ deep: true, immediate: true }
|
|
);
|
|
|
|
|
|
watch(
|
|
activeTab,
|
|
async () => {
|
|
// console.log('activeTab变化了', activeTab.value)
|
|
isScrolling.value = false; //回复滚动到底部方法
|
|
await nextTick(); // 等待DOM更新
|
|
throttledSmoothScrollToBottom();
|
|
// setTimeout(throttledSmoothScrollToBottom, 100);
|
|
},
|
|
{ deep: true, immediate: true }
|
|
);
|
|
|
|
// 获取token的核心函数
|
|
const fnGetToken = () => {
|
|
// console.log('进入fnGetToken')
|
|
window.JWready = (ress) => {
|
|
// console.log('进入JWready')
|
|
try {
|
|
ress = JSON.parse(ress)
|
|
// console.log(ress, 'ress')
|
|
} catch (error) {
|
|
console.log(error, 'fnGetToken error')
|
|
} //platform为5是app端
|
|
// platform.value = ress.data.platform
|
|
// 处理平台判断
|
|
console.log(ress.data.platform, 'ress.data.platform')
|
|
if (!ress.data.platform) {
|
|
// 非App环境通过URL参数获取
|
|
localStorage.setItem('localToken', decodeURIComponent(String(getQueryVariable('token'))))
|
|
// localStorage.setItem('localToken', "+SsksARQgUHIbIG3rRnnbZi0+fEeMx8pywnIlrmTxo5EOPR/wjWDV7w7+ZUseiBtf9kFa/atmNx6QfSpv5w")
|
|
} else {
|
|
// App环境通过桥接获取
|
|
useAppBridge().packageFun(
|
|
'JWgetStorage',
|
|
(response) => {
|
|
const res = JSON.parse(response) // 解析返回的结果
|
|
localStorage.setItem('localToken', res.data)
|
|
// localStorage.setItem('localToken', "+SsksARQgUHIbIG3rRnnbZi0+fEeMx8pywnIlrmTxo5EOPR/wjWDV7w7+ZUseiBtf9kFa/atmNx6QfSpv5w")
|
|
},
|
|
5,
|
|
{
|
|
key: 'token'
|
|
}
|
|
)
|
|
}
|
|
}
|
|
// console.log('出来了')
|
|
// 触发App桥接
|
|
useAppBridge().packageFun('JWwebReady', () => { }, 5, {})
|
|
}
|
|
|
|
// 在setTimeout中延迟执行
|
|
setTimeout(() => {
|
|
fnGetToken()
|
|
}, 800)
|
|
|
|
// const tabContainer = tabContent.value
|
|
// let befortop = 0
|
|
// tabContainer.addEventListener('scroll', () => {
|
|
// const aftertop = tabContainer.scrollTop
|
|
// if (aftertop - befortop > 0) {
|
|
// console.log('向下滚动')
|
|
// isScrolling.value = true
|
|
// } else {
|
|
// console.log('向上滚动')
|
|
// isScrolling.value = false
|
|
// }
|
|
// befortop = aftertop
|
|
// })
|
|
|
|
const heightListener = () => {
|
|
const tabContainer = tabContent.value;
|
|
let befortop = 0;
|
|
|
|
const scrollHandler = () => {
|
|
const aftertop = tabContainer.scrollTop;
|
|
|
|
// 新增底部判断逻辑
|
|
const isBottom = aftertop + tabContainer.offsetHeight + 50 >= tabContainer.scrollHeight;
|
|
|
|
if (activeTab.value === 'AIchat') {
|
|
if (aftertop - befortop > 0) {
|
|
// console.log('向下滚动');
|
|
isScrolling.value = true;
|
|
} else {
|
|
// console.log('向上滚动');
|
|
isScrolling.value = true;
|
|
}
|
|
|
|
// 添加底部状态检测
|
|
if (isBottom) {
|
|
// console.log('滚动到底部');
|
|
isScrolling.value = false;
|
|
}
|
|
}
|
|
befortop = aftertop;
|
|
};
|
|
|
|
// console.log(isScrolling.value, 'isScrolling.value')
|
|
|
|
tabContainer.addEventListener('scroll', scrollHandler);
|
|
};
|
|
|
|
const throttledHeightListener = _.throttle(heightListener, 500, { trailing: false });
|
|
|
|
onMounted(async () => {
|
|
const isPhone =
|
|
/phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone/i.test(
|
|
navigator.userAgent
|
|
)
|
|
!isPhone &&
|
|
localStorage.setItem('localToken', decodeURIComponent(String(getQueryVariable('token'))))
|
|
setHeight(document.getElementById("testId")); // 给父组件发送窗口高度
|
|
await chatStore.getUserCount();
|
|
throttledSmoothScrollToBottom();
|
|
throttledHeightListener();
|
|
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<div class="homepage" id="testId">
|
|
<el-container>
|
|
<!-- AI小财神头部: logo 次数 公告 -->
|
|
<el-header class="homepage-head">
|
|
<!-- logo -->
|
|
<div class="homepage-logo">
|
|
<img :src="logo" alt="图片加载失败" class="logo1" />
|
|
<img :src="madeInHL" alt="图片加载失败" class="logo2" />
|
|
</div>
|
|
|
|
<div class="homepage-right-group">
|
|
<div class="count-badge" @click="showCount">
|
|
<img :src="getCountAll" class="action-btn" />
|
|
<div class="count-number">{{ UserCount }}次</div>
|
|
</div>
|
|
<img :src="announcementBtn" class="announcement-btn action-btn" @click="showAnnouncement" />
|
|
</div>
|
|
</el-header>
|
|
<!-- 主体部分:小人 问题轮询图 对话内容 -->
|
|
<el-main class="homepage-body">
|
|
<div class="main-wrapper">
|
|
<section class="tab-section">
|
|
<div class="tab-container">
|
|
<div v-for="(tab, index) in tabs" :key="tab.name" @click="setActiveTab(tab.name, index)"
|
|
:class="['tab-item', { active: activeIndex === index && !isAnnouncementVisible }]">
|
|
<span>{{ tab.label }}</span>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<div class="tab-content" ref="tabContent">
|
|
<component :is="activeComponent" :messages="messages" @updateMessage="updateMessage"
|
|
@sendMessage="sendMessage" />
|
|
</div>
|
|
</div>
|
|
</el-main>
|
|
<!-- 尾部: 问题输入框 深度思考 多语言 语音播报 -->
|
|
<el-footer class="homepage-footer">
|
|
<!-- 第一行按钮 -->
|
|
<div class="footer-first-line">
|
|
<div class="left-group">
|
|
<img v-if="isThinking" :src="thinkActive" @click="toggleThink" class="action-btn" />
|
|
<img v-else :src="thinkNoActive" @click="toggleThink" class="action-btn" />
|
|
<img :src="languageBtn" @click="changeLanguage" class="action-btn" />
|
|
<img v-if="isVoice" :src="voice" @click="toggleVoice" class="action-btn" />
|
|
<img v-else :src="voiceNoActive" @click="toggleVoice" class="action-btn" />
|
|
</div>
|
|
<img v-if="!chatStore.isLoading" :src="sendBtn" @click="sendMessage" class="action-btn send-btn" />
|
|
<div v-else>
|
|
<el-icon class="is-loading">
|
|
<Loading />
|
|
</el-icon>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 第二行输入框 -->
|
|
<div class="footer-second-line">
|
|
<img :src="msgBtn" class="msg-icon" />
|
|
<el-input type="textarea" v-model="message" :autosize="{ minRows: 1, maxRows: 4 }" placeholder="给AI小财神发消息..."
|
|
class="msg-input" @keydown.enter.exact.prevent="isLoading ? null : sendMessage()" resize="none">
|
|
</el-input>
|
|
</div>
|
|
</el-footer>
|
|
</el-container>
|
|
<!-- 弹窗 -->
|
|
<!-- 新增弹窗组件 -->
|
|
<el-dialog v-model="dialogVisible" width="65%">
|
|
<!-- 自定义标题插槽,实现居中显示 -->
|
|
<template #header>
|
|
<div style="text-align: center">
|
|
<span>活动规则</span>
|
|
</div>
|
|
</template>
|
|
<!-- 中间内容部分 -->
|
|
<p>
|
|
活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则活动规则
|
|
</p>
|
|
<template #footer>
|
|
<!-- 添加一个div来包裹按钮,并设置样式使其居中 -->
|
|
<div style="text-align: center">
|
|
<el-button style="background-color: orange; color: white; border: none" @click="dialogVisible = false">
|
|
去充值
|
|
</el-button>
|
|
</div>
|
|
</template>
|
|
</el-dialog>
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped>
|
|
/* 标签栏 */
|
|
.tab-container {
|
|
display: flex;
|
|
gap: 30px;
|
|
margin-bottom: 10px;
|
|
padding: 0 20px;
|
|
justify-content: flex-end;
|
|
/* 新增右对齐 */
|
|
}
|
|
|
|
.tab-item {
|
|
cursor: pointer;
|
|
padding: 8px 12px;
|
|
font-size: clamp(18px, 3vw, 20px);
|
|
color: #999;
|
|
transition: all 0.3s;
|
|
border-bottom: 2px solid transparent;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.tab-item.active {
|
|
color: #000;
|
|
border-color: #000;
|
|
}
|
|
|
|
.tab-item:not(.active):hover {
|
|
color: #666;
|
|
}
|
|
|
|
.tab-content {
|
|
/* height: 100%; */
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
scroll-behavior: smooth;
|
|
/* 添加平滑滚动效果 */
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.tab-container {
|
|
gap: 15px;
|
|
padding: 0 10px;
|
|
}
|
|
|
|
.tab-item {
|
|
font-size: clamp(14px, 3vw, 16px);
|
|
padding: 6px 10px;
|
|
}
|
|
}
|
|
</style>
|
|
|
|
<style scoped>
|
|
.homepage {
|
|
height: 100vh;
|
|
margin: 0 auto;
|
|
background-image: url(src/assets/img/homePage/bk.png);
|
|
background-size: 100% 100%;
|
|
background-repeat: no-repeat;
|
|
background-position: center;
|
|
display: flex;
|
|
overflow: auto;
|
|
}
|
|
|
|
.homepage .el-container {
|
|
height: 100%;
|
|
flex-direction: column;
|
|
/* 明确纵向排列 */
|
|
display: flex;
|
|
overflow: auto;
|
|
}
|
|
|
|
.el-container .el-header {
|
|
height: 10%;
|
|
/* 设置头部高度 */
|
|
margin-top: 5px;
|
|
}
|
|
|
|
.el-container .el-main {
|
|
overflow-y: hidden;
|
|
overflow-x: hidden;
|
|
/* 新增滚动条 */
|
|
flex: 1 1 0%;
|
|
min-height: 0;
|
|
scrollbar-width: thin;
|
|
scrollbar-color: #888 transparent;
|
|
}
|
|
|
|
.el-container .el-footer {
|
|
/* height: 11%; */
|
|
height: auto;
|
|
min-height: 70px;
|
|
gap: 5px;
|
|
margin-top: 0;
|
|
}
|
|
|
|
.homepage-head {
|
|
padding: 0px;
|
|
/* 启用 flex 布局 */
|
|
display: flex;
|
|
position: relative;
|
|
/* 左右分开布局 */
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.homepage-right-group {
|
|
display: flex;
|
|
gap: 8px;
|
|
align-items: center;
|
|
margin-left: auto;
|
|
margin-right: 20px;
|
|
}
|
|
|
|
.homepage-right-group .action-btn {
|
|
height: 40px;
|
|
}
|
|
|
|
.homepage-right-group .count-badge {
|
|
position: relative;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.homepage-right-group .count-badge .count-number {
|
|
position: absolute;
|
|
top: 6px;
|
|
right: 29px;
|
|
color: #573dfc;
|
|
font-size: 12px;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.homepage-right-group .announcement-btn {
|
|
cursor: pointer;
|
|
transition: transform 0.3s;
|
|
}
|
|
|
|
/* @keyframes tilt {
|
|
0% { transform: rotate(0deg); }
|
|
50% { transform: rotate(10deg); }
|
|
100% { transform: rotate(-10deg); }
|
|
130% { transform: rotate(0deg); }
|
|
} */
|
|
|
|
.homepage-right-group .announcement-btn:hover {
|
|
transform: scale(1.3);
|
|
/* animation: tilt 1s ease-in-out; */
|
|
}
|
|
|
|
.homepage-body {
|
|
padding: 0px;
|
|
height: calc(100% - 70px);
|
|
/* 根据底部高度调整 */
|
|
}
|
|
|
|
.main-wrapper {
|
|
height: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.tab-section {
|
|
flex-shrink: 0;
|
|
/* 禁止伸缩 */
|
|
}
|
|
|
|
.tab-content {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
min-height: 0;
|
|
/* 关键:允许内容收缩 */
|
|
}
|
|
|
|
.homepage-logo {
|
|
height: 100%;
|
|
/* 改为根据内容自适应 */
|
|
width: fit-content;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
/* 固定左间距 */
|
|
margin-left: 20px;
|
|
margin-right: auto;
|
|
/* 新增相对定位 */
|
|
position: relative;
|
|
}
|
|
|
|
/* 新增媒体查询适配小屏幕 */
|
|
@media (max-width: 768px) {
|
|
.homepage-logo {
|
|
margin-left: 10px;
|
|
left: 0;
|
|
}
|
|
}
|
|
|
|
.logo1 {
|
|
width: 120px;
|
|
/* 固定 logo1 尺寸 */
|
|
height: auto;
|
|
margin-bottom: 8px;
|
|
/* 添加间距 */
|
|
}
|
|
|
|
.logo2 {
|
|
width: 80px;
|
|
/* 缩小 logo2 尺寸 */
|
|
height: auto;
|
|
}
|
|
|
|
/* 尾部 */
|
|
.homepage-footer {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 5px;
|
|
/* margin-top: auto; */
|
|
margin-bottom: 20px;
|
|
flex-shrink: 0;
|
|
height: auto;
|
|
}
|
|
|
|
.footer-first-line {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: auto;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.left-group {
|
|
display: flex;
|
|
gap: 15px;
|
|
}
|
|
|
|
.action-btn {
|
|
cursor: pointer;
|
|
transition: transform 0.2s;
|
|
height: 28px;
|
|
}
|
|
|
|
.action-btn:hover {
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
.send-btn {
|
|
margin-left: auto;
|
|
margin-right: 5px;
|
|
}
|
|
|
|
.footer-second-line {
|
|
position: relative;
|
|
display: flex;
|
|
height: auto;
|
|
align-items: flex-end;
|
|
flex: 1;
|
|
margin-top: auto;
|
|
min-height: 34px;
|
|
}
|
|
|
|
.msg-icon {
|
|
position: absolute;
|
|
left: 12px;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
width: 24px;
|
|
z-index: 1;
|
|
}
|
|
|
|
.msg-input:deep(.el-textarea__inner) {
|
|
border: none !important;
|
|
box-shadow: none !important;
|
|
overflow-y: auto !important;
|
|
/* 强制显示滚动条 */
|
|
transition: all 0.2s ease-out;
|
|
/* 添加过渡效果 */
|
|
}
|
|
|
|
/* .msg-input:deep(.el-textarea__inner:focus) {
|
|
border: none !important;
|
|
box-shadow: 0 4px 12px rgba(89, 24, 241, 0.3) !important;
|
|
} */
|
|
|
|
.msg-input {
|
|
min-height: 34px;
|
|
max-height: 120px;
|
|
width: calc(100% - 65px);
|
|
|
|
border-radius: 20px;
|
|
|
|
padding: 0px 20px 0 45px;
|
|
font-size: 16px;
|
|
transition: height 0.2s ease-out;
|
|
/* 添加高度过渡效果 */
|
|
overflow-y: hidden;
|
|
/* 隐藏垂直滚动条 */
|
|
box-shadow: 0 4px 12px rgba(89, 24, 241, 0.3);
|
|
background: #fff;
|
|
}
|
|
|
|
.msg-input:focus {
|
|
outline: none;
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.action-btn {
|
|
height: 28px;
|
|
}
|
|
|
|
.footer-second-line {
|
|
height: 50px;
|
|
}
|
|
|
|
.msg-input {
|
|
font-size: 16px;
|
|
}
|
|
}
|
|
</style>
|