AgendaLink.vue 489 B

123456789101112131415161718192021222324252627
  1. <template>
  2. <nuxt-link :href="target" target="_blank">
  3. <slot />
  4. </nuxt-link>
  5. </template>
  6. <script setup lang="ts">
  7. import UrlUtils from "~/services/utils/urlUtils";
  8. const runtimeConfig = useRuntimeConfig();
  9. const props = defineProps({
  10. href: {
  11. type: String,
  12. required: true,
  13. },
  14. });
  15. const target = computed(() => {
  16. return UrlUtils.join(
  17. runtimeConfig.public.agendaBaseUrl as string,
  18. props.href as string,
  19. );
  20. });
  21. </script>
  22. <style scoped lang="scss"></style>