We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9fbb028 commit f9d510eCopy full SHA for f9d510e
src/directive/el-dragDialog/drag.js
@@ -6,13 +6,13 @@ export default{
6
dragDom.style.cssText += ';top:0px;'
7
8
// 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
9
- function getStyle(dom, attr) {
10
- if (dom.currentStyle) {
11
- return dom.currentStyle[attr]
+ const getStyle = (function() {
+ if (window.document.currentStyle) {
+ return (dom, attr) => dom.currentStyle[attr]
12
} else {
13
- return getComputedStyle(dom, false)[attr]
+ return (dom, attr) => getComputedStyle(dom, false)[attr]
14
}
15
- }
+ })()
16
17
dialogHeaderEl.onmousedown = (e) => {
18
// 鼠标按下,计算当前元素距离可视区的距离
0 commit comments