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

[Bug Report] swiper组件 loop循环模式数据更新后,整体向后移了一个,顺序错了 #2803

Closed
chue4909 opened this Issue May 25, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@chue4909
Copy link

chue4909 commented May 25, 2018

VUX version

2.9.1

OS/Browsers version

任意

Vue version

2.5.17-beta.0

Code

demo05_onLoad(id) {
      const list = [
        {
          url: 'javascript:',
          img:
            'https://ww1.sinaimg.cn/large/663d3650gy1fq66vvsr72j20p00gogo2.jpg',
          title: '送你一朵fua'
        },
        {
          url: 'javascript:',
          img:
            'https://ww1.sinaimg.cn/large/663d3650gy1fq66vw1k2wj20p00goq7n.jpg',
          title: '送你一辆车'
        },
        {
          url: 'javascript:',
          img: 'https://static.vux.li/demo/5.jpg', // 404
          title: '送你一次旅行',
          fallbackImg:
            'https://ww1.sinaimg.cn/large/663d3650gy1fq66vw50iwj20ff0aaaci.jpg'
        }
      ]
      this.demo05_list = list
      // this.demo05_list = id === 1 ? baseList : demoList
    }

Steps to reproduce

在demo中Async setting list data 示例代码,修改swiper为loop,在点击 Load list1按钮执行的回调中修改如上代码,点击按钮切换数据

What is Expected?

每次点击,顺序不变,在数据不变的情况下不从第一个位置重新开始

What is actually happening?

每次点击都会移一个位置,顺序错误,并且从第一个位置重新开始

unclay added a commit that referenced this issue May 27, 2018

@unclay

This comment has been minimized.

Copy link
Collaborator

unclay commented May 27, 2018

下版本修复

@unclay unclay closed this May 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.