注意❗
需要注意
:route="{ path: childrenRoute.path, query: { id: childrenRoute.release_id } }"
传递的参数必须是完整参数,必须包含path或者nam,否则点击无响应。
使用el-menu菜单切换组件时,如果要携带参数,路由传参的方式是在el-menu-item中添加 :route去指定路由,包括参数:
<el-menu-item index="/signStudent"
:route="{name:'signStudent',query:{state:0}}">
<template slot="title">
<!--图标-->
<i class="el-icon-s-custom"></i>
<!--文本-->
<span>待审核项目成员</span>
</template>
</el-menu-item>
<!--二级菜单-->
<el-menu-item index="/projectStudent"
:route="{name:'projectStudent',query:{state:1}}">
<template slot="title">
<!--图标-->
<i class="el-icon-s-custom"></i>
<!--文本-->
<span>所有项目成员</span>
</template>
</el-menu-item>