Nuxt/docs/components/atoms/LinkExample.vue

29 lines
544 B
Vue
Raw Normal View History

2022-04-09 09:25:13 +00:00
<template>
<Alert type="info" icon="🔎">
Read and edit a live example in <NuxtLink :to="link" v-text="computedTitle" />
</Alert>
</template>
<script>
import { defineComponent } from '@nuxtjs/composition-api'
import createTitle from '~/utils/createTitle'
export default defineComponent({
props: {
link: {
type: String,
required: true
},
title: {
type: String,
required: false
}
},
computed: {
computedTitle () {
return createTitle(this.title, this.link)
}
}
})
</script>