我有一个下面的配置,如果页面跳转,那么path这里就会传入一个true过去。{ icon: 'ios-barcode', size: '30', color: '#ff9900', path: '/home/aftersale_physicalserver_workpanel/true', name: '已使用' + ' (' + used_count + ') ', // 已使用的实体服务器
},我的问题是,这里只能传入一个参数。这样的配置vue-router如何传递多个参数?编辑1我在模板中使用的时候,是这样的,router-link的跳转: <router-link :to="item.path">
<span class="icon">
<Icon :type="item.icon" :size='item.size' :color='item.color'></Icon>
</span>
<div class="icon-title">
<h3>{{item.name}}</h3>
</div>
</router-link>
1 回答
![?](http://img1.sycdn.imooc.com/5458471300017f3702200220-100-100.jpg)
慕田峪9158850
TA贡献1794条经验 获得超7个赞
想要传输多个参数建议使用编程式的导航
比如我想跳转到详情页,传输no和name两个参数
this.$router.push({ path: '/index/detail', query: { no: "10001",name:"xiaoming" } })
添加回答
举报
0/150
提交
取消