2.2 KiB
2.2 KiB
Link
Demos
API
Props
Name | Type | Default | Description |
---|---|---|---|
ui |
string= |
- | [^ui] |
to |
`string | Object` | - |
rel |
string |
- | Specifies the relationship of the target object to the link object. Refer to MDN for more details. |
target |
string |
- | [^target] |
native |
boolean |
false |
Whether to enforce the use of native <a> element (instead of <router-link> ). |
fallback |
string |
'span' |
Specifies the fallback element type when no to prop is specified. |
disabled |
boolean= |
false |
Whether the link is disabled. |
^^^ui Style variants.
+++Enum values
Value | Description |
---|---|
strong |
Strong style. |
s |
Small. |
m |
Medium. |
+++ | |
^^^ |
^^^target Specifies where to display the linked content. Refer to MDN for more details.
:::tip
When target
has a value of _blank
, a noopener
token will be automatically added into rel
(if not already exist) to enhance safety for free.
:::
^^^
Slots
Name | Description |
---|---|
default |
The content of the link. |
Events
Name | Description |
---|---|
click |
Triggered upon clicks when the to prop is falsy or the native prop is true . The callback parameter list is (event) , where the type of event is HTML's native Event . |
Configs
Key | Type | Default | Description |
---|---|---|---|
link.routerLink |
string |
router-link |
The name of the link component used in route mode so that you can replace the default one with a Vue Router-compatible implementation in environments such as Nuxt.js. |