UNPKG

element-plus

Version:

A Component Library for Vue 3

1 lines 737 B
{"version":3,"file":"useOption.mjs","sources":["../../../../../../packages/components/select-v2/src/useOption.ts"],"sourcesContent":["import type { IOptionProps } from './token'\n\nexport function useOption(props: IOptionProps, { emit }) {\n return {\n hoverItem: () => {\n if (!props.disabled) {\n emit('hover', props.index)\n }\n },\n selectOptionClick: () => {\n if (!props.disabled) {\n emit('select', props.item, props.index)\n }\n },\n }\n}\n"],"names":[],"mappings":"mBAE0B,OAAqB,EAAE,QAAQ;AACvD,SAAO;AAAA,IACL,WAAW,MAAM;AACf,UAAI,CAAC,MAAM,UAAU;AACnB,aAAK,SAAS,MAAM;AAAA;AAAA;AAAA,IAGxB,mBAAmB,MAAM;AACvB,UAAI,CAAC,MAAM,UAAU;AACnB,aAAK,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;;;;"}