mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-16 19:04:48 +00:00
30 lines
542 B
Vue
30 lines
542 B
Vue
<template>
|
|
<Alert icon="👉">
|
|
Read more in <Link :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 () {
|
|
// Guess title from link!
|
|
return createTitle(this.title, this.link)
|
|
}
|
|
}
|
|
})
|
|
</script>
|