UNPKG

element-plus

Version:
15 lines (13 loc) 307 B
import type { IOptionProps } from './token' export function useOption(props: IOptionProps, { emit }) { return { hoverItem: () => { emit('hover', props.index) }, selectOptionClick: () => { if (!props.disabled) { emit('select', props.item, props.index) } }, } }