You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ant-design-vue/components/_util/hooks/useDestroyed.ts

13 lines
234 B

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