init component
This commit is contained in:
25
node_modules/buetify/lib/components/scroll/BScroll.js
generated
vendored
Executable file
25
node_modules/buetify/lib/components/scroll/BScroll.js
generated
vendored
Executable file
@@ -0,0 +1,25 @@
|
||||
import "../../../src/components/scroll/scroll.sass";
|
||||
import { getSimpleFunctionalComponent } from '../../utils/getSimpleFunctionalComponent';
|
||||
|
||||
function testWindowScrollbar() {
|
||||
const parent = document.createElement('div');
|
||||
parent.setAttribute('style', 'width:30px;height:30px;');
|
||||
parent.classList.add('scrollbar-test');
|
||||
const child = document.createElement('div');
|
||||
child.setAttribute('style', 'width:100%;height:40px');
|
||||
parent.appendChild(child);
|
||||
document.body.appendChild(parent); // eslint-disable-next-line
|
||||
// @ts-ignore
|
||||
|
||||
const scrollbarWidth = 30 - parent.firstChild.clientWidth;
|
||||
|
||||
if (scrollbarWidth) {
|
||||
document.body.classList.add('layout-scrollbar-obtrusive');
|
||||
}
|
||||
|
||||
document.body.removeChild(parent);
|
||||
}
|
||||
|
||||
requestAnimationFrame(testWindowScrollbar);
|
||||
export default getSimpleFunctionalComponent('b-scroll', 'div');
|
||||
//# sourceMappingURL=BScroll.js.map
|
||||
Reference in New Issue
Block a user