10 lines
215 B
JavaScript
10 lines
215 B
JavaScript
export default {
|
|
methods: {
|
|
async replaceRoute(name, params = {}) {
|
|
if (this.$route.name !== name) {
|
|
return this.$router.replace({ name, params });
|
|
}
|
|
return undefined;
|
|
},
|
|
},
|
|
};
|