methods: {
toggle(){
this.visibelOptions = true
},
selectOption(option){
this.$emit('select', option)
this.visibelOptions = false;
},
hideSelected(e){
this.visibelOptions = false
}
},
mounted() {
document.addEventListener('click', this.hideSelected, true);
},
beforeDestroy(){
document.removeEventListener('click', this.hideSelected, true);
}
hideSelect(e) {
if (!document.querySelector(".title").contains(e.target)) {
this.areOptionsVisible = false;
}
}