UNPKG

@aplus-frontend/antdv

Version:

Vue basic component library maintained based on ant-design-vue

9 lines 230 B
import { onBeforeUnmount, shallowRef } from 'vue'; const useDestroyed = () => { const destroyed = shallowRef(false); onBeforeUnmount(() => { destroyed.value = true; }); return destroyed; }; export default useDestroyed;