mirror of
https://github.com/mashirozx/sakura.git
synced 2024-11-26 08:48:13 +08:00
wip
This commit is contained in:
parent
84e3fc1ca4
commit
bd43413476
@ -1,5 +1,6 @@
|
|||||||
import { onUnmounted, onDeactivated } from 'vue'
|
import { onUnmounted, onDeactivated } from 'vue'
|
||||||
import getScrollbarWidth from '@/utils/getScrollbarWidth'
|
import getScrollbarWidth from '@/utils/getScrollbarWidth'
|
||||||
|
|
||||||
export default function () {
|
export default function () {
|
||||||
const removeScrollLock = () => {
|
const removeScrollLock = () => {
|
||||||
const body = document.querySelector('body')
|
const body = document.querySelector('body')
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
const getScrollbarWidth = () => {
|
export default function getScrollbarWidth() {
|
||||||
const div1 = document.createElement('div')
|
const div1 = document.createElement('div')
|
||||||
const div2 = document.createElement('div')
|
const div2 = document.createElement('div')
|
||||||
div1.style.width = div2.style.width = div1.style.height = div2.style.height = '100px'
|
div1.style.width = div2.style.width = div1.style.height = div2.style.height = '100px'
|
||||||
@ -11,5 +11,3 @@ const getScrollbarWidth = () => {
|
|||||||
document.body.removeChild(div2)
|
document.body.removeChild(div2)
|
||||||
return scrollbarWidth
|
return scrollbarWidth
|
||||||
}
|
}
|
||||||
|
|
||||||
export default getScrollbarWidth
|
|
||||||
|
Loading…
Reference in New Issue
Block a user