docs: add advanced skills for Vitest, Pinia, and Vue built-ins
Add comprehensive reference documentation for: - Vitest: environments, projects/workspaces, type testing, vi utilities - Pinia: HMR, Nuxt integration, SSR setup - Vue: built-in components (Transition, Teleport, Suspense, KeepAlive) and advanced directives
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
---
|
||||
category: Sensors
|
||||
---
|
||||
|
||||
# useElementByPoint
|
||||
|
||||
Reactive element by point.
|
||||
|
||||
## Usage
|
||||
|
||||
```ts
|
||||
import { useElementByPoint, useMouse } from '@vueuse/core'
|
||||
|
||||
const { x, y } = useMouse({ type: 'client' })
|
||||
const { element } = useElementByPoint({ x, y })
|
||||
```
|
||||
|
||||
## Type Declarations
|
||||
|
||||
```ts
|
||||
export interface UseElementByPointOptions<Multiple extends boolean = false>
|
||||
extends ConfigurableDocument, ConfigurableScheduler {
|
||||
x: MaybeRefOrGetter<number>
|
||||
y: MaybeRefOrGetter<number>
|
||||
multiple?: MaybeRefOrGetter<Multiple>
|
||||
/** @deprecated Please use `scheduler` option instead */
|
||||
immediate?: boolean
|
||||
/** @deprecated Please use `scheduler` option instead */
|
||||
interval?: "requestAnimationFrame" | number
|
||||
}
|
||||
export interface UseElementByPointReturn<Multiple extends boolean = false>
|
||||
extends Supportable, Pausable {
|
||||
element: ShallowRef<
|
||||
Multiple extends true ? HTMLElement[] : HTMLElement | null
|
||||
>
|
||||
}
|
||||
/**
|
||||
* Reactive element by point.
|
||||
*
|
||||
* @see https://vueuse.org/useElementByPoint
|
||||
* @param options - UseElementByPointOptions
|
||||
*/
|
||||
export declare function useElementByPoint<M extends boolean = false>(
|
||||
options: UseElementByPointOptions<M>,
|
||||
): UseElementByPointReturn<M>
|
||||
```
|
||||
Reference in New Issue
Block a user