【发布时间】:2018-09-22 03:54:28
【问题描述】:
我在 Vue Js 中使用 routerLink 时遇到问题。它只显示 localhost:8080/#/purchase-orders。它应该是 localhost:8080/#/purchase-orders/2 因为我添加了 params 属性。我该如何解决这个问题?
<el-table-column
fixed="right"
property="action"
label="Action"
width="120">
<template slot-scope="scope">
<router-link :to="{ path: '', params: { id: 2 }}">
<el-button type="text" size="small">Detail</el-button>
</router-link>
<el-button type="text" size="small">Edit</el-button>
</template>
</el-table-column>
【问题讨论】:
标签: vue.js vuejs2 vue-router element-ui