在练习vue + vue router + element ui 时,做了个侧边栏(aside :router=true),但在点击选项时,发现第一次正常,但点击多次时,地址栏不断增加重复,就无法正常浏览了。

后来发现是路径写成了相对路径

这时,只需要在相对路径最前面加上“/”就成功解决了。

在练习vue + vue router + element ui 时,做了个侧边栏(aside :router=true),但在点击选项时,发现第一次正常,但点击多次时,地址栏不断增加重复,就无法正常浏览了。
后来发现是路径写成了相对路径
这时,只需要在相对路径最前面加上“/”就成功解决了。
本文标题:Vue Router相对路径重复点击问题
本文链接:https://www.haomeiwen.com/subject/blpomctx.html
网友评论