a problem with the order of ref DOM after onUpdated
Version
3.0.5
Reproduction link
https://codesandbox.io/s/ref-dom-s6s3f?file=/src/App.vue
Steps to reproduce
点击列表
Click the list in view
What is expected?
视图中dom顺序和打印的dom顺序应该相同
The updated DOM order is the same as that printed by console
What is actually happening?
打印结果总是上一次dom
The result of printing is always the last dom
The template refs are set in the order of patching, not in the order of the DOM structure. For your demo, you can use an object instead of an array to achieve the goal: https://codesandbox.io/s/ref-dom-forked-p493e?file=/src/App.vue