Link (链接)

样式化链接,经由注入的链接组件渲染(Nuxt 下为 NuxtLink)。

基础用法

Basic.vue

颜色

Colors.vue

外部链接

External.vue

属性

属性类型默认值说明
classNamestring""
colorKunUIColor"primary"
hrefstring
isShowAnchorIconbooleanfalse
relstringundefined`rel` for the rendered link. Replaces the default rather than adding to it, matching NuxtLink: with `target="_blank"` and no `rel`, KunUI emits `noopener noreferrer`; passing `rel="noopener"` emits exactly that, which is how you keep the `Referer` header (analytics on the other side count the visit as a referral instead of direct traffic). `noopener` is still added back to any `_blank` link unless the value contains the spec's `opener` token; `rel=""` removes the attribute entirely.
sizeKunUISize"md"
target"_self" | "_blank" | "_parent" | "_top""_self"
tostring | Record<string, string>""
underline"none" | "always" | "hover""always"

插槽

插槽作用域
#default
#prefix
#suffix