mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
* 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>
18 lines
701 B
TypeScript
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>
|