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 link?: string
linkText?: string linkText?: string
rel?: string rel?: string
target?: string
}>() }>()
</script> </script>
<template> <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"> <article class="box">
<VPImage <VPImage
v-if="typeof icon === 'object'" v-if="typeof icon === 'object'"

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

Loading…
Cancel
Save