nuxt-community / nuxt-class-component

ES / TypeScript decorator for class-style Nuxt/Vue components
MIT License
113 stars 15 forks source link

Adding `watchQuery` & `key` to @Component? #17

Closed hartmut-co-uk closed 5 years ago

hartmut-co-uk commented 6 years ago

What problem does this feature solve?

Currently when using nuxt with ts - I'm unable to add watchQuery & key to my vue components.

Please see https://github.com/nuxt/nuxt.js/blob/dev/examples/layout-transitions/pages/users.vue#L22-L25 and/or https://nuxtjs.org/api/pages-watchquery

Further reference: https://github.com/nuxt-community/nuxt-property-decorator/issues/13

What does the proposed changes look like?

Adding the fields / ts definitinos?

This feature request is available on Nuxt community (#c8)
hartmut-co-uk commented 6 years ago

@Atinux @manniL @galvez -> @stepbeekio has provided a working extension of vanilla vue for nuxt, please have another look at https://github.com/wagerfield/nuxt-typescript/issues/6

(unsure if it's complete...)

Maybe it can make it into v2 for better typescript support? :muscle:

hartmut-co-uk commented 5 years ago

covered with https://github.com/nuxt/nuxt.js/pull/4164