provides.ts 568 B

123456789101112131415161718192021222324252627282930
  1. import { ref } from 'vue'
  2. import { vi } from 'vitest'
  3. export const genTooltipProvides = () => {
  4. const onOpen = vi.fn()
  5. const onClose = vi.fn()
  6. const onToggle = vi.fn()
  7. const onShow = vi.fn()
  8. const onHide = vi.fn()
  9. const onBeforeShow = vi.fn()
  10. const onBeforeHide = vi.fn()
  11. const id = ref('test_id')
  12. const open = ref(false)
  13. const controlled = ref(false)
  14. const trigger = ref('hover')
  15. return {
  16. onToggle,
  17. onOpen,
  18. onClose,
  19. onShow,
  20. onHide,
  21. onBeforeShow,
  22. onBeforeHide,
  23. id,
  24. open,
  25. controlled,
  26. trigger,
  27. }
  28. }