summaryrefslogtreecommitdiff
path: root/src/RouterParamMixin.js
blob: 92b698d9089811c83f5a8db88852bd2f7a307201 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
export default {
  computed: {
    selectedActor: {
      get: function() {
        return this.$route.query.actor;
      },
      set: function(value) {
        const query = Object.assign({}, this.$route.query, { actor: value });
        this.$router.push({ query });
      },
    },
    selectedMode: {
      get: function() {
        return this.$route.query.mode;
      },
      set: function(value) {
        const query = Object.assign({}, this.$route.query, { mode: value });
        this.$router.push({ query });
      },
    },
  },
};