主题
usePageLeave
反应式状态显示鼠标是否离开页面。
¥Reactive state to show whether the mouse leaves the page.
示例
用法
¥Usage
ts
import { usePageLeave } from '@vueuse/core'
const isLeft = usePageLeave()
组件用法
¥Component Usage
vue
<template>
<UsePageLeave v-slot="{ isLeft }">
Has Left Page: {{ isLeft }}
</UsePageLeave>
</template>