vue-expandable-image icon indicating copy to clipboard operation
vue-expandable-image copied to clipboard

watch method not fired

Open bluelemonade opened this issue 6 years ago • 1 comments

Hello,

I got the Compostion to work when I use it directly in my Compositions folger.

now I tried ti integrate a method to watch to an global timeout flag in the store.

the problem is that both methods did nothing when the state.timeout in the store switchs. I dis this in a few projects. the watch method is triggered when the computed method changes.

any ideas?

 computed: {
    isTimeout () {
      console.log("computed in expandable image")
      return  this.$store.getters.getTimeoutFlag;
    }
  },
  watch: {
    isTimeout (newT, oldT) {
      console.log(`Timeout ${newT}`)

      if (newT == true ){
        this.expanded = false;
      }
    },

bluelemonade avatar Jul 22 '19 16:07 bluelemonade

I tried now the beforeDestroyed but the image stays expanded over all, the log is OK, how can I kill the expanded Image?

beforeDestroy () { console.log("beforeDestroyed image") this.expanded = false },

bluelemonade avatar Jul 22 '19 17:07 bluelemonade