element When [bug report] uses El steps, if part of the El steps are loaded asynchronously, there will be a bug of step state matching error

pieyvz9o  于 5个月前  发布在  其他
关注(0)|答案(3)|浏览(53)

Element UI version

2.13.1

OS/Browsers version

win10 64位/chrome v81.0.4044.113

Vue version

2.6.11

https://codepen.io/pen/?&editable=true=https%3A%2F%2Felement.eleme.cn%2F

Steps to reproduce

el-step 首尾步骤是写死的,中间步骤是异步加载的,此时 el-steps 的进度和状态匹配会出现错乱

What is Expected?

异步加载后的 el-step 也能正常匹配

What is actually happening?

使用 vue-developtool 查看发现,el-steps 的 el-step 树排序是写死的树(两个节点)后加上异步加载的树,顺序是错的,所以匹配出现问题

dly7yett

dly7yett1#

Translation of this issue:

Element UI version

2.13.1

OS/Browsers version

Win10 64 bit / Chrome v81.0.4044.113

Vue version

2.6.11

https://codepen.io/pen/?&editable=true=https%3A%2F%2Felement.eleme.cn%2F

Steps to reproduce

The first and last steps of El step are write dead, and the intermediate steps are loaded asynchronously. At this time, the progress and state matching of El steps will be disordered

What is Expected?

After asynchronous loading, the El step can also match normally

What is actually happening?

Use Vue developetool to check and find that the El step tree sorting of El steps is the tree with dead write (two nodes) and asynchronous load. The order is wrong, so there is a problem in matching

d7v8vwbk

d7v8vwbk3#

I fixed it using a v-if on element-plus, i don't render (create it) before the async request is finished

相关问题