UNPKG

@aplus-frontend/antdv

Version:

Vue basic component library maintained based on ant-design-vue

19 lines (18 loc) 698 B
import type { Ref, InjectionKey, ComputedRef } from 'vue'; import type { AnchorDirection } from './Anchor'; export interface AnchorContext { registerLink: (link: string) => void; unregisterLink: (link: string) => void; activeLink: Ref<string>; scrollTo: (link: string) => void; handleClick: (e: Event, info: { title: any; href: string; }) => void; direction: ComputedRef<AnchorDirection>; } export declare const AnchorContextKey: InjectionKey<AnchorContext>; declare const useProvideAnchor: (state: AnchorContext) => void; declare const useInjectAnchor: () => AnchorContext; export { useInjectAnchor, useProvideAnchor }; export default useProvideAnchor;