SwipeTabs 新增 swipeable 开关, Macro 开启, 打卡/监控保持原行为; 使用 swiper 14 实现整屏分页 + 首尾橡皮筋 + 松手吸附 + 方向锁; 滑动/点击/路由双向同步, 子 tab 切换用 replace 不堆历史; 每个 slide 独立竖向滚动, pane 节点缓存避免横滑时重渲染列表; 宏观内部切 tab 不再重复播放整页入场动画
This commit is contained in:
@@ -222,6 +222,24 @@ input, textarea, select { font: inherit; }
|
||||
}
|
||||
.tab-pane[hidden] { display: none; }
|
||||
|
||||
/* 宏观整屏横滑 (SwipeTabs swipeable): 每个 tab 一屏, 每个 slide 自己竖向滚动。
|
||||
.tab-content 仍保留给打卡/监控 (纯点击切换, 不进 Swiper)。 */
|
||||
.swipe-tabs-wrap .swipe-tabs-swiper {
|
||||
flex: 1 1 0%;
|
||||
min-height: 0;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.swipe-tabs-swiper .swiper-wrapper { height: 100%; }
|
||||
.swipe-tabs-swiper .swiper-slide {
|
||||
height: 100%;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
overscroll-behavior-y: contain;
|
||||
touch-action: pan-y; /* 竖向滚动交给浏览器, 横向手势交给 Swiper */
|
||||
}
|
||||
|
||||
/* ================== 通用组件辅助类 ================== */
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user