/*! For license information please see 9007.0f608cce.js.LICENSE.txt */ (self.webpackChunk=self.webpackChunk||[]).push([["9007"],{45885:function(s,a,n){"use strict";n.r(a);var t=n("80681");let e=["innerHTML"];a.default={setup:()=>({html:""}),render:()=>((0,t.wg)(),(0,t.iD)("div",{class:"van-doc-markdown-body",innerHTML:'

usePageVisibility

\n

Intro

\n

Get the visible state of the page.

\n

Usage

\n

Basic Usage

\n
import { watch } from 'vue';\nimport { usePageVisibility } from '@vant/use';\n\nexport default {\n  setup() {\n    const pageVisibility = usePageVisibility();\n\n    watch(pageVisibility, (value) => {\n      console.log('visibility: ', value);\n    });\n  },\n};\n
\n

API

\n

Type Declarations

\n
type VisibilityState = 'visible' | 'hidden';\n\nfunction usePageVisibility(): Ref<VisibilityState>;\n
\n

Return Value

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
NameDescriptionType
visibilityStateThe current visible state of the page, could be visible or hiddenRef<VisibilityState>
\n
'},null,8,e))}}}]);