Skip to content

tryOnMounted ​

类别
导出大小
164 B
最近修改
8 months ago

安全的 onMounted。如果在组件生命周期内,请调用 onMounted(),如果不在,就直接调用该函数

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

用法 ​

🌐 Usage

ts
import { 
tryOnMounted
} from '@vueuse/core'
tryOnMounted
(() => {
})