Skip to content

Commit

Permalink
feat(theme): allow setting target in home features (#2897)
Browse files Browse the repository at this point in the history
  • Loading branch information
szchixy committed Sep 10, 2023
1 parent e544b41 commit cb49673
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/client/theme-default/components/VPFeature.vue
Expand Up @@ -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'"
Expand Down
2 changes: 2 additions & 0 deletions src/client/theme-default/components/VPFeatures.vue
Expand Up @@ -10,6 +10,7 @@ export interface Feature {
link?: string
linkText?: string
rel?: string
target?: string
}
const props = defineProps<{
Expand Down Expand Up @@ -50,6 +51,7 @@ const grid = computed(() => {
:link="feature.link"
:link-text="feature.linkText"
:rel="feature.rel"
:target="feature.target"
/>
</div>
</div>
Expand Down

0 comments on commit cb49673

Please sign in to comment.