Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

同一页面下,Swiper 和 ScrollView 共存出现 bugs #303

Closed
Dithub2016 opened this issue Jul 11, 2018 · 1 comment
Closed

同一页面下,Swiper 和 ScrollView 共存出现 bugs #303

Dithub2016 opened this issue Jul 11, 2018 · 1 comment

Comments

@Dithub2016
Copy link

Dithub2016 commented Jul 11, 2018

问题描述
小程序当中,同一页面下,SwiperScrollView 共存时,
使用 setState 修改 ScrollViewscrollIntoView 属性,使滚动到某一元素,
后自行滚动到其它地方,
监听 SwiperonChange,每隔5s触发一 setState 操作,那么在其触发时,ScorllView 会再次滚动到前面 setStatescrollIntoView 处,

复现步骤

// Swiper 的配置
{
      autoplay: true,
      interval: 5000,
      duration: 300,
      circular: true,
      displayMultipleItems: 1,
    }
// Swiper 的 onChange 事件, 此处执行一次 ScrollView 会滚动一次
onChange = e => {
    this.setState({
      currentIndex: e.detail.current,
    });
  }

// 结构,
// `ScrollView` 为 `taro` 组件, `MySwiper` 自定义组件,内有 `taro` 的 `Swiper` 一枚
<ScrollView>
  <MySwiper />
</ScrollView>

期望行为
bug 修复

报错信息

系统信息

  • 操作系统: win7
  • Taro 版本 v0.0.68
  • Node.js 版本 v8.11.2
@jinjinjin0731
Copy link
Contributor

好的。稍后跟进一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants