constants.d.ts 498 B

123456789101112131415
  1. import type { InjectionKey, Ref } from 'vue';
  2. import type { UseNamespaceReturn } from 'element-plus/es/hooks';
  3. export interface AnchorLinkState {
  4. el: HTMLElement;
  5. href: string;
  6. }
  7. export interface AnchorContext {
  8. ns: UseNamespaceReturn;
  9. direction: string;
  10. currentAnchor: Ref<string>;
  11. addLink(state: AnchorLinkState): void;
  12. removeLink(href: string): void;
  13. handleClick(e: MouseEvent, href?: string): void;
  14. }
  15. export declare const anchorKey: InjectionKey<AnchorContext>;