This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Zaimki/components/ProfileLink.vue

34 lines
687 B
Vue
Raw Normal View History

<template>
<span>
2021-06-27 03:16:14 -07:00
<Icon :v="niceLink.icon" :set="niceLink.iconSet || 'l'"/>
2021-01-21 12:04:56 -08:00
<a :href="linkTrimmed" target="_blank" rel="noopener">
2021-06-27 03:16:14 -07:00
{{niceLink.text}}
</a>
</span>
</template>
<script>
2021-06-27 03:16:14 -07:00
import link from '../plugins/link';
export default {
2021-06-27 03:16:14 -07:00
mixins: [link],
props: {
link: { required: true },
},
computed: {
2021-01-21 12:04:56 -08:00
linkTrimmed() {
return this.link.trim();
},
2021-06-27 03:16:14 -07:00
niceLink() {
return this.beautifyLink(this.linkTrimmed);
},
}
};
</script>
<style lang="scss" scoped>
.icon {
height: 1em;
}
</style>