Link (链接)
样式化链接,经由注入的链接组件渲染(Nuxt 下为 NuxtLink)。
基础用法
颜色
外部链接
External.vue
属性
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| className | string | "" | |
| color | KunUIColor | "primary" | |
| href | string | — | |
| isShowAnchorIcon | boolean | false | |
| rel | string | undefined | `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. |
| size | KunUISize | "md" | |
| target | "_self" | "_blank" | "_parent" | "_top" | "_self" | |
| to | string | Record<string, string> | "" | |
| underline | "none" | "always" | "hover" | "always" |
插槽
| 插槽 | 作用域 |
|---|---|
| #default | — |
| #prefix | — |
| #suffix | — |