vue中获取当前url路径,使用window.location.search取到空值

查找了location对象的属性

 

 但是比如:  http://localhost:8080/#/test?limitUserName=test&grade=0  像这种路径,取到的就是空值

因为查询字符串search只能在取到“?”后面和“#”之前的内容,如果“#”之前没有“?”search取值为空。

 

 

posted @ 2020-06-17 17:31  橙子不是orange  阅读(6277)  评论(0编辑  收藏  举报