refs.mjs 291 B

1234567891011121314151617
  1. // Utilities
  2. import { onBeforeUpdate, ref } from 'vue';
  3. // Types
  4. export function useRefs() {
  5. const refs = ref([]);
  6. onBeforeUpdate(() => refs.value = []);
  7. function updateRef(e, i) {
  8. refs.value[i] = e;
  9. }
  10. return {
  11. refs,
  12. updateRef
  13. };
  14. }
  15. //# sourceMappingURL=refs.mjs.map