点击添加员工跳转到详情页
<el-button size="mini" type="primary" @click="$router.push('/employee/detail')">添加员工</el-button>
配置员工详情的路由信息
import layout from "@/layout";
export default {path: "/employee",component: layout,children: [{path: "",name: "employee",component: () => import("@/views/employee"),meta: {title: "员工",icon: "people",},},{path: "/employee/detail", // 员工详情的地址component: () => import("@/views/employee/detail.vue"),meta: {title: "员工详情", // 显示在导航的文本},hidden: true, // 表示隐藏在左侧菜单},],
};
跳转的详情页面 @/views/employee/detail.vue
<template><div>哈哈哈哈</div>
</template>