vue-expandable-image
vue-expandable-image copied to clipboard
watch method not fired
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;
}
},
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 },