[Vuejs]-Why vue compnent property doesn;t update When open it secodnd time?

0👍

In Vue2, you might want to try returning center2 inside data(). It looks like below:

data() {
  return {
    center2: {
      lat: 0,
      lng: 0
    }
  }
}

Then center2 should be updated normally along with the watcher.

Leave a comment