const state = Vue.observable({ current: 0 });
export default {
computed: {
isOpen() {
return state.current === this._uid
}
},
methods: {
open() {
return state.current = this._uid;
},
close() {
return state.current = 0;
}
},
template: '...<div v-show="isOpen">...'
}