mirror of
https://gitee.com/ElemeFE/element.git
synced 2024-11-30 19:27:44 +08:00
fix a compatibility bug of loading
This commit is contained in:
parent
e28f33905d
commit
7de121ade5
@ -69,7 +69,8 @@ exports.install = Vue => {
|
|||||||
el.originalPosition = document.body.style.position;
|
el.originalPosition = document.body.style.position;
|
||||||
|
|
||||||
['top', 'left'].forEach(property => {
|
['top', 'left'].forEach(property => {
|
||||||
el.maskStyle[property] = el.getBoundingClientRect()[property] + document.body[`scroll${ property[0].toUpperCase() + property.slice(1) }`] + 'px';
|
let scroll = property === 'top' ? 'scrollTop' : 'scrollLeft';
|
||||||
|
el.maskStyle[property] = el.getBoundingClientRect()[property] + document.body[scroll] + document.documentElement[scroll] + 'px';
|
||||||
});
|
});
|
||||||
['height', 'width'].forEach(property => {
|
['height', 'width'].forEach(property => {
|
||||||
el.maskStyle[property] = el.getBoundingClientRect()[property] + 'px';
|
el.maskStyle[property] = el.getBoundingClientRect()[property] + 'px';
|
||||||
|
Loading…
Reference in New Issue
Block a user