mounted() {
//点击任意位置关闭区域弹窗
document.addEventListener('click', (e) => {
//获取弹窗对象
const userCon = document.getElementsByClassName('tanKuang')[0];
const userCon1 = document.getElementsByClassName('tanKuang')[1];
//判断弹窗对象中是否包含点击对象
if (userCon && !userCon.contains(e.target)&& !userCon1.contains(e.target)) {
//如果包含则跳转回之前的页面
this.isShowModal = false;
}
})
},