2022-04-06 05:56:08 +00:00
|
|
|
<template>
|
|
|
|
<Alert icon="👉">
|
|
|
|
Read more in <Link :to="link" v-text="computedTitle" />.
|
|
|
|
</Alert>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { defineComponent } from '@nuxtjs/composition-api'
|
2022-04-09 09:25:13 +00:00
|
|
|
import createTitle from '~/utils/createTitle'
|
2022-04-06 05:56:08 +00:00
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
props: {
|
|
|
|
link: {
|
|
|
|
type: String,
|
|
|
|
required: true
|
|
|
|
},
|
|
|
|
title: {
|
|
|
|
type: String,
|
|
|
|
required: false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
computedTitle () {
|
|
|
|
// Guess title from link!
|
2022-04-09 09:25:13 +00:00
|
|
|
return createTitle(this.title, this.link)
|
2022-04-06 05:56:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
</script>
|