Markwon/docs/.vuepress/components/GithubIssue.vue
2018-08-21 19:02:20 +03:00

35 lines
669 B
Vue

<template>
<a :href="githubIssueHref" target="_blank" rel="noopener noreferrer">{{linkContent}}<OutboundLink/></a>
</template>
<script>
export default {
name: "GithubIssue",
props: {
id: {
required: true
},
displayName: { required: false },
user: {
default: "noties",
required: false
},
repo: {
default: "Markwon",
required: false
}
},
computed: {
githubIssueHref: function() {
return (
"https://github.com/" + this.user + "/" + this.repo + "/issues/" + this.id
);
},
linkContent: function() {
return this.displayName || "#" + this.id;
}
}
};
</script>