Answer the question
In order to leave comments, you need to log in
How to create v-on: events?
Hello, I can write a directive v-transitionend
and assign to it, for example, such code
transitionend: {
inserted(el, binding, vnode) {
el.addEventListener("transitionend", () => {
if (!vnode.context.isDropped) vnode.context.focusedObj = null;
});
},
},
v-transitionend
I can write ,
that is, so that the processing code can be put not in a directive, but in a method @transitionend="mymethod()"
Answer the question
In order to leave comments, you need to log in
What are you sticking to these directives. Directives are a niche feature, needed in specific general cases. If you write a directive for one component, you are doing something wrong (99%).
So it should work on its own, without unnecessary gestures. As a last resort, if the target is another component. @transitionend="mymethod"
@transitionend.native="mymethod"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question