//html
<div id="box" ref="box" style="width:110px;height:110px;background-color:red"></div>
//JS
created(){
document.addEventListener('click',(e)=>{
console.log(this.$refs.box.contains(e.target));
if(!this.$refs.box.contains(e.target)){
this.isShowDialog = false;
}
})
}