fix: 调整菜单权限按钮

This commit is contained in:
lilinyuan
2024-04-01 15:02:09 +08:00
parent 39bc3011dd
commit b5acea2e47
2 changed files with 10 additions and 12 deletions

View File

@@ -16,7 +16,7 @@
</el-form-item>
</el-form>
<div class="table-header-btn">
<el-button type="primary" @click="handleAdd" :icon="Plus">新增</el-button>
<el-button type="primary" @click="handleAdd" :icon="Plus" v-perm="['admin:menu:add']">新增</el-button>
<el-button type="info" @click="handleExpand" :icon="Sort">{{ isExpand ? '全部收起' : '全部展开' }}</el-button>
</div>
@@ -42,15 +42,13 @@
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建时间"/>
<el-table-column label="操作" prop="operation">
<el-table-column label="操作" prop="operation" align="right">
<template #default="scope">
<el-button type="primary" v-if="scope.row.menuType!=='B'" size="mini" @click="handleAdd(scope.row)" link>新增
<el-button type="primary" size="mini" @click="handleAdd(scope.row)" link v-perm="['admin:menu:add']">新增
</el-button>
<div v-else style="display: inline-block">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</div>
<el-button type="primary" size="mini" @click="handleEdit(scope.row.menuId)" link>修改</el-button>
<el-button type="primary" size="mini" @click="handleAssignRoles(scope.row)" link>分配角色</el-button>
<popover-delete :name="scope.row.menuName" :type="'菜单'" @delete="handleDel(scope.row.menuId)"/>
<el-button type="primary" size="mini" @click="handleEdit(scope.row.menuId)" link v-perm="['admin:menu:edit']">修改</el-button>
<!-- <el-button type="primary" size="mini" @click="handleAssignRoles(scope.row)" link>分配角色</el-button> -->
<popover-delete :name="scope.row.menuName" :type="'菜单'" @delete="handleDel(scope.row.menuId)" :perm="['admin:menu:del']" />
</template>
</el-table-column>
</el-table>