UNPKG

@antdv/pro-utils

Version:

@antdv/pro-utils

15 lines (14 loc) 294 B
import { getCurrentInstance, onMounted, ref } from "vue"; function useMounted() { const isMounted = ref(false); const instance = getCurrentInstance(); if (instance) { onMounted(() => { isMounted.value = true; }, instance); } return isMounted; } export { useMounted };