title: Mechanism of updating data in VueJS?
body: <pre><code>&lt;script&gt;
  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
        }
      }
    }
  }
  &lt;/script&gt;
  </code></pre>
  <p>In the example above, when I update this.data, this.dataTemp will also be changed.</p>
  <p>But I think it is not related to each other.</p>
  <p>Please explain to me this problem.
  Thanks!</p>