Markwon/docs/.vuepress/components/GithubIssue.vue
2018-08-20 16:38:39 +03:00

35 lines
612 B
Vue

<template>
<a :href="githubIssueHref">{{linkContent}}</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>