useOption.js 431 B

123456789101112131415161718192021
  1. 'use strict';
  2. Object.defineProperty(exports, '__esModule', { value: true });
  3. function useOption(props, { emit }) {
  4. return {
  5. hoverItem: () => {
  6. if (!props.disabled) {
  7. emit("hover", props.index);
  8. }
  9. },
  10. selectOptionClick: () => {
  11. if (!props.disabled) {
  12. emit("select", props.item, props.index);
  13. }
  14. }
  15. };
  16. }
  17. exports.useOption = useOption;
  18. //# sourceMappingURL=useOption.js.map