globalComponents.ts 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import CommonAlert from '#shared/components/CommonAlert/CommonAlert.vue'
  3. import CommonBadge from '#shared/components/CommonBadge/CommonBadge.vue'
  4. import CommonDateTime from '#shared/components/CommonDateTime/CommonDateTime.vue'
  5. import CommonIcon from '#shared/components/CommonIcon/CommonIcon.vue'
  6. import CommonLabel from '#shared/components/CommonLabel/CommonLabel.vue'
  7. import CommonLink from '#shared/components/CommonLink/CommonLink.vue'
  8. import type { FormKit } from '@formkit/vue'
  9. import type { App } from 'vue'
  10. import type { RouterLink, RouterView } from 'vue-router'
  11. declare module '@vue/runtime-core' {
  12. export interface GlobalComponents {
  13. CommonAlert: typeof CommonAlert
  14. CommonIcon: typeof CommonIcon
  15. CommonLink: typeof CommonLink
  16. CommonDateTime: typeof CommonDateTime
  17. CommonBadge: typeof CommonBadge
  18. CommonLabel: typeof CommonLabel
  19. FormKit: typeof FormKit
  20. RouterView: typeof RouterView
  21. RouterLink: typeof RouterLink
  22. }
  23. }
  24. export default function initializeGlobalComponents(app: App): void {
  25. app.component('CommonAlert', CommonAlert)
  26. app.component('CommonIcon', CommonIcon)
  27. app.component('CommonLink', CommonLink)
  28. app.component('CommonDateTime', CommonDateTime)
  29. app.component('CommonLabel', CommonLabel)
  30. app.component('CommonBadge', CommonBadge)
  31. }