|
|
|
@ -2,14 +2,16 @@
|
|
|
|
import { computed } from 'vue'
|
|
|
|
import { computed } from 'vue'
|
|
|
|
import { isLinkExternal, normalizeLink } from '../support/utils'
|
|
|
|
import { isLinkExternal, normalizeLink } from '../support/utils'
|
|
|
|
|
|
|
|
|
|
|
|
const props = defineProps<{
|
|
|
|
const props = withDefaults(defineProps<{
|
|
|
|
tag?: string
|
|
|
|
tag?: string
|
|
|
|
href?: string
|
|
|
|
href?: string
|
|
|
|
noIcon?: boolean
|
|
|
|
noIcon?: boolean
|
|
|
|
external?: boolean
|
|
|
|
external?: boolean
|
|
|
|
target?: string
|
|
|
|
target?: string
|
|
|
|
rel?: string
|
|
|
|
rel?: string
|
|
|
|
}>()
|
|
|
|
}>(), {
|
|
|
|
|
|
|
|
external: undefined,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
const tag = computed(() => props.tag ?? (props.href ? 'a' : 'span'))
|
|
|
|
const tag = computed(() => props.tag ?? (props.href ? 'a' : 'span'))
|
|
|
|
const isExternal = computed(() =>
|
|
|
|
const isExternal = computed(() =>
|
|
|
|
|