0👍
Did you try doing deep copy:
switchToGerman () {
const copyContent = JSON.parse(JSON.stringify(this.mainContent))
copyContent.content = contentDe
this.mainContent = copyContent
}
- [Vuejs]-Encore Vue.js style compilation wrong folder
- [Vuejs]-Vue.Draggable Drag and drop to same array
0👍
I found the solution (thank you @EricGuan for pointing out that the mistake must lay somewhere else)
As you can see in the original post I created a watcher for the mainData
property and expected that this would trigger the re render.
What was missing is, that I didn’t watch the content
property on the ProjectElement
component, thus not triggering a re render there.
I added this to ProjectElement.vue
and now it works like a charm:
watch: {
content(newContent){
this.projectContent = newContent
}
},
Thank you everybody for helping me! <3
- [Vuejs]-Can't access droppable() in Vue component
- [Vuejs]-<router-view> in laravel 5.6 and vue.js don't work
Source:stackexchange.com