Welcome to mirror list, hosted at ThFree Co, Russian Federation.

url_sync.vue « components « vue_shared « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 389d42f0829c1110196f1ed34104b7f406fe5c67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<script>
import { historyPushState } from '~/lib/utils/common_utils';
import { setUrlParams } from '~/lib/utils/url_utility';

export default {
  props: {
    query: {
      type: Object,
      required: true,
    },
  },
  watch: {
    query: {
      immediate: true,
      deep: true,
      handler(newQuery) {
        historyPushState(setUrlParams(newQuery, window.location.href, true));
      },
    },
  },
  render() {
    return this.$slots.default;
  },
};
</script>