[Vuejs]-Data table template as prop vuejs

0👍

You can use v-bind="$attrs". which means that all the attributed passed to the parent component will pass on to the child component.

so in your case use it like so:

parent component:

<data-table-search v-bind="$attrs">

and now you don’t need to declare all of those props in the parent component.

Leave a comment