gertqin / vuex-class-modules

Typescript class decorators for vuex modules
MIT License
194 stars 20 forks source link

Request for new feature - @Onload method decorator #37

Closed LiamWiddop closed 4 years ago

LiamWiddop commented 4 years ago

I was looking to create a decorator to automatically call module methods on mounting a module, so I forked the repo here and added some lines to src/module-factory and src/index.ts. I also added src/onload.ts, which is basically an adaptation of src/actions.ts.

My changes basically add support for an @Onload method decorator and has worked in my tests. I was hoping that someone could review this as I believe it adds an interesting feature.

Thanks.

bodograumann commented 4 years ago

That sounds interesting. Could you actually create a pull request for it, please?

LiamWiddop commented 4 years ago

Sure, here you go: #38