feat(theme): allow setting target in home features (#2897)

pull/2937/head
szchixy 1 year ago committed by GitHub
parent e544b411d9
commit cb4967313e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -11,11 +11,19 @@ defineProps<{
link?: string
linkText?: string
rel?: string
target?: string
}>()
</script>
<template>
<VPLink class="VPFeature" :href="link" :rel="rel" :no-icon="true" :tag="link ? 'a' : 'div'">
<VPLink
class="VPFeature"
:href="link"
:rel="rel"
:target="target"
:no-icon="true"
:tag="link ? 'a' : 'div'"
>
<article class="box">
<VPImage
v-if="typeof icon === 'object'"

@ -10,6 +10,7 @@ export interface Feature {
link?: string
linkText?: string
rel?: string
target?: string
}
const props = defineProps<{
@ -50,6 +51,7 @@ const grid = computed(() => {
:link="feature.link"
:link-text="feature.linkText"
:rel="feature.rel"
:target="feature.target"
/>
</div>
</div>

Loading…
Cancel
Save