lenve / vhr

微人事是一个前后端分离的人力资源管理系统,项目采用SpringBoot+Vue开发。
http://vhr.javaboy.org
27.29k stars 10.29k forks source link

请教Home.vue导航的问题 #119

Closed MrEastWood closed 5 years ago

MrEastWood commented 5 years ago

看代码中,导航子项的的代码如下:

<el-menu-item width="180px"
                                style="padding-left: 30px;padding-right:0px;margin-left: 0px;width: 170px;text-align: left"
                                v-for="child in item.children"
                                :index="child.path"
                                :key="child.path">{{child.name}}
                  </el-menu-item>

也就是说,导航的地址是 child的path字段。 看返回的导航json数据,员工资料->基本资料的path为/emp/basic

"children": [{
        "id": null,
        "path": "/emp/basic",
        "component": "EmpBasic",
        "name": "基本资料",
        "iconCls": null,
        "children": [],
        "meta": {"keepAlive": false, "requireAuth": true}
    }]

请问/emp/basic 是怎么关联上EmpBasic.vue的?全局搜索/emp/basic,搜索不到对应的关联关系。

lenve commented 5 years ago

https://github.com/lenve/vhr/blob/master/vuehr/src/utils/utils.js#L44-L55