[Feature Request] Add support for "events" object in each vue #2
Comments
I've actually been debating adding support for the following.
I think by the default it's probably best to hook events onto the
Feedback is appreciated, thank you! |
This is pretty much exactly what I wanted. If you could implement that, I would be very happy :)
|
Also, I think it would be better to use "events" instead of "listeners" so that people with existing vue 1 codebases can use this plugin without any problems. |
Ah, okay! That makes sense. I actually didn't even know that this was part of |
Thank you so much! It saves me lots of time and keystrokes!
New Way:
|
This is surprisingly difficult. If know how to do this, a pull request would be fantastic. If not, I'll just keep hacking away at it. I'm sure I'll figure it out before too long. |
I have no idea how to do this. I just started using vue two weeks ago, so I haven't gotten in to making plugins/mixins. I assumed that the code I posted earlier might be of some help, seeing as I found it in the library, but it appears I was wrong. I really hope that you can do it :D |
It may take me a day or two, but I'm sure I'll get it figured out before too long. There's just a couple "gotchas" that I'm trying to figure out. |
Okay. I will see if I can also get it to work on my end. I really hope that we can get this to work, as I am structuring a project of mine around your plugins 😄 |
We'll definitely get it. I've got it to a point where its firing the events like it should, but I'm struggling to get the event data. Just need to do some research and give it some time to sink in. |
This is what I've got so far, but the it's not firing the callbacks with their arguments.. Pretty sure it's just my lack of JS knowledge holding up this feature. I'm trying to get some help from the community now.
|
Woowee! Okay, I've hacked and slashed all day, and I believe I have an initial implementation. It'll only work with It currently only supports one syntax
@ajusa: Would you mind helping me test using the events-option-feature branch? |
Sure! I can do this tomorrow morning and I'll let you know if I run into anything that breaks! Thank you so much! Also, if this could support Vue 1, that would be cool too. My app isn't ported to Vue 2 thanks to a few other plugins that haven't been updated. I'll code with your version though :D |
This is a bit hard to explain, but basically in VueJS 1, the events object was an alias for .on, or whatever the function name was. It would be amazing if that was supported through this plugin.
Please tell me if you want me to elaborate, as this was poorly explained
The text was updated successfully, but these errors were encountered: