0👍
I was able to solve the problem by changing the data structure a bit and adding a watcher to ‘label…
new Vue({
el:'#app',
data:{
label:'',
slug: ''
},
computed: {
computedSlug () {
return this.value.label+'Manish'
}
},
watch: {
label: function () {
this.slug = this.sanitize(this.label)
}
},
methods: {
sanitize (label) {
return label+'something'
}
}
});
Any other more sophesticated answers are most welcome 🙂
- [Vuejs]-Infinite scrolling from two different API endpoints
- [Vuejs]-Some css will not load in production mode in nuxt.js
Source:stackexchange.com