A modern vue admin. It is based on Vue3, vite and TypeScript. It's fast!
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.
 
 
 
 
 

15 lines
281 B

import { ref, onBeforeUpdate } from 'vue';
export function useRefs() {
const refs = ref([] as Element[]);
onBeforeUpdate(() => {
refs.value = [];
});
const setRefs = (index: number) => (el: Element) => {
refs.value[index] = el;
};
return [refs, setRefs];
}