|
|
@ -19,7 +19,11 @@ const isExternal = computed(() => props.href && EXTERNAL_URL_RE.test(props.href)
|
|
|
|
<component
|
|
|
|
<component
|
|
|
|
:is="tag"
|
|
|
|
:is="tag"
|
|
|
|
class="VPLink"
|
|
|
|
class="VPLink"
|
|
|
|
:class="{ link: href, 'vp-external-link-icon': isExternal && !noIcon }"
|
|
|
|
:class="{
|
|
|
|
|
|
|
|
link: href,
|
|
|
|
|
|
|
|
'vp-external-link-icon': isExternal,
|
|
|
|
|
|
|
|
'no-icon': noIcon
|
|
|
|
|
|
|
|
}"
|
|
|
|
:href="href ? normalizeLink(href) : undefined"
|
|
|
|
:href="href ? normalizeLink(href) : undefined"
|
|
|
|
:target="target || (isExternal ? '_blank' : undefined)"
|
|
|
|
:target="target || (isExternal ? '_blank' : undefined)"
|
|
|
|
:rel="rel || (isExternal ? 'noreferrer' : undefined)"
|
|
|
|
:rel="rel || (isExternal ? 'noreferrer' : undefined)"
|
|
|
|