| 136 | e.preventDefault() |
| 137 | } |
| 138 | function _css (el, prop, val) { |
| 139 | const style = el && el.style; |
| 140 | |
| 141 | if (style) { |
| 142 | if (val === void 0) { |
| 143 | if (document.defaultView && document.defaultView.getComputedStyle) { |
| 144 | val = document.defaultView.getComputedStyle(el, ''); |
| 145 | } else if (el.currentStyle) { |
| 146 | val = el.currentStyle; |
| 147 | } |
| 148 | |
| 149 | return prop === void 0 ? val : val[prop]; |
| 150 | } |
| 151 | if (!(prop in style)) { |
| 152 | prop = `-webkit-${prop}`; |
| 153 | } |
| 154 | |
| 155 | style[prop] = val + (typeof val === 'string' ? '' : 'px'); |
| 156 | |
| 157 | } |
| 158 | } |
| 159 | function onDrop (e) { |
| 160 | const dragElement = document.getElementById(dragId) |
| 161 | const moveOffsetTop = dragElement.offsetTop + 70 // 当前拖拽离顶部的高度 |