token.d.ts 826 B

12345678910111213141516
  1. import type { OptionProps, SelectProps } from './defaults';
  2. import type { ExtractPropTypes, InjectionKey, Ref } from 'vue';
  3. import type { Option } from './select.types';
  4. import type { TooltipInstance } from 'element-plus/es/components/tooltip';
  5. export interface SelectV2Context {
  6. props: ExtractPropTypes<typeof SelectProps>;
  7. expanded: boolean;
  8. popper: Ref<TooltipInstance>;
  9. onSelect: (option: Option<any>, index: number, byClick?: boolean) => void;
  10. onHover: (idx: number) => void;
  11. onKeyboardNavigate: (direction: 'forward' | 'backward') => void;
  12. onKeyboardSelect: () => void;
  13. }
  14. export declare const selectV2InjectionKey: InjectionKey<SelectV2Context>;
  15. export declare type IOptionProps = ExtractPropTypes<typeof OptionProps>;
  16. export declare type ISelectProps = ExtractPropTypes<typeof SelectProps>;