How does vue interpret different parameters according to the path of the jump rotor route?

as shown in figure

clipboard.png
router-link jumps to the sub-component. In fact, the four components are the same, and the page structure style is all the same, but the request interface is different, so you need to pass different parameters according to different paths. Please tell me how to pass the corresponding parameters to the sub-component (apiName) through router-view

.
Mar.06,2021

<router-link :to="{ name: 'ask', params: { ajaxUrl: XXXX}}">Ask</router-link>
It would be nice to have parameters directly in

params, and to get the target page with this.$route.params

.

official website document portal


https://router.vuejs.org/zh-c.
just use dynamic routing
then get the parameters in your corresponding and call different methods according to the parameters

Menu