Answer the question
In order to leave comments, you need to log in
Explain why this code works?
There is a custom select . I take it as practice. But in the process of parsing the code, only one incomprehensible construction remains for me, namely, in the selectValue function, which is triggered when an option is clicked. It calls
But at the same time, this event is not listened to anywhere ... and in turn, the custom select works correctly.
If the element on which the input event was fired was a simple input, there would be no confusion, but since this is a div, there was confusion ...
Explain why it fires on a div`e ? this.$emit("input", option);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question