UNPKG

@aplus-frontend/antdv

Version:

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

12 lines 274 B
import { onBeforeUpdate, ref } from 'vue'; const useRefs = () => { const refs = ref(new Map()); const setRef = key => el => { refs.value.set(key, el); }; onBeforeUpdate(() => { refs.value = new Map(); }); return [setRef, refs]; }; export default useRefs;