<swiper style="z-index: 99999;" :current="swiperCurrent" @transition="transition"
@animationfinish="animationfinish" class="swiper">
<swiper-item class="swiper-item">
<web-view id="website-list" :webview-styles="webviewStyles" src="https://www.tbjh-health.com">
</web-view>
<cover-view class="active">
我是webView
</cover-view>
</block>
</swiper-item>
</swiper>

4***@qq.com
- 发布:2022-06-01 17:52
- 更新:2024-05-27 20:41
- 阅读:2373

web-view 组件在 H5端 被转成 iframe 挂载到 body 下,类似于 vue3 的 teloport,在实现时设计如此,而此时滑动的是 swiper-item 组件,所以呈现为无法左右滑动。
针对当前业务场景可以采用 iframe 标签实现您的需求。
<swiper>
<swiper-item>
<iframe src="https://www.tbjh-health.com"></iframe>
</swiper-item>
<swiper-item>
<iframe src="https://www.tbjh-health.com"></iframe>
</swiper-item>
<swiper-item>
<iframe src="https://www.tbjh-health.com"></iframe>
</swiper-item>
</swiper>
w***@163.com
没有效果
2025-07-01 17:50