From 5627d9faee53feb69209a6c83ffdd86ab7fdd794 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Volds=C3=A6ter?= <ole.voldsater@uib.no> Date: Fri, 15 Jan 2021 10:51:30 +0100 Subject: [PATCH] fikset linker til underartikler --- src/components/SubArticle.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/SubArticle.vue b/src/components/SubArticle.vue index 68c4261..af1bb69 100644 --- a/src/components/SubArticle.vue +++ b/src/components/SubArticle.vue @@ -1,7 +1,7 @@ <template> <li class="sub_article"> <span class="sub_article_header"> - <router-link :to="'./' + body.article_id" @click.native="article_link_click(body)"> + <router-link :to="link_prefix + body.article_id" @click.native="article_link_click(body)"> {{body.lemmas[0]}} </router-link> </span> @@ -23,6 +23,11 @@ export default { components: { DefElement }, + computed: { + link_prefix: function() { + return this.$route.params.lemma ? '../' : './' + } + }, beforeCreate: function () { this.$options.components.Definition = require('./Definition.vue').default }, -- GitLab