element-plus/docs/.vitepress/vitepress/components/doc-content/vp-edit-link.vue
云游君 2caac7906e
refactor(docs): adjust style details & fix pages width (#6624)
* refactor(docs): adjust style details

* refactor(docs): add toc width

* refactor(docs): remove unused var

* fix(docs): typography & button etc pages width unify
2022-03-14 23:41:39 +08:00

35 lines
625 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;
}
.link:hover {
text-decoration: none;
color: var(--brand-color);
}
</style>