url末尾加不加’/'的区别
假如不再url末尾加’/’,那么当你改变url时,如使用router-link to 或者 router.push时,会自动将末尾的替换掉。
例:
// original: http://localhost:8080/index/921/1
<router-link to="blog-post.html">Read more</router-link>
// change: http://localhost:8080/index/921/blog-post.html
若有加/
// original: http://localhost:8080/index/921/1/
<router-link to="blog-post.html">Read more</router-link>
// change: http://localhost:8080/index/921/1/blog-post.html