T
T
thehighhomie2019-05-02 14:33:47
Vue.js
thehighhomie, 2019-05-02 14:33:47

VueJS: changing the binding parameter of a custom directive?

I decided to write a couple of directives, looked off. documentation and source codes for vue awesome directives.
It seems that I figured it out, everything is clear except for the moment with the parameters of the hooks.
Off documentation says:

All arguments other than el should be understood as read-only and should never be changed. If you need to pass information between hooks, we recommend using dataset.

Okay, everything is clear. Now I look at the source code of the v-dragged directive and see that on line 16 there is an entry in the binding parameter.
Tell me if I understand correctly that the author has departed from the recommendation in the off. documentation and wrote not quite correct code (although working)?
Or did I not understand something?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2019-05-02
@thehighhomie

I see that in line 16 there is an entry in the binding parameter

Where did you see this, I don't know. Calling a function parameter is not "writing to a parameter" at all.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question