element-plus
Version:
A Component Library for Vue 3
1 lines • 745 B
Source Map (JSON)
{"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-prop/index.ts"],"sourcesContent":["import { computed, getCurrentInstance } from 'vue'\n\nimport type { ComputedRef } from 'vue'\n\nexport const useProp = <T>(name: string): ComputedRef<T | undefined> => {\n const vm = getCurrentInstance()\n return computed(() => (vm?.proxy?.$props as any)?.[name])\n}\n"],"names":[],"mappings":";;AAIO,MAAM,OAAA,GAAU,CAAI,IAAA,KAA6C;AACtE,EAAA,MAAM,KAAK,kBAAA,EAAmB;AAC9B,EAAA,OAAO,SAAS,MAAG;AANrB,IAAA,IAAA,EAAA,EAAA,EAAA;AAMyB,IAAA,OAAA,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,EAAA,IAAA,IAAA,GAAA,MAAA,GAAA,EAAA,CAAI,KAAA,KAAJ,IAAA,GAAA,MAAA,GAAA,EAAA,CAAW,MAAA,KAAX,IAAA,GAAA,MAAA,GAAA,EAAA,CAA4B,IAAA,CAAA;AAAA,EAAA,CAAK,CAAA;AAC1D;;;;"}