React has something like this.props.children
: https://facebook.github.io/react/tips/children-props-type.html
Does Vue.js have also some similar to access the child-elements?
The equivalent to this.props.children
in Vue is <slot />
.
Example
<template>
<div>
<slot />
</div>
</template>
See http://vuejs.org/guide/components.html#Content-Distribution-with-Slots
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With