We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.2.31
stackblitz.com
<template> <div id="app"> <button ref="btn" @click="show">test</button> <div ref="itemRefs" v-for="item in list" :key="item">{{ item }}</div> </div> </template> <script> import { ref, onMounted } from "vue"; export default { name: "App", setup() { const list = ref(["a", "b", "c"]); const itemRefs = ref([]); const btn = ref(); onMounted(() => { alert(itemRefs.value[0]); alert(btn.value.textContent); }); return { list, itemRefs, btn }; }, methods: { show() { alert(this.$refs.itemRefs[0].textContent); }, }, }; </script>
The contents of alter should be " a, b,c"
TypeError: Cannot read properties of undefined
The text was updated successfully, but these errors were encountered:
#5447
Sorry, something went wrong.
No branches or pull requests
Version
3.2.31
Reproduction link
stackblitz.com
Steps to reproduce
What is expected?
The contents of alter should be " a, b,c"
What is actually happening?
TypeError: Cannot read properties of undefined
The text was updated successfully, but these errors were encountered: