2021年3月28日星期日

Passing undeclared props to child component (like ...args)

I am making a wrapper component for a Vue component.

For example, I want to wrap Quasar's q-input (let's say because I am doing some custom styling:

// q-input-wrapper.vue  <template>  <div>    <q-input v-model="inputValue" label="Some Label">  </div>  </template>  

But then I want q-input-wrapper to be able to accept all props that q-input supports. I do not want to re-declare all of them in q-input-wrapper.vue.

Is there a way to bind props that are passed in q-input-wrapper for q-input to consume?

Probably something similar to how ...args work?

https://stackoverflow.com/questions/66848642/passing-undeclared-props-to-child-component-like-args March 29, 2021 at 12:07PM

没有评论:

发表评论