Does vue have a method similar to react's this.props.children to get component child elements?

write a component by yourself:
< len-carousel >
when using:

   <len-carousel>
      <div v-for="(item,index) in 4" :key="index">
        {{item}}
      </div>      
   </len-carousel>

how do I get the child elements of a component in a component?

Mar.07,2021

this.props.children corresponds to the default slot in vue. This.$slots.default


although there are prop and events, sometimes you may need to access a subcomponent directly in JavaScript. To do this, you can assign an ID reference to this subcomponent through the ref feature.
< base-input ref= "usernameInput" > < / base-input >
now in the components where you have defined this ref, you can use:

this.$refs.usernameInput

Menu