ElemeFE / element

A Vue.js 2.0 UI Toolkit for Web
https://element.eleme.io/
MIT License
54.12k stars 14.64k forks source link

[bug report] carousel renders El carousel item according to array. After partial data of array changes, El carousel item does not switch left and right according to array order #19814

Open Jian-Yin opened 4 years ago

Jian-Yin commented 4 years ago

Element UI version

2.13.2

OS/Browsers version

window 10 / chrome 70

Vue version

3.0.0-beta.20

Reproduction Link

https://codepen.io/jian-yin/pen/ExPLpjW?editable=true%3Dhttps%3A%2F%2Felement.eleme.cn%2F

Steps to reproduce

1、data 定义数组 list = [1,3,5,7] 2、mounted 后 this.list = [1,2,3,4]

What is Expected?

Carousel 切换顺序 1,2,3,4

What is actually happening?

Carousel 切换顺序 1,3,2,4

element-bot commented 4 years ago

Translation of this issue:

Element UI version

2.13.2

OS/Browsers version

window 10 / chrome 70

Vue version

3.0.0-beta.20

Reproduction Link

https://codepen.io/jian-yin/pen/ExPLpjW?editable=true%3Dhttps%3A%2F%2Felement.eleme.cn%2F

Steps to reproduce

  1. Data definition array list = [1,3,5,7]

  2. After mounted this.list = [1,2,3,4]

    What is Expected?

Carousel switching order 1,2,3,4

What is actually happening?

Carousel switching order 1,3,2,4

Jian-Yin commented 4 years ago

$children 并不保证顺序,所以 Carousel 中 items 顺序 错误 https://github.com/vuejs/vue/issues/2275

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.