Skip to content

Commit

Permalink
fix(link): demo slot usage
Browse files Browse the repository at this point in the history
  • Loading branch information
liweijie0812 committed Jul 19, 2024
1 parent 794ee07 commit c3863b1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
4 changes: 3 additions & 1 deletion src/link/_example-ts/disabled.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
<t-link theme="danger" hover="color" disabled @click="clickLink"> 跳转链接 </t-link>
<t-link theme="warning" hover="underline" disabled :on-click="clickLink"> 跳转链接 </t-link>
<t-link theme="success" disabled @click="clickLink">
<jump-icon slot="suffixIcon" />
<template #suffixIcon>
<jump-icon />
</template>
跳转链接
</t-link>
</t-space>
Expand Down
8 changes: 6 additions & 2 deletions src/link/_example-ts/icon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
<t-space>
<t-link theme="default" :prefix-icon="renderPrefixIcon" :on-click="clickLink"> 跳转链接 </t-link>
<t-link theme="primary" underline href="https://tdesign.tencent.com/" target="_self">
<link-icon slot="prefix-icon"></link-icon>
<template #prefix-icon>
<link-icon />
</template>
跳转链接
</t-link>
<t-link theme="danger" hover="color" href="https://tdesign.tencent.com/" target="_blank" @click="clickLink">
<jump-icon slot="suffixIcon" />
<template #suffix-icon>
<jump-icon />
</template>
跳转链接
</t-link>
<t-link theme="warning" :suffix-icon="renderSuffixIcon" disabled> 跳转链接 </t-link>
Expand Down
4 changes: 3 additions & 1 deletion src/link/_example/disabled.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
<t-link theme="danger" hover="color" disabled @click="clickLink"> 跳转链接 </t-link>
<t-link theme="warning" hover="underline" disabled :on-click="clickLink"> 跳转链接 </t-link>
<t-link theme="success" disabled @click="clickLink">
<jump-icon slot="suffixIcon" />
<template #suffixIcon>
<jump-icon />
</template>
跳转链接
</t-link>
</t-space>
Expand Down
8 changes: 6 additions & 2 deletions src/link/_example/icon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
<t-space>
<t-link theme="default" :prefix-icon="renderPrefixIcon" :on-click="clickLink"> 跳转链接 </t-link>
<t-link theme="primary" underline href="https://tdesign.tencent.com/" target="_self">
<link-icon slot="prefix-icon"></link-icon>
<template #prefix-icon>
<link-icon />
</template>
跳转链接
</t-link>
<t-link theme="danger" hover="color" href="https://tdesign.tencent.com/" target="_blank" @click="clickLink">
<jump-icon slot="suffixIcon" />
<template #suffix-icon>
<jump-icon />
</template>
跳转链接
</t-link>
<t-link theme="warning" :suffix-icon="renderSuffixIcon" disabled> 跳转链接 </t-link>
Expand Down

0 comments on commit c3863b1

Please sign in to comment.