mirror of
https://github.com/aelve/guide.git
synced 2024-12-25 05:43:32 +03:00
23 lines
466 B
Vue
23 lines
466 B
Vue
<template>
|
|
<a
|
|
class="link"
|
|
:target="openInNewTab ? '_blank': ''"
|
|
:rel="openInNewTab ? 'noopener noreferrer': ''"
|
|
:href="url"
|
|
v-on="$listeners"
|
|
>
|
|
<slot />
|
|
</a>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import Vue from 'vue'
|
|
import Component from 'vue-class-component'
|
|
import { Prop } from 'vue-property-decorator'
|
|
|
|
@Component
|
|
export default class ALink extends Vue {
|
|
@Prop(Boolean) openInNewTab!: boolean
|
|
@Prop(String) url!: string
|
|
}
|
|
</script> |