element-plus
Version:
A Component Library for Vue 3
1 lines • 775 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":";;AAIa,MAAA,OAAA,GAAU,CAAI,IAA6C,KAAA;AACtE,EAAA,MAAM,KAAK,kBAAmB,EAAA,CAAA;AAC9B,EAAA,OAAO,SAAS,MAAG;AANrB,IAAA,IAAA,EAAA,EAAA,EAAA,CAAA;AAMyB,IAAI,OAAA,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,EAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,KAAA,KAAJ,IAAW,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,MAAA,KAAX,IAA4B,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,CAAA,CAAA;AAAA,GAAK,CAAA,CAAA;AAC1D;;;;"}