// 2.获取相关的高度 判断鼠标滚动到浏览器的底部 handleScroll() { var scrollTop = dialog.scrollTop || dialog.scrollTop; //变量windowHeight是可视区的高度 var windowHeight = dialog.clientHeight || dialog.clientHeight; //变量scrollHeight是滚动条的总高度 var scrollHeight = dialog.scrollHeight || dialog.scrollHeight; if (scrollTop + windowHeight == scrollHeight) { this.scroll = true } }, // 滑到底部才可以关闭 handleClose(done) { if (this.scroll === true){ done(); }else { this.dialogVisible = true this.$message({ message: '请耐心看完', type: 'warning' }); } },