来自AngularJS,我觉得这在Vue中足够容易.JS2也是.但在Vue中,这似乎很难实现.
在AngularJS中,我可以做到$location.search('my_param', null);
,这将有效地把https://mydomain.io/#/?my_param=872136
变成https://mydomain.io/#/
.
In Vue I have tried this.$router.replace('my_param',null);
, but it will only do https://mydomain.io/#/?my_param=872136
-> https://mydomain.io/#/my_param
, leaving the empty my_param.
Vuejs2中是否有从Url中删除查询参数的方法?我应该求助于普通JS来实现这一点吗?