-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Description
Version
2.5.17
Reproduction link
https://codesandbox.io/s/nrpjvl3v0
Steps to reproduce
If you look at the linked code sandbox, there is a simple directive being used on a normal component, a functional component using a render function, and a functional component using a template. I could not find a way to get the directive passed through in the functional template example. Essentially a similar approach to v-bind="attrs" and v-on='listeners" but for directives.
Is this currently possible? If not, would it be considered? Otherwise - in order to write functional template components, you would need to ensure they are never intended to be used with custom directives.
Our specific use case was that we have a base button component that is a functional template components, but it doesn't work with https://www.npmjs.com/package/vue2-touch-events
What is expected?
A method through the functional template to proxy through directives.
What is actually happening?
The custom directive cannot be applied to the functional template component.