header v-permission

This commit is contained in:
Captain.B 2020-02-19 15:02:46 +08:00
parent 40c8b42834
commit d3957e929e
2 changed files with 5 additions and 5 deletions

View File

@ -2,13 +2,13 @@
<el-menu class="header-menu" :unique-opened="true" mode="horizontal" router
menu-trigger="click">
<el-menu-item index="1"><a href="/" style="text-decoration: none;">{{ $t("i18n.home") }}</a></el-menu-item>
<el-submenu index="2" popper-class="submenu">
<el-submenu index="2" popper-class="submenu" v-permission="['org_admin']">
<template slot="title">工作空间</template>
<el-menu-item index="2-1">工作空间1</el-menu-item>
<el-menu-item index="2-2">工作空间2</el-menu-item>
<el-menu-item index="2-3">显示全部</el-menu-item>
</el-submenu>
<el-submenu index="3" popper-class="submenu">
<el-submenu index="3" popper-class="submenu" v-permission="['test_manager']">
<template slot="title">项目</template>
<el-menu-item index="3-1">项目1</el-menu-item>
<el-menu-item index="3-2">项目2</el-menu-item>
@ -21,7 +21,7 @@
<el-button type="text">创建项目</el-button>
</el-menu-item>
</el-submenu>
<el-submenu index="4" popper-class="submenu">
<el-submenu index="4" popper-class="submenu" v-permission="['test_manager', 'test_user']">
<template slot="title">测试</template>
<recent-test-plan/>
<el-divider/>
@ -33,7 +33,7 @@
<el-button type="text">创建测试</el-button>
</el-menu-item>
</el-submenu>
<el-submenu index="5" popper-class="submenu">
<el-submenu index="5" popper-class="submenu" v-permission="['test_manager', 'test_user', 'test_viewer']">
<template slot="title">报告</template>
<el-menu-item index="5-1">报告1</el-menu-item>
<el-menu-item index="5-2">报告2</el-menu-item>

View File

@ -14,7 +14,7 @@
</span>
</el-row>
</div>
<el-table :data="items" style="width: 100%" v-loading="loading">
<el-table :data="items" style="width: 100%">
<el-table-column prop="name" label="名称"/>
<el-table-column prop="description" label="描述"/>
<el-table-column>