mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-15 01:41:20 +08:00
36 lines
659 B
Vue
36 lines
659 B
Vue
<script setup lang="ts">
|
|
import { useEditLink } from '../../composables/edit-link'
|
|
|
|
const { url, text } = useEditLink()
|
|
</script>
|
|
|
|
<template>
|
|
<div class="edit-link">
|
|
<a
|
|
v-if="url"
|
|
class="link text-sm"
|
|
:href="url"
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
>
|
|
{{ text }}
|
|
<ElIcon :size="16" style="vertical-align: text-top; line-height: 24px">
|
|
<i-ri-external-link-line />
|
|
</ElIcon>
|
|
</a>
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.link {
|
|
display: inline-block;
|
|
font-weight: 500;
|
|
color: var(--text-color-light);
|
|
}
|
|
|
|
.link:hover {
|
|
text-decoration: none;
|
|
color: var(--brand-color);
|
|
}
|
|
</style>
|