From 1819c0ba654be872a0bb0e675af2f9cdf6906d4b Mon Sep 17 00:00:00 2001 From: Valentin Kaelin Date: Sat, 25 Jan 2020 13:59:39 +0100 Subject: [PATCH] fix: manually add active style on vue router links --- client/src/layouts/Default.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/client/src/layouts/Default.vue b/client/src/layouts/Default.vue index 72d9fd7..2701105 100644 --- a/client/src/layouts/Default.vue +++ b/client/src/layouts/Default.vue @@ -65,21 +65,25 @@ overview champions records live game @@ -159,6 +163,11 @@ export default { apiCall() { this.basicRequest({ summoner: this.summoner, region: this.region }) }, + isRouteActive(currentRoute) { + return { + 'router-link-active': this.$route.name === currentRoute + } + }, redirect(summoner, region) { this.$router.push(`/summoner/${region}/${summoner}`) },