recent project 0.1

This commit is contained in:
Captain.B 2020-02-20 19:55:36 +08:00
parent 0fb744a8a2
commit d695bb15f4
2 changed files with 49 additions and 6 deletions

View File

@ -4,16 +4,12 @@
<el-menu-item index="1"><a href="/" style="text-decoration: none;">{{ $t("i18n.home") }}</a></el-menu-item> <el-menu-item index="1"><a href="/" style="text-decoration: none;">{{ $t("i18n.home") }}</a></el-menu-item>
<el-submenu index="3" popper-class="submenu" v-permission="['test_manager']"> <el-submenu index="3" popper-class="submenu" v-permission="['test_manager']">
<template slot="title">项目</template> <template slot="title">项目</template>
<el-menu-item index="3-1">项目1</el-menu-item> <recent-project/>
<el-menu-item index="3-2">项目2</el-menu-item>
<el-divider/> <el-divider/>
<el-menu-item index="/project"> <el-menu-item index="/project">
<font-awesome-icon :icon="['fa', 'list-ul']"/> <font-awesome-icon :icon="['fa', 'list-ul']"/>
<span style="padding-left: 5px;">显示全部</span> <span style="padding-left: 5px;">显示全部</span>
</el-menu-item> </el-menu-item>
<el-menu-item index="/createProject">
<el-button type="text">创建项目</el-button>
</el-menu-item>
</el-submenu> </el-submenu>
<el-submenu index="4" popper-class="submenu" v-permission="['test_manager', 'test_user']"> <el-submenu index="4" popper-class="submenu" v-permission="['test_manager', 'test_user']">
<template slot="title">测试</template> <template slot="title">测试</template>
@ -38,10 +34,11 @@
<script> <script>
import RecentTestPlan from "./testPlan/RecentTestPlan"; import RecentTestPlan from "./testPlan/RecentTestPlan";
import RecentProject from "./project/RecentProject";
export default { export default {
name: "MsMenus", name: "MsMenus",
components: {RecentTestPlan} components: {RecentTestPlan, RecentProject}
} }
</script> </script>

View File

@ -0,0 +1,46 @@
<template>
<div>
<div class="recent-text">
<i class="el-icon-time"/>
最近的项目
</div>
<el-menu-item v-bind:key="recentTestPlan.id" v-for="recentTestPlan in recentTestPlans">
{{ recentTestPlan.name }}
</el-menu-item>
</div>
</template>
<script>
export default {
name: "RecentProject",
data() {
return {
recentTestPlans: [
{
id: 1,
name: "项目1"
},
{
id: 2,
name: "项目2"
},
{
id: 3,
name: "项目3"
},
{
id: 4,
name: "项目4"
}
]
}
}
}
</script>
<style scoped>
.recent-text {
padding-left: 10%;
color: #777777;
}
</style>