You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I'm usingnuxt-property-decorator and vue-property-decorator to import elements such Vue, Component, Model, ect into my project. I chose to develop usingClass-Based Component .
Inside a page (Home), I created a method that allows to perform an operation followed by a page refresh using this.$nuxt.refresh() I manage to refresh the page, however I have a warning that tells me that my instruction is not recognized.
`Property '$nuxt' does not exist on type 'Home'.
I exactly followed what is here : https://typescript.nuxtjs.org/guide/setup to install my Nuxt project with TS. The problem remains the same.
To Reproduce
PS: the code has been clipped to keep the important part
<script lang="ts">
import { Component, Vue } from 'nuxt-property-decorator'
import { manager } from '../services/manager'
@Component({})
export default class Home extends Vue {
services!: Array
async asyncData() {
const services = await manger.get()
return { services }
}
....
/**
* Change results order
* @param value {string}
* @returns {void}
*/
refreshResults(value: string): void {
// Setting the new ranking value
manager.setSettings(`${value}(name)`)
// refreshing page
this.$nuxt.refresh()
}
}
Expected behavior this.$nuxt.refresh() to be recognized
The text was updated successfully, but these errors were encountered:
karimennassiri
changed the title
this.$nuxt.refresh not recognized while usin property decorator
this.$nuxt.refresh not recognized while using property decorator
Feb 9, 2021
@karimennassiri Could you provide a repository with the mentioned issue ? I'll be glad to help then :)
If it's private you can send me a read-only access and revoke afterwards when I've found a solution.
Describe the bug
I'm using
nuxt-property-decorator
andvue-property-decorator
to import elements such Vue, Component, Model, ect into my project. I chose to develop usingClass-Based Component
.Inside a page (Home), I created a method that allows to perform an operation followed by a page refresh using
this.$nuxt.refresh()
I manage to refresh the page, however I have a warning that tells me that my instruction is not recognized.`Property '$nuxt' does not exist on type 'Home'.
I exactly followed what is here : https://typescript.nuxtjs.org/guide/setup to install my Nuxt project with TS. The problem remains the same.
To Reproduce
PS: the code has been clipped to keep the important part
Expected behavior
this.$nuxt.refresh()
to be recognizedScreenshots
https://i.stack.imgur.com/c7nlJ.png
The text was updated successfully, but these errors were encountered: