<script>
export default {
data() {
return {
data: {},
dataTemp: {}
}
},
methods: {
updateData() {
let queries = { ...this.$route.query }
this.data = {
...this.data,
pID: queries.pid,
sID: queries.sid
}
this.dataTemp = {
...this.dataTemp,
pID: queries.pid,
sID: queries.sid
}
}
}
}
</script>
Upon updating this.data in the code snippet above, it will also affect the content of this.dataTemp.
However, one could argue that they are not directly dependent on each other.
I would appreciate an explanation regarding this issue. Thank you!