cluster-view: prevent route change refresh
Signed-off-by: Varun Patil <radialapps@gmail.com>pull/888/head
parent
8588a7d190
commit
c6358ff644
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
|
import type { Route } from 'vue-router';
|
||||||
|
|
||||||
import UserConfig from '../mixins/UserConfig';
|
import UserConfig from '../mixins/UserConfig';
|
||||||
import TopMatter from './top-matter/TopMatter.vue';
|
import TopMatter from './top-matter/TopMatter.vue';
|
||||||
|
@ -82,7 +83,8 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
async $route() {
|
async $route(to: Route, from: Route) {
|
||||||
|
if (to.path === from.path) return;
|
||||||
this.refresh();
|
this.refresh();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue