useOption.mjs 344 B

1234567891011121314151617
  1. function useOption(props, { emit }) {
  2. return {
  3. hoverItem: () => {
  4. if (!props.disabled) {
  5. emit("hover", props.index);
  6. }
  7. },
  8. selectOptionClick: () => {
  9. if (!props.disabled) {
  10. emit("select", props.item, props.index);
  11. }
  12. }
  13. };
  14. }
  15. export { useOption };
  16. //# sourceMappingURL=useOption.mjs.map