vuetify
Version:
Vue Material Component Framework
1 lines • 857 B
Source Map (JSON)
{"version":3,"file":"refs.mjs","names":["onBeforeUpdate","ref","useRefs","refs","value","updateRef","e","i"],"sources":["../../src/composables/refs.ts"],"sourcesContent":["// Imports\nimport { onBeforeUpdate, ref } from 'vue'\nimport type { Ref } from 'vue'\n\nexport function useRefs <T extends {}> () {\n const refs = ref<(T | undefined)[]>([]) as Ref<(T | undefined)[]>\n\n onBeforeUpdate(() => (refs.value = []))\n\n function updateRef (e: any, i: number) {\n refs.value[i] = e\n }\n\n return { refs, updateRef }\n}\n"],"mappings":"AAAA;AACA,SAASA,cAAc,EAAEC,GAAG,QAAQ,KAAK;AAGzC,OAAO,SAASC,OAAO,GAAmB;EACxC,MAAMC,IAAI,GAAGF,GAAG,CAAoB,EAAE,CAA2B;EAEjED,cAAc,CAAC,MAAOG,IAAI,CAACC,KAAK,GAAG,EAAG,CAAC;EAEvC,SAASC,SAAS,CAAEC,CAAM,EAAEC,CAAS,EAAE;IACrCJ,IAAI,CAACC,KAAK,CAACG,CAAC,CAAC,GAAGD,CAAC;EACnB;EAEA,OAAO;IAAEH,IAAI;IAAEE;EAAU,CAAC;AAC5B"}