document.addEventListener("click", (e) => {
let box = this.$refs.forward;
// 重点来了:Box里是否包含点击的元素,不包含点击的元素就隐藏面板
if (box) {
if (!box.contains(e.target)) {
if (this.isShowForwardicons) {
this.isShowForwardicons = false;
}
}
}
});