Skip to content

Directive for both v-bind and v-on #10052

Closed
@iogrt

Description

@iogrt

What problem does this feature solve?

I have several cases of components with different views, the children of these components are almost the same, but have some key differences, I want my code to be DRY and give the implementation in a base Component

Imagine i have a component with this template:

<template>
  <component is="myView" :textOptions="textOptions" />
</template>

Whatever view is chosen, there's always a text component inside that uses these textOptions like so:

<TextComponent v-bind="textOptions.props" v-on="textOptions.listeners" :otherProps=" 'other' " />

What does the proposed API look like?

I propose a new directive (which I'm calling v-all for now)

 <TextComponent v-all="textOptions" />

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions