import { computed, getCurrentInstance } from 'vue' import type { ComputedRef } from 'vue' export const useProp = (name: string): ComputedRef => { const vm = getCurrentInstance()! return computed(() => (vm.proxy?.$props as any)[name] ?? undefined) }