-
Notifications
You must be signed in to change notification settings - Fork 82
/
NetPriceLink.vue
36 lines (35 loc) · 1.05 KB
/
NetPriceLink.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<template>
<v-btn
rounded
color="secondary"
target="_blank"
:href="$url('/school/transition/')"
@click="transitionOutboundLink($event, fixedUrl)"
v-if="url"
>
<v-icon small class="mx-1">fas fa-calculator</v-icon>
<span class="d-none d-sm-flex">Calculate your personal net price<v-icon
x-small
color="white"
class="pl-1 pb-1 align-self-end"
style=""
>
fas fa-external-link-alt
</v-icon></span>
<span class="d-block d-sm-none">Calculate net price</span>
</v-btn>
</template>
<script>
import AnalyticsEvents from "~/js/mixins/AnalyticsEvents.js"
export default {
mixins: [AnalyticsEvents],
props: ["url"],
computed: {
fixedUrl() {
if (this.url == "#") return false
else if (this.url.match(/^http/)) return this.url
else return "http://" + this.url
},
},
}
</script>