Browse Source

优化滚动效果

wangyi/feature-20251022162725-启动页登录注册
Ethereal 1 month ago
parent
commit
3e23bcc130
  1. 13
      pages/deepMate/deepMate.vue

13
pages/deepMate/deepMate.vue

@ -381,10 +381,12 @@ const scrollToTop = () => {
display: flex;
flex-direction: column;
height: 100vh;
max-height: 100vh; /* 限制最大高度 */
background-color: #ffffff;
padding: 20rpx 0rpx;
padding: 0; /* 移除padding,避免影响布局 */
position: relative;
overflow: hidden; /* 禁止页面整体滚动 */
-webkit-overflow-scrolling: none; /* 禁用iOS弹性滚动 */
}
/* 顶部导航栏 - 固定定位 */
@ -448,7 +450,9 @@ const scrollToTop = () => {
padding: 20rpx;
overflow-y: hidden; /* 禁止主内容区域滚动 */
margin-top: 20rpx;
margin-bottom: 250rpx;
margin-bottom: 250rpx; /* 为底部输入区域留出空间 */
max-height: calc(100vh - 200rpx); /* 确保内容区域不会超出视口 */
-webkit-overflow-scrolling: none; /* 禁用iOS弹性滚动 */
}
.robot-container {
@ -616,7 +620,7 @@ const scrollToTop = () => {
.chat-scroll-view {
height: calc(80vh - 250rpx); /* 根据需要调整高度 */
margin-top: 180rpx;
margin-top: 120rpx;
}
.message-list {
@ -733,6 +737,7 @@ const scrollToTop = () => {
padding: 0 40rpx 80rpx 40rpx;
background-color: #ffffff;
z-index: 999;
-webkit-overflow-scrolling: none; /* 禁用iOS弹性滚动 */
}
.input-wrapper {
@ -850,6 +855,6 @@ const scrollToTop = () => {
}
/* 顶部固定区域占位符 */
.banner-placeholder {
height: 60rpx; /* 与header高度一致,防止内容被固定头部遮挡 */
height: 120rpx; /* 与header高度一致,防止内容被固定头部遮挡 */
}
</style>
Loading…
Cancel
Save