You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In component libraries, the default props values can be requested to be different from project to project, so we re-enter the props values every time a component is used, or we write an extra component for this and try to transfer all the features of the component. I started to create a UI library from the components I use and I know that I want to use a different default props in each project. Existing techniques do not offer a solution for this.
In functions like cloneVNode(h(Component)), defineComponent(h(Component)), reactivity can be broken or some properties cannot be passed, the default value of the modelValue create with defineModel() for defineComponent does not change without binding a v-model to the component with an in-component function.
Moreover, if I need to dynamically change the props in a component that I transfer via slot, I cannot change it in an easy way.
For this, it would be great if there is an arg on defineComponent() that we can add extra props or a function called defineExtraProps() that we can add extra props to the component.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In component libraries, the default props values can be requested to be different from project to project, so we re-enter the props values every time a component is used, or we write an extra component for this and try to transfer all the features of the component. I started to create a UI library from the components I use and I know that I want to use a different default props in each project. Existing techniques do not offer a solution for this.
In functions like cloneVNode(h(Component)), defineComponent(h(Component)), reactivity can be broken or some properties cannot be passed, the default value of the modelValue create with defineModel() for defineComponent does not change without binding a v-model to the component with an in-component function.
Moreover, if I need to dynamically change the props in a component that I transfer via slot, I cannot change it in an easy way.
For this, it would be great if there is an arg on defineComponent() that we can add extra props or a function called defineExtraProps() that we can add extra props to the component.
Beta Was this translation helpful? Give feedback.
All reactions