Browse Source

修复iOS系统商品更新页面可拖动问题

pull/19/head
Default User 1 month ago
parent
commit
1cd06b2680
  1. 15
      pages/goods-update/goods-update.wxss

15
pages/goods-update/goods-update.wxss

@ -22,11 +22,24 @@ page::-webkit-scrollbar {
background-color: #f5f7fa; background-color: #f5f7fa;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
position: relative; position: relative;
overflow: hidden; /* 禁用页面容器滚动,防止iOS整体拖动 */
touch-action: none; /* 防止页面整体拖动 */
} }
/* 商品详情内容区域 */ /* 商品详情内容区域作为主要滚动区域 */
.goods-detail-content { .goods-detail-content {
height: calc(100vh - 140px); /* 减去底部按钮和顶部区域的高度 */
overflow-y: auto;
/* 优化iOS滚动行为,防止页面整体拖动 */
-webkit-overflow-scrolling: touch;
scrollbar-width: none; /* Firefox */
-ms-overflow-style: none; /* IE/Edge */
position: relative; position: relative;
touch-action: pan-y; /* 只允许垂直滚动 */
/* 添加以下属性防止iOS橡皮筋效果 */
overflow-x: hidden;
backface-visibility: hidden;
perspective: 1000px;
} }
/* 隐藏所有scroll-view组件的滚动条 */ /* 隐藏所有scroll-view组件的滚动条 */

Loading…
Cancel
Save