import type { InjectionKey, Ref } from 'vue'; import { inject, provide } from 'vue'; export interface ExpandedRowProps { componentWidth: Ref; fixHeader: Ref; fixColumn: Ref; horizonScroll: Ref; } export const ExpandedRowContextKey: InjectionKey = Symbol('ExpandedRowProps'); export const useProvideExpandedRow = (props: ExpandedRowProps) => { provide(ExpandedRowContextKey, props); }; export const useInjectExpandedRow = () => { return inject(ExpandedRowContextKey, {} as ExpandedRowProps); };