Files
dragonroll/frontend/app/components/viewer/widgets/link/NoteLink.vue
2026-05-09 20:40:27 +02:00

25 lines
527 B
Vue

<script setup>
import { computed } from 'vue'
import { PushNote, GetNoteByName } from '~/services/Content';
const props = defineProps(['content'])
const parts = computed(() => props.content?.split('|') ?? [])
const href = computed(() => parts.value[0] || '')
const text = computed(() => parts.value[1] || parts.value[0] || '')
function handleClick() {
// your custom logic here
PushNote(GetNoteByName(href.value));
}
</script>
<template>
<a href="#" @click.prevent="handleClick">
{{ text }}
</a>
</template>