I want to set a property, by using Vue.set() in Nuxtjs application.
editPost(post) {
Vue.$set(post, 'edit', true)
}
Got error: Vue is not defined
You can just use this
instead of Vue.
. This references the current vue component inside the method, so it will work same way:
editPost(post) {
this.$set(post, 'edit', true)
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With