当我们想要继续保持在该页面时,并且要清空地址栏参数。
方法一:
let path = this.$route.path; //先获取路由路径
this.$router.push(path); //再跳转路由路径,query参数没带过去,所以被清除了
方法二:
this.$router.push({ query: {} });
参考原文:https://blog.csdn.net/lihefei_coder/article/details/105410470
当我们想要继续保持在该页面时,并且要清空地址栏参数。
方法一:
let path = this.$route.path; //先获取路由路径
this.$router.push(path); //再跳转路由路径,query参数没带过去,所以被清除了
方法二:
this.$router.push({ query: {} });
参考原文:https://blog.csdn.net/lihefei_coder/article/details/105410470