A
A
Artur Galyaev2021-01-19 15:04:21
Vue.js
Artur Galyaev, 2021-01-19 15:04:21

How to pass child component props via $attrs?

A child component can pass all parent props to another child component via v-bind="$attrs", everything works, but there is a problem: All props are rendered in element attributes:
6006caa37324d013014529.png
What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Pastukhov, 2021-01-19
@art5455

Define a property in the component so that v-bind does not bind extra properties in html by default inheritAttrs: false

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question