darrenjennings / vue-autosuggest

🔍 Vue autosuggest component.
https://darrenjennings.github.io/vue-autosuggest
MIT License
621 stars 91 forks source link

after-suggestions @click and other click events are invalid #128

Closed cdwmhcc closed 5 years ago

cdwmhcc commented 5 years ago

Relevant code or config

<div slot="after-suggestions">
     <a class="cursor-pointer" @click="alert('success')">more</a>
     <a class="cursor-pointer" @click.native="alert('success')">more</a>
     <a class="cursor-pointer" @click.stop="alert('success')">more</a>
</div>

What you did: I need to add a more button

What happened: All @click events under slot= "after-suggestions" are invalid

Problem description:

Suggested solution: Events such as @click can be used normally

darrenjennings commented 5 years ago

Can you describe what you mean by "invalid"? You're probably looking for @mouseup.stop. add that to the elements that are being clicked in addition to the click event and lemme know if that helps https://codesandbox.io/s/vueautosuggest-api-clicking-things-in-the-headerfooter-bzdrp

cdwmhcc commented 5 years ago

Can you describe what you mean by "invalid"? You're probably looking for @mouseup.stop. add that to the elements that are being clicked in addition to the click event and lemme know if that helps https://codesandbox.io/s/vueautosuggest-api-clicking-things-in-the-headerfooter-bzdrp Nice,That's what I need! Thank you very much! I come from other non-English speaking countries. My English is terrible. I'm sorry!

darrenjennings commented 5 years ago

Your english in this instance was just fine actually! Word choice was just a little unclear but grammar was great. Also, issues like these are good because I need to add better docs. Thank you!

cdwmhcc commented 5 years ago

Your english in this instance was just fine actually! Word choice was just a little unclear but grammar was great. Also, issues like these are good because I need to add better docs. Thank you!

Wow, no, no, I should thank you. Thank you for developing and opening up this component. It helped me. Thank you very much.

cdwmhcc commented 5 years ago

image It work!