Prevent leaking implementations
- Since we have complete freedom on markup, most common implementations apply the
v-ifon the slot content root as was suggested in readme examples. That being said, it's not wrong to applyv-ifto thea11y-vue-dialogitself, to a wrapper element, to the<portal>element or the<transition>element itself. Before this minor, if any of these cases happened, thehandleClosehandler would not be called, and some leaks could occur. Now we call it correctly onbeforeDestroy, meaning that consumers can safely implement in any way. - Now forwards the event object that triggers
@close
Also tested usage with portal-vue-simple and it works flawlessly, I will probably make this as the official peer-dependency for the official 1.0 release as it's more than enough for our dialog needs and only 3k (1.3k gzip).