<tbody v-if="ports.length > 0">
<tr v-for="item in ports" :key="item.name">
<td >
<router-link
:to="`/hosts/${item.host_id}/edit`"
>
<a class="btn-style">编辑</a>
</router-link>
</tr>
</tbody>
routes.js
const PLACEHOLDER = { template: "<div>PLACEHOLDER</div>" };
export default [
{
path: "/hosts/:host_id/edit",
component: () => PLACEHOLDER,
beforeEnter(to) {
location.href = to.path;
},
meta: {
breadcrumbs: [
{
text: "Host管理",
},
],
},
}
]