mirror of https://github.com/ElemeFE/element
ScrollBar: cache bar width calculation
parent
45628ecbf3
commit
869600f4d5
|
@ -23,6 +23,7 @@ export default function() {
|
||||||
|
|
||||||
const widthWithScroll = inner.offsetWidth;
|
const widthWithScroll = inner.offsetWidth;
|
||||||
outer.parentNode.removeChild(outer);
|
outer.parentNode.removeChild(outer);
|
||||||
|
scrollBarWidth = widthNoScroll - widthWithScroll;
|
||||||
|
|
||||||
return widthNoScroll - widthWithScroll;
|
return scrollBarWidth;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue