Closed hartmut-co-uk closed 5 years ago
Happy to contribute, can anyone point directions?
Would/Should it need to be added to nuxt-class-component
- and used in here to replace vue-class-component
- as it's nuxt specific?
@hartmut-co-uk Please open a pull request, I will be happy to merge it asap :)
First need to find a solution :-) will have to wait for the issue raised with nuxt-class-component
to respond I think.
Many thanks for the reply though!
note - I think this will all be covered/resolved with https://github.com/nuxt/nuxt.js/pull/4164
This is resolved with latest v2.1.3 We added
watchQuery
can't work with v2.1.3
I tried it like this:
import { Vue, Component } from 'nuxt-property-decorator';
@Component({
...
})
export default class IndexPage extends Vue {
watchQuery: string[] = ['label', 'page'];
...
So strange, i see other hooks like asyncData
works well, but watchQuery
does nothing when query changes.
Better late than never: It should be put in the @Component
decorator option parameter, like so:
@Component({
watchQuery: ['label', 'page'],
})
export default class IndexPage extends Vue {
// ...
}
Better late than never: It should be put in the
@Component
decorator option parameter, like so:@Component({ watchQuery: ['label', 'page'], }) export default class IndexPage extends Vue { // ... }
Thx hahaha
Hi, could we please add
watchQuery
&key
?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