如何通过 ? 发送路线道具

问题描述 投票:0回答:1
这是我的按钮如何链接到路线的

<router-link class="q-pa-md" :to="{ name: 'Edit'}" id="item.id"> <q-btn outline>Edit</q-btn> </router-link>

这是我的路由器定义:

{ path: 'cms/index/edit/:id', name: 'Edit', component: () => import('components/cms/Edit.vue'), props: true },

这里是链接到路线

[[Edit

javascript vue.js vuejs2 vue-router
1个回答
0
投票
:to="{ name: 'Edit', params: { id: item.id }}"
© www.soinside.com 2019 - 2024. All rights reserved.