slot scope props vue
How to Pass Props in Vue 3 with Composition API | by William Schulte | Medium
In this article, we’ll be looking at how to pass props from parent to child components in Vue 3 with Composition API. We’ll accomplish this by building a basic Vue 3 interface with animation provided…
How to Pass Props in Vue 3 with Composition API
All component props are available in the $props object (this.$props if you're not in the template), and we can use the Vue directive v-bind without specifying a specific prop name in order to bind a whole object of props to the child.
Vue v-slot
"parent"> Hello from parent> <child> slot-scope="props" v-text="props.text">> </child> <!-- Hoặc có thể dùng tính năng destructuring syntax của ES2015 --> slot-scope="{ text }" v-text>>.