feat: 首页样式调整
This commit is contained in:
parent
e3834d5428
commit
6a341a89c3
|
@ -13,7 +13,7 @@
|
|||
</view>
|
||||
|
||||
<!-- 首页 -->
|
||||
<view class="content" v-if="!isChat">
|
||||
<view class="main-content" v-if="!isChat">
|
||||
<view class="welcome-message">
|
||||
<image
|
||||
class="avatar"
|
||||
|
@ -588,7 +588,7 @@ page {
|
|||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
background-position: 0 88rpx;
|
||||
// overflow-y: scroll;
|
||||
// overflow: hidden; /* 改为 hidden 防止页面整体滚动 */
|
||||
}
|
||||
|
||||
.home-container {
|
||||
|
@ -628,7 +628,7 @@ page {
|
|||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
.main-content {
|
||||
padding: 30rpx;
|
||||
padding-top: 100rpx;
|
||||
|
||||
|
@ -776,83 +776,236 @@ page {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.drawer-container {
|
||||
padding: 32rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
background-color: #ffffff;
|
||||
.chat-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.chat-history-list {
|
||||
flex: 1;
|
||||
// padding: 30rpx 40rpx;
|
||||
height: calc(100vh - 200rpx);
|
||||
|
||||
.chat-day {
|
||||
display: flex;
|
||||
margin: 20rpx 0 20rpx 30rpx;
|
||||
|
||||
.day-text {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
font-family: PingFang SC;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.chat-scroll {
|
||||
flex: 1;
|
||||
flex-shrink: 0;
|
||||
// overflow-y: auto; /* 使用auto而不是scroll */ // 添加这行会导致滚动条不见
|
||||
}
|
||||
|
||||
.chat-item {
|
||||
padding: 24rpx 30rpx;
|
||||
border-radius: 16rpx;
|
||||
// margin-bottom: 30rpx;
|
||||
// 测试按钮样式
|
||||
.test-button {
|
||||
position: fixed;
|
||||
bottom: 180rpx;
|
||||
right: 30rpx;
|
||||
background-color: #4370fe;
|
||||
color: #ffffff;
|
||||
padding: 16rpx 24rpx;
|
||||
border-radius: 10rpx;
|
||||
font-size: 28rpx;
|
||||
z-index: 999;
|
||||
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.chat-text {
|
||||
font-size: 28rpx;
|
||||
color: #303030;
|
||||
font-family: PingFang SC;
|
||||
.chat-card {
|
||||
// background-color: #ffffff;
|
||||
// border-radius: 16rpx;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
.chat-card-title {
|
||||
font-family: DouyinSans;
|
||||
font-weight: bold;
|
||||
font-size: 36rpx;
|
||||
color: #5255e6;
|
||||
// line-height: 24rpx;
|
||||
background: linear-gradient(-56deg, #4d50dd 0%, #3e6aff 100%);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
&-active {
|
||||
background-color: #4f6aff;
|
||||
.chat-card-desc {
|
||||
font-family: PingFang SC;
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #9ba5c7;
|
||||
line-height: 24rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.chat-text {
|
||||
color: #fff;
|
||||
.chat-card-questions {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16rpx;
|
||||
|
||||
.question-item {
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
line-height: 1.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.drawer-footer {
|
||||
height: 130rpx;
|
||||
border: 1rpx solid #eeeeee;
|
||||
border-radius: 12rpx;
|
||||
padding: 0 30rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.chat-content {
|
||||
flex: 1;
|
||||
padding: 20rpx 0;
|
||||
margin-bottom: 150rpx;
|
||||
|
||||
.user-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.user-avatar {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
border-radius: 50%;
|
||||
margin-right: 30rpx;
|
||||
.message-time {
|
||||
text-align: center;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.user-name {
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
font-family: DouyinSans;
|
||||
color: #333;
|
||||
.message-left,
|
||||
.message-right {
|
||||
display: flex;
|
||||
margin-bottom: 40rpx;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.message-left {
|
||||
justify-content: flex-start;
|
||||
|
||||
.ai-avatar {
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
border-radius: 50%;
|
||||
margin-right: 16rpx;
|
||||
background-color: #f0f0f0;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.message-content {
|
||||
background-color: #ffffff;
|
||||
max-width: 70%;
|
||||
padding: 20rpx 24rpx;
|
||||
border-radius: 0 16rpx 16rpx 16rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 1.5;
|
||||
|
||||
/* Markdown内容样式调整 */
|
||||
/deep/ .markdown-container {
|
||||
padding: 0;
|
||||
|
||||
/* 覆盖默认的padding,避免额外空白 */
|
||||
p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* 确保代码块不会超出气泡 */
|
||||
pre {
|
||||
max-width: 100%;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
/* 调整图片大小 */
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/* 调整表格样式 */
|
||||
table {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.message-right {
|
||||
justify-content: flex-end;
|
||||
|
||||
.user-avatar {
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
border-radius: 50%;
|
||||
margin-left: 16rpx;
|
||||
background-color: #f0f0f0;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.message-content {
|
||||
background-color: #4370fe;
|
||||
color: #ffffff;
|
||||
max-width: 70%;
|
||||
padding: 20rpx 24rpx;
|
||||
border-radius: 16rpx 0 16rpx 16rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 1.5;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.settings {
|
||||
padding: 10rpx;
|
||||
.chat-footer {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
|
||||
.floating-tabs {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
margin: 0 0 20rpx 20rpx;
|
||||
|
||||
.tab-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #ffffff;
|
||||
padding: 8rpx 24rpx;
|
||||
border-radius: 50rpx;
|
||||
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
|
||||
margin-right: 12rpx;
|
||||
|
||||
.tab-icon {
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.input-container {
|
||||
padding: 32rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05);
|
||||
|
||||
.input-area {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: #f2f4f9;
|
||||
border-radius: 20rpx;
|
||||
padding: 16rpx 24rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.chat-input {
|
||||
flex: 1;
|
||||
height: 40rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.send-btn {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.send-icon {
|
||||
width: 40rpx;
|
||||
height: 46rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -883,236 +1036,4 @@ page {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.chat-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.chat-scroll {
|
||||
flex: 1;
|
||||
flex-shrink: 0;
|
||||
// overflow-y: auto; /* 使用auto而不是scroll */ // 添加这行会导致滚动条不见
|
||||
}
|
||||
|
||||
// 测试按钮样式
|
||||
.test-button {
|
||||
position: fixed;
|
||||
bottom: 180rpx;
|
||||
right: 30rpx;
|
||||
background-color: #4370fe;
|
||||
color: #ffffff;
|
||||
padding: 16rpx 24rpx;
|
||||
border-radius: 10rpx;
|
||||
font-size: 28rpx;
|
||||
z-index: 999;
|
||||
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.chat-card {
|
||||
// background-color: #ffffff;
|
||||
// border-radius: 16rpx;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
.chat-card-title {
|
||||
font-family: DouyinSans;
|
||||
font-weight: bold;
|
||||
font-size: 36rpx;
|
||||
color: #5255e6;
|
||||
// line-height: 24rpx;
|
||||
background: linear-gradient(-56deg, #4d50dd 0%, #3e6aff 100%);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.chat-card-desc {
|
||||
font-family: PingFang SC;
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #9ba5c7;
|
||||
line-height: 24rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.chat-card-questions {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16rpx;
|
||||
|
||||
.question-item {
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
line-height: 1.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.chat-content {
|
||||
flex: 1;
|
||||
padding: 20rpx 0;
|
||||
margin-bottom: 150rpx;
|
||||
|
||||
.message-time {
|
||||
text-align: center;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.message-left,
|
||||
.message-right {
|
||||
display: flex;
|
||||
margin-bottom: 40rpx;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.message-left {
|
||||
justify-content: flex-start;
|
||||
|
||||
.ai-avatar {
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
border-radius: 50%;
|
||||
margin-right: 16rpx;
|
||||
background-color: #f0f0f0;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.message-content {
|
||||
background-color: #ffffff;
|
||||
max-width: 70%;
|
||||
padding: 20rpx 24rpx;
|
||||
border-radius: 0 16rpx 16rpx 16rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 1.5;
|
||||
|
||||
/* Markdown内容样式调整 */
|
||||
/deep/ .markdown-container {
|
||||
padding: 0;
|
||||
|
||||
/* 覆盖默认的padding,避免额外空白 */
|
||||
p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* 确保代码块不会超出气泡 */
|
||||
pre {
|
||||
max-width: 100%;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
/* 调整图片大小 */
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/* 调整表格样式 */
|
||||
table {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.message-right {
|
||||
justify-content: flex-end;
|
||||
|
||||
.user-avatar {
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
border-radius: 50%;
|
||||
margin-left: 16rpx;
|
||||
background-color: #f0f0f0;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.message-content {
|
||||
background-color: #4370fe;
|
||||
color: #ffffff;
|
||||
max-width: 70%;
|
||||
padding: 20rpx 24rpx;
|
||||
border-radius: 16rpx 0 16rpx 16rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 1.5;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.chat-footer {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
|
||||
.floating-tabs {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
margin: 0 0 20rpx 20rpx;
|
||||
|
||||
.tab-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #ffffff;
|
||||
padding: 8rpx 24rpx;
|
||||
border-radius: 50rpx;
|
||||
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
|
||||
margin-right: 12rpx;
|
||||
|
||||
.tab-icon {
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.input-container {
|
||||
padding: 32rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05);
|
||||
|
||||
.input-area {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: #f2f4f9;
|
||||
border-radius: 20rpx;
|
||||
padding: 16rpx 24rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.chat-input {
|
||||
flex: 1;
|
||||
height: 40rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.send-btn {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.send-icon {
|
||||
width: 40rpx;
|
||||
height: 46rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue