增加清除全部剖切结果
This commit is contained in:
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
//鼠标抬起事件
|
||||
|
Reference in New Issue
Block a user