<!-- 中文用户请注意: 1. issue 只接受带重现的 bug 报告,请不要用来提问题!不符合要求的 issue 会被直接关闭。 2. 请尽量用英文描述你的 issue,这样能够让尽可能多的人帮到你。 Got a question? =============== The issue list of this repo is **exclusively** for bug reports and feature requests. For simple questions, please use the following resources: - Read the docs: https://vuejs.org/guide/ - Watch video tutorials: https://laracasts.com/series/learning-vue-step-by-step - Ask in the Gitter chat room: https://gitter.im/vuejs/vue - Ask on the forums: http://forum.vuejs.org/ - Look for/ask questions on stack overflow: https://stackoverflow.com/questions/ask?tags=vue.js Reporting a bug? ================ - Try to search for your issue, it may have already been answered or even fixed in the development branch. - Check if the issue is reproducible with the latest stable version of Vue. If you are using a pre-release, please indicate the specific version you are using. - It is **required** that you clearly describe the steps necessary to reproduce the issue you are running into. Issues with no clear repro steps will not be triaged. If an issue labeled "need repro" receives no further input from the issue author for more than 5 days, it will be closed. - It is recommended that you make a JSFiddle/JSBin/Codepen to demonstrate your issue. You could start with [this template](https://jsfiddle.net/9r6xhqbp/) that already includes the latest version of Vue and vue-router - For bugs that involves build setups, you can create a reproduction repository with steps in the README. - If your issue is resolved but still open, don’t hesitate to close it. In case you found a solution by yourself, it could be helpful to explain how you fixed it. Have a feature request? ======================= Remove the template from below and provide thoughtful commentary *and code samples* on what this feature means for your product. What will it allow you to do that you can't do today? How will it make current work-arounds straightforward? What potential bugs and edge cases does it help to avoid? etc. Please keep it product-centric. --> <!-- BUG REPORT TEMPLATE --> ### Vue.js / vue-router versions 2.2.4 / 2.3.0 ### Summary This is difficult to explain, but hopefully the steps below will help you see the issue. The `path` property of a generated `<router-link>` appears to be work fine the first time it is called. After visiting the generated link and returning to the page which generates the link, the `path` appears to be cached to the original generated link that you clicked on and does not accurately reflect the `params` being passed to it. ### Reproduction Link http://217.182.65.138:8080 Note: App is running in `yarn run dev` mode, so you can see the application source files through your browser dev tools. This may assist you with debugging the issue if necessary. ### Steps to reproduce * Visit Leaderboards page * Wait for table data to load * Once loaded, hover over each user to see that routes are correctly generated (/:username/:platform/overview) * Click one of the users to follow the link * Return to the Leaderboards page (you don't need to wait for the data on the new page to load) ### What is Expected? Once the table data on the Leaderboards page reloads, the links should still generate correctly. ### What is actually happening? Once the table data on the Leaderboards page reloads, all of the links point to the user you originally clicked on during the reproduction steps. The Chrome Vue dev tools plugin also shows the links with the correct `params` but the `path` appears to have been cached somehow to the user you originally clicked on. ### Notes I am not doing anything special for the links. The route is configured like this: ```javascript // Individual Player Stats { path: '/:username/:platform', name: 'stats', component: Stats, redirect: { name: 'stats.overview' }, meta: { breadcrumb: 'Stats' }, children: [ { path: 'overview', name: 'stats.overview', component: OverviewStats, meta: { breadcrumb: 'Overview' } }, { path: 'operators', name: 'stats.operators', component: OperatorStats, meta: { breadcrumb: 'Operators' } }, { path: 'rolling-data', name: 'stats.rolling-data', component: RollingDataStats, meta: { breadcrumb: 'Rolling Data' } } ] } ``` I generate the links to that page from the Leaderboards page through a `v-for` loop (where the data being looped through comes from an API call) like this: ```html <tr v-for="(player, i) in leaderboard" :key="player.ubisoft_id"> <td>{{ activeRecordsStart + i }}</td> <td> <router-link :to="{ name: 'stats.overview', params: { username: player.username, platform: player.platform } }"> {{ player.username }} </router-link> </td> <!-- etc --> </tr> ``` I believe this is a bug but it may be an issue with our setup. Any assistance with identifying the cause would be highly appreciated, even if it is not necessarily confirmed as a bug in the end.