8000 [Bug Report] swiper组件 loop循环模式数据更新后,整体向后移了一个,顺序错了 · Issue #2803 · airyland/vux · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[Bug Report] swiper组件 loop循环模式数据更新后,整体向后移了一个,顺序错了 #2803
Closed
@chue4909

Description

@chue4909

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?

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0