小程序
小游戏
企业微信
微信支付
扫描小程序码分享
页面功能:页面用到了swiper滑块,且存在多个swiper-item。
描述:通过按钮点击切换swiper,不使用左右滑动切换。
问题:
在使用catchtouchmove将滑动功能禁止后,发现页面内容超过一屏后,页面无法进行上下滑动查看超出内容。
有没有什么方法可以只禁用swiper的左右滑动,而不禁止它的上下滑动。求教。
1 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
试试 scroll-view catchtouchmove 放在 swiper-item 里
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
<
swiper
current
=
"{{currentTab}}"
style
"height:100%;"
bindchange
"bindChange"
>
view
wx:for
"{{swiperList}}"
wx:key
"index"
swiper-item
catchtouchmove
"forbidMove"
"height:100%;display:flex;"
scroll-view
scroll-y
"true"
都试过了,没有用,难道是我写法有问题吗,上面是我的页面结构
不是可以直接用纵向滑动的吗
<swiper current="{{currentTab}}" style="height:100%;" bindchange="bindChange" vertical='true' >
<swiper-item wx:for="{{swiperList}}" wx:key="index"catchtouchmove="forbidMove">
<scroll-view scroll-y="true" style="height:100%;">
https://developers.weixin.qq.com/s/saegywmP7ybG 你改一改就可以用了
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
试试 scroll-view catchtouchmove 放在 swiper-item 里
<swipercurrent="{{currentTab}}"style="height:100%;"bindchange="bindChange"><viewwx:for="{{swiperList}}"wx:key="index"><swiper-itemcatchtouchmove="forbidMove"style="height:100%;display:flex;"><scroll-viewscroll-y="true"style="height:100%;">都试过了,没有用,难道是我写法有问题吗,上面是我的页面结构
不是可以直接用纵向滑动的吗<swipercurrent="{{currentTab}}"style="height:100%;"bindchange="bindChange"vertical='true' ><swiper-itemwx:for="{{swiperList}}"wx:key="index"catchtouchmove="forbidMove"><scroll-viewscroll-y="true"style="height:100%;">https://developers.weixin.qq.com/s/saegywmP7ybG 你改一改就可以用了