修复:AI问答模块

This commit is contained in:
2025-07-09 10:19:03 +08:00
parent ada779f880
commit 5deb2e96b5
6 changed files with 319 additions and 270 deletions

View File

@@ -1,5 +1,19 @@
// ... existing code ...
html {
font-size: calc(100vw / 375 * 16); // 假设设计稿宽度为375px设置基础字体大小为16px
@media screen and (max-width: 375px) {
font-size: 16px; // 最小字体大小
}
@media screen and (min-width: 768px) {
font-size: 24px; // 平板或大屏设备上的字体大小
}
}
.ai-chat {
height: 94vh;
height: 98vh;
display: flex;
flex-direction: column;
background-color: #f5f5f5;
@@ -9,7 +23,7 @@
color: white;
padding: 16px;
text-align: center;
font-size: 18px;
font-size: 1.2rem; // 使用 rem 单位
font-weight: bold;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
@@ -71,13 +85,13 @@
}
.avatar {
width: 40px;
height: 40px;
width: 60px;
height: 60px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 18px;
font-size: 18px; // 可以保持不变或调整为 rem 单位
flex-shrink: 0;
&.user-avatar {
@@ -97,7 +111,7 @@
border-radius: 18px;
word-wrap: break-word;
line-height: 1.5;
font-size: 14px;
font-size: 1rem; // 使用 rem 单位
position: relative;
.typing-indicator {
@@ -136,16 +150,15 @@
.message-input {
width: 100%;
min-height: 40px;
min-height: 90px;
max-height: 120px;
padding: 10px 16px;
border: 1px solid #e0e0e0;
border-radius: 20px;
font-size: 14px;
line-height: 1.5;
font-size: 1.2rem; // 使用 rem 单位
line-height: 1.8;
resize: none;
outline: none;
background: #f9f9f9;
transition: all 0.3s ease;
&:focus {
@@ -197,7 +210,7 @@
border-top: 1px solid #e0e0e0;
.quick-title {
font-size: 14px;
font-size: 1rem; // 使用 rem 单位
color: #666;
margin-bottom: 12px;
display: flex;
@@ -215,7 +228,7 @@
background: #f9f9f9;
border: 1px solid #e0e0e0;
border-radius: 12px;
font-size: 14px;
font-size: 1rem; // 使用 rem 单位
color: #333;
cursor: pointer;
transition: all 0.3s ease;
@@ -246,20 +259,20 @@
text-align: center;
.empty-icon {
font-size: 64px;
font-size: 4rem; // 使用 rem 单位
margin-bottom: 16px;
opacity: 0.5;
}
.empty-title {
font-size: 18px;
font-size: 1.5rem; // 使用 rem 单位
font-weight: bold;
color: #333;
margin-bottom: 8px;
}
.empty-desc {
font-size: 14px;
font-size: 1rem; // 使用 rem 单位
color: #666;
line-height: 1.5;
}