Closed
Description
Version
3.0.0-beta.10
Reproduction link
https://codesandbox.io/s/goofy-yalow-d0x6e?file=/src/App.vue
Steps to reproduce
<template>
<span v-for="n in 10" ref="x">{{ n }}</span>
</template>
<script>
export default {
mounted() {
console.log(this.$refs.x);
}
}
</script>
What is expected?
print an array of all spans
What is actually happening?
the last span
When used on elements/components with
v-for
, the registered reference will be an Array containing DOM nodes or component instances.