mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-23 10:58:13 +08:00
feat(theme): add target/rel props support for LinkCard (#556)
This commit is contained in:
parent
97f046015c
commit
a0de3c660a
@ -17,6 +17,7 @@ permalink: /guide/components/link-card/
|
||||
| icon | `string \| { svg: string }` | `''` | 显示在标题左侧的图标,支持 iconify 所有图标,也可以使用 图片链接 |
|
||||
| href | `string` | `''` | 链接 |
|
||||
| description | `string` | `''` | 详情 |
|
||||
| target | `string` | `''` | 链接打开方式 |
|
||||
|
||||
## 插槽
|
||||
|
||||
|
||||
@ -7,13 +7,15 @@ defineProps<{
|
||||
title?: string
|
||||
icon?: string | { svg: string }
|
||||
description?: string
|
||||
target?: string
|
||||
rel?: string
|
||||
}>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="vp-link-card">
|
||||
<span class="body">
|
||||
<VPLink :href="href" no-icon class="link no-icon">
|
||||
<VPLink :href="href" no-icon class="link no-icon" v-bind="{ target, rel }">
|
||||
<slot name="title">
|
||||
<VPIcon v-if="icon" :name="icon" />
|
||||
<span v-if="title" v-html="title" />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user