From ec8b0c51f872d2972a3deb6d6a836b9d9fd30141 Mon Sep 17 00:00:00 2001
From: schneefux <schneefux+commit@schneefux.xyz>
Date: Mon, 21 May 2018 15:55:52 +0200
Subject: Move query get/set into mixin

---
 src/ReportTable.vue | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

(limited to 'src/ReportTable.vue')

diff --git a/src/ReportTable.vue b/src/ReportTable.vue
index ea7f978..ed099c2 100644
--- a/src/ReportTable.vue
+++ b/src/ReportTable.vue
@@ -67,10 +67,12 @@
 <script>
 import Vue from 'vue';
 import HeroImage from './HeroImage.vue';
+import RouterParamMixin from './RouterParamMixin.js';
 import * as maps from './maps/maps';
 
 export default Vue.component('report-table', {
   props: [ 'reportService' ],
+  mixins: [ RouterParamMixin ],
   data: function() {
     return {
       getTalentName: maps.getTalentName,
@@ -79,11 +81,6 @@ export default Vue.component('report-table', {
     };
   },
   computed: {
-    selectedMode: {
-      get: function() {
-        return this.$route.query.mode;
-      },
-    },
     report: function() {
       return this.reportService.getReport(this.selectedMode);
     },
-- 
cgit v1.3.1

