1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-28 05:15:54 +00:00
FrankerFaceZ/src/std-components/react-link.vue

23 lines
350 B
Vue
Raw Normal View History

<template>
<a :href="href" @click="onClick($event)">
<slot />
</a>
</template>
<script>
export default {
props: ['href', 'click', 'state'],
methods: {
onClick(event) {
this.$emit('click', event);
if ( ! event.defaultPrevented && ! this.href.includes('//') )
this.reactNavigate(this.href, event, this.state);
}
}
}
</script>