tmp
This commit is contained in:
@@ -1 +1,367 @@
|
||||
/* pages/ai/index.wxss */
|
||||
page {
|
||||
background-color: #f5f6fa;
|
||||
color: #1a1a2e;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
||||
}
|
||||
|
||||
.chat-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
background-color: #f5f6fa;
|
||||
}
|
||||
|
||||
.chat-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 88rpx;
|
||||
padding: 0 24rpx;
|
||||
background-color: #ffffff;
|
||||
border-bottom: 1rpx solid #e5e7eb;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.chat-header-title {
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
color: #1a1a2e;
|
||||
}
|
||||
|
||||
.message-list {
|
||||
flex: 1;
|
||||
padding: 20rpx;
|
||||
padding-bottom: 200rpx;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.quick-questions {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 40rpx 20rpx;
|
||||
}
|
||||
|
||||
.welcome-text {
|
||||
font-size: 32rpx;
|
||||
color: #1a1a2e;
|
||||
margin-bottom: 40rpx;
|
||||
text-align: center;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.quick-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
gap: 20rpx;
|
||||
}
|
||||
|
||||
.quick-item {
|
||||
background-color: #ffffff;
|
||||
border-radius: 16rpx;
|
||||
padding: 24rpx 32rpx;
|
||||
font-size: 28rpx;
|
||||
color: #4c6ef5;
|
||||
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
|
||||
text-align: center;
|
||||
border: 1rpx solid #e5e7eb;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.quick-item:active {
|
||||
transform: scale(0.98);
|
||||
background-color: rgba(76, 110, 245, 0.05);
|
||||
}
|
||||
|
||||
.message-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
|
||||
.message-item.ai {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.message-item.user {
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.message-time {
|
||||
font-size: 22rpx;
|
||||
color: #9ca3af;
|
||||
margin-top: 8rpx;
|
||||
padding: 0 4rpx;
|
||||
}
|
||||
|
||||
.message-item.ai .message-time {
|
||||
text-align: left;
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
.message-item.user .message-time {
|
||||
text-align: right;
|
||||
align-self: flex-end;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.user-avatar {
|
||||
background: linear-gradient(135deg, #4c6ef5, #748ffc);
|
||||
box-shadow: 0 4rpx 12rpx rgba(76, 110, 245, 0.25);
|
||||
}
|
||||
|
||||
.ai-avatar {
|
||||
background: linear-gradient(135deg, #20c997, #51cf66);
|
||||
box-shadow: 0 4rpx 12rpx rgba(32, 201, 151, 0.25);
|
||||
}
|
||||
|
||||
.avatar-text {
|
||||
color: #fff;
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.message-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-width: 95%;
|
||||
}
|
||||
|
||||
.message-item.user .message-content {
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.message-item.ai .message-content {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.message-bubble {
|
||||
padding: 20rpx 24rpx;
|
||||
border-radius: 16rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 1.6;
|
||||
word-break: break-word;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.user-bubble {
|
||||
background: linear-gradient(135deg, #4c6ef5, #748ffc);
|
||||
color: #fff;
|
||||
border-bottom-right-radius: 4rpx;
|
||||
box-shadow: 0 4rpx 12rpx rgba(76, 110, 245, 0.2);
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
|
||||
.ai-bubble {
|
||||
background-color: #ffffff;
|
||||
color: #1a1a2e;
|
||||
border-bottom-left-radius: 4rpx;
|
||||
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
|
||||
border: 1rpx solid #e5e7eb;
|
||||
margin-left: 4rpx;
|
||||
}
|
||||
|
||||
/* Markdown 渲染区域 */
|
||||
.message-markdown {
|
||||
width: 100%;
|
||||
font-size: 28rpx;
|
||||
color: #1a1a2e;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
/* 表格样式覆盖(防止过宽) */
|
||||
.message-markdown .t-chat-markdown-table {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
border: 1rpx solid #e5e7eb;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.message-markdown .t-chat-markdown-table__container {
|
||||
display: table;
|
||||
min-width: 100%;
|
||||
max-width: max-content;
|
||||
border-collapse: collapse;
|
||||
white-space: normal;
|
||||
table-layout: fixed;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.message-markdown .t-chat-markdown-table__th,
|
||||
.message-markdown .t-chat-markdown-table__td {
|
||||
padding: 8rpx 12rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 1.4;
|
||||
white-space: normal;
|
||||
word-break: break-word;
|
||||
word-wrap: break-word;
|
||||
overflow-wrap: break-word;
|
||||
max-width: 320rpx;
|
||||
}
|
||||
|
||||
.message-markdown .t-chat-markdown-table__th {
|
||||
background-color: #f5f6fa;
|
||||
font-weight: 600;
|
||||
color: #1a1a2e;
|
||||
}
|
||||
|
||||
.message-markdown .t-chat-markdown-table__tr:nth-child(2n) {
|
||||
background-color: #fafbfc;
|
||||
}
|
||||
|
||||
/* 代码块样式覆盖 */
|
||||
.message-markdown .t-chat-markdown-codespan,
|
||||
.message-markdown .t-chat-markdown-code {
|
||||
font-size: 24rpx;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.typing-indicator {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
|
||||
.typing-bubble {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12rpx;
|
||||
background-color: #ffffff;
|
||||
padding: 24rpx 32rpx;
|
||||
border-radius: 16rpx;
|
||||
border-bottom-left-radius: 4rpx;
|
||||
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
|
||||
border: 1rpx solid #e5e7eb;
|
||||
}
|
||||
|
||||
.dot {
|
||||
width: 16rpx;
|
||||
height: 16rpx;
|
||||
background-color: #9ca3af;
|
||||
border-radius: 50%;
|
||||
animation: bounce 1.4s infinite ease-in-out both;
|
||||
}
|
||||
|
||||
.dot:nth-child(1) {
|
||||
animation-delay: -0.32s;
|
||||
}
|
||||
|
||||
.dot:nth-child(2) {
|
||||
animation-delay: -0.16s;
|
||||
}
|
||||
|
||||
@keyframes bounce {
|
||||
0%, 80%, 100% {
|
||||
transform: scale(0.6);
|
||||
}
|
||||
40% {
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
.input-area {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20rpx 24rpx;
|
||||
background-color: #ffffff;
|
||||
gap: 16rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.chat-footer {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 10;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.chat-toolbar {
|
||||
display: flex;
|
||||
align-items: right;
|
||||
justify-content: right;
|
||||
padding: 12rpx 24rpx;
|
||||
background-color: #f5f6fa;
|
||||
border-top: 1rpx solid #e5e7eb;
|
||||
border-bottom: 1rpx solid #e5e7eb;
|
||||
}
|
||||
|
||||
.chat-toolbar-action {
|
||||
display: flex;
|
||||
align-items: right;
|
||||
justify-content: right;
|
||||
padding: 6rpx 24rpx;
|
||||
border-radius: 24rpx;
|
||||
background-color: #ffffff;
|
||||
border: 1rpx solid #e5e7eb;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.chat-toolbar-action:active {
|
||||
transform: scale(0.96);
|
||||
background-color: rgba(76, 110, 245, 0.08);
|
||||
border-color: #4c6ef5;
|
||||
}
|
||||
|
||||
.chat-toolbar-action text {
|
||||
font-size: 24rpx;
|
||||
color: #6b7280;
|
||||
}
|
||||
|
||||
.chat-input {
|
||||
flex: 1;
|
||||
height: 72rpx;
|
||||
background-color: #f5f6fa;
|
||||
border-radius: 36rpx;
|
||||
padding: 0 28rpx;
|
||||
font-size: 28rpx;
|
||||
color: #1a1a2e;
|
||||
border: 1rpx solid #e5e7eb;
|
||||
}
|
||||
|
||||
.chat-input::placeholder {
|
||||
color: #9ca3af;
|
||||
}
|
||||
|
||||
.send-btn {
|
||||
width: 120rpx;
|
||||
height: 72rpx;
|
||||
background-color: #e5e7eb;
|
||||
border-radius: 36rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.send-btn.active {
|
||||
background: linear-gradient(135deg, #4c6ef5, #748ffc);
|
||||
box-shadow: 0 4rpx 12rpx rgba(76, 110, 245, 0.25);
|
||||
}
|
||||
|
||||
.send-text {
|
||||
color: #9ca3af;
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
|
||||
.send-btn.active .send-text {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user