派生自 wuyushui/SewerAndRainNetwork

chenyabin
2021-04-20 7df2d3d0fa20cd1eb58009aaf6e1b3c8712a58a2
src/utils/dialogDrag.js
@@ -8,7 +8,9 @@
    const dragDom = el.querySelector('.el-dialog')
    // dialogHeaderEl.style.cursor = 'move';
    dialogHeaderEl.style.cssText += ';cursor:move;'
    dragDom.style.cssText += ';top:0px;'
    //console.log(dragDom.style.cssText)
    //dragDom.style.cssText += ';top:0px;'
   // dragDom.style.cssText = 'bottom:15px;'
    // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
    const sty = (function () {
@@ -68,7 +70,9 @@
        }
        // 移动当前元素
        dragDom.style.cssText += `;left:${left + styL}px;top:${top + styT}px;`
        //dragDom.style.cssText += `;left:${left + styL}px;top:${top + styT}px;`
        dragDom.style.cssText = `;left:${left + styL}px;top:${top + styT}px;`
        //console.log(left , styL,top , styT)
      }
      document.onmouseup = function (e) {