Closed Offlein closed 7 months ago
@Offlein As you can see in the video below:
https://github.com/vue-final/vue-final-modal/assets/15190246/5d8e877e-634d-49cc-a349-e67d76283c73
You'll see all of the props and events you can use in <VueFinalModal>
by vscode's auto completion. I am sure that the TS user can have this DX, but not sure about the js users.
@hunterliu1003 Thank you for the reply. I don't believe I had that intellisense in my JetBrains IDE -- but it's also possible I just missed it!
I see the documentation is updated too! Looks great to me! Much appreciated.
The documentation for the UseModal() composable makes it clear that the
attrs
object can contain custom event listeners, but does not explain a fundamental aspect of VFM's expectations.The question seems to have come up a few times in the Issues here, and you answer it definitively here that event listeners must be prefixed with
on
, although it's still a little vague. Especially since in this comment I believe you are typo'ing and saying that the event emitted should beonCloseModal
It might save you some trouble to add to the documentation something like this:
I'm actually not even 100% sure that an event "somethingElse" would come in via "onSomethingElse" (versus "onSomethingelse" maybe?), but I hope my overall point is clear.
Love the library. Thanks for all you do!