Skip to content

tryOnBeforeMount

安全 onBeforeMount。如果它在组件生命周期内,则调用 onBeforeMount(),如果不在组件生命周期内,则仅调用该函数

¥Safe onBeforeMount. Call onBeforeMount() if it's inside a component lifecycle, if not, just call the function

用法

¥Usage

js
import { tryOnBeforeMount } from '@vueuse/core'

tryOnBeforeMount(() => {

})