Answer the question
In order to leave comments, you need to log in
How to check slot usage?
How can you check the usage of a slot in a component?
<Component>
<template v-slot:header>
....
</template>
</Component>
<template>
<div :class="classes">
<slot name="header" />
</slot>
</div>
</template>
<script>
export default {
created () {
console.log(this.$slots.header) // не работает =(
}
}
</script>
Answer the question
In order to leave comments, you need to log in
console.log(this.$slots.header) // не работает
created () {
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question