Files
element-plus/packages/components/select-v2/src/token.ts
Jeremy 9f5aae64ea fix(components): [select-v2] remove private API (#8145)
* fix(components): [select-v2] remove private API

* Refactor `select-menu` to `tsx`.
* Remove usage for `h` renderer
* Fix write operation for readonly computed.

* chore: make select-dropdown as tsx

Co-authored-by: JeremyWuuuuu <15975785+JeremyWuuuuu@users.noreply.github.com>
2022-06-07 17:23:12 +08:00

18 lines
701 B
TypeScript

import type { OptionProps, SelectProps } from './defaults'
import type { ExtractPropTypes, InjectionKey } from 'vue'
import type { Option } from './select.types'
export interface SelectV2Context {
props: ExtractPropTypes<typeof SelectProps>
expanded: boolean
onSelect: (option: Option<any>, index: number, byClick?: boolean) => void
onHover: (idx: number) => void
onKeyboardNavigate: (direction: 'forward' | 'backward') => void
onKeyboardSelect: () => void
}
export const selectV2InjectionKey =
'ElSelectV2Injection' as any as InjectionKey<SelectV2Context>
export type IOptionProps = ExtractPropTypes<typeof OptionProps>
export type ISelectProps = ExtractPropTypes<typeof SelectProps>