feat: add vhooks (#43)

This commit is contained in:
Dream Hunter
2023-12-15 12:28:42 +08:00
committed by GitHub
parent c2c1e4ae59
commit c5ea19bc07
6 changed files with 127 additions and 49 deletions

View File

@@ -0,0 +1,8 @@
import { useBreakpoint, useMemo } from 'vooks'
export function useIsMobile() {
const breakpointRef = useBreakpoint()
return useMemo(() => {
return breakpointRef.value === 'xs'
})
}