How to access an element embedded in the slot of a child component using this.$refs.xxx in the parent component? #10134
Unanswered
kingzytgit
asked this question in
Help/Questions
Replies: 2 comments
-
What are you trying to achieve? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Why use <template>
<AA>
<div ref="k"></div>
</AA>
</template>
<script setup lang="ts">
// ...
const k = ref();
</script> |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
There is a child component named AA:
Then AA is used in the parent component:
In the parent component, you are unable to use this.$refs.k. How to solve this?
Beta Was this translation helpful? Give feedback.
All reactions