1
1
mirror of https://github.com/aelve/guide.git synced 2024-12-26 22:34:42 +03:00
guide/front/client/components/ALink.vue
2018-09-13 23:26:52 +03:00

31 lines
514 B
Vue

<template>
<a
class="link"
:target="openInNewTab ? '_blank': ''"
:rel="openInNewTab ? 'noopener noreferrer': ''"
:href="url"
>
<slot />
</a>
</template>
<script lang="ts">
import { Prop, Component, Vue } from 'vue-property-decorator'
@Component
export default class ALink extends Vue {
@Prop(Boolean) openInNewTab!: boolean
@Prop(String) url!: string
}
</script>
<style scoped>
.link {
text-decoration-line: none;
}
.link:hover {
text-decoration-line: underline;
}
</style>