增加清除全部剖切结果

This commit is contained in:
zh
2025-07-03 18:18:08 +08:00
parent 22a05c2c8c
commit a35b959ec2
15 changed files with 37 additions and 22 deletions

View File

@ -3,7 +3,7 @@ class BaseDialog {
this.container = container
this.options = { ...options }
this.options.ismove = true
if(options.ismove === false) {
if (options.ismove === false) {
this.options.ismove = options.ismove
}
this.closeCallBack = options.closeCallBack
@ -12,7 +12,6 @@ class BaseDialog {
}
async init() {
this.closeAll()
DialogAll.push(this)
this.isDestroy = false
@ -62,7 +61,7 @@ class BaseDialog {
});
}
if(this.options.ismove) {
if (this.options.ismove) {
this.moveDiv()
}
}
@ -92,7 +91,7 @@ class BaseDialog {
}
closeAll() {
for(let i=DialogAll.length-1;i>=0;i--) {
for (let i = DialogAll.length - 1; i >= 0; i--) {
DialogAll[i].close()
DialogAll.splice(i, 1)
}
@ -187,6 +186,14 @@ class BaseDialog {
_this._element.body.style.bottom = 'unset'
_this._element.body.style.right = 'unset'
}
//鼠标抬起事件
document.onmouseup = function (e) {
window.onmousemove = null
}
window.ondragend = function (e) {
window.onmousemove = null
}
}
//鼠标抬起事件