1.name params
2. path query
总结:
①无论使用name还是path跳转, 路由都会有 匹配到router.js文件中相应的path和 name
②使用name跳转, 并且携带参数, 这个参数不会再fullPath中显示, 通过this.$route.params获取该参数对象
③使用path跳转, 并且携带参数, 这个参数会拼接到fullpath中, 通过this.$route.query获取该对象参数
1.name params
2. path query
总结:
①无论使用name还是path跳转, 路由都会有 匹配到router.js文件中相应的path和 name
②使用name跳转, 并且携带参数, 这个参数不会再fullPath中显示, 通过this.$route.params获取该参数对象
③使用path跳转, 并且携带参数, 这个参数会拼接到fullpath中, 通过this.$route.query获取该对象参数