This commit is contained in:
lzc 2025-04-03 17:20:52 +08:00
commit 3e683f11f3
3 changed files with 8 additions and 3 deletions

View File

@ -1,7 +1,11 @@
<template> <template>
<el-dropdown popper-class="custom-table-operate"> <el-dropdown popper-class="custom-table-operate">
<el-icon class="custom-table-operate__more"><More /></el-icon> <el-icon class="custom-table-operate__more">
<template #dropdown> <template v-if="show">
<More />
</template>
</el-icon>
<template v-if="show" #dropdown>
<el-dropdown-menu v-if="!isEmpty(actions)"> <el-dropdown-menu v-if="!isEmpty(actions)">
<template v-for="item in actions" :key="item.name"> <template v-for="item in actions" :key="item.name">
<el-dropdown-item v-if="onPermission(item)" @click="item.event(data)"> <el-dropdown-item v-if="onPermission(item)" @click="item.event(data)">
@ -20,6 +24,7 @@ import { isEmpty } from '@/utils';
const props = defineProps({ const props = defineProps({
actions: { type: Array, default: () => [] }, actions: { type: Array, default: () => [] },
data: { type: Object, default: () => {} }, data: { type: Object, default: () => {} },
show: { type: Boolean, default: true },
}); });
const onPermission = (row) => { const onPermission = (row) => {

View File

@ -47,7 +47,6 @@ export function GetMenu(dictType) {
} }
// 查询菜单下拉树结构 // 查询菜单下拉树结构
// 返回parentId
export function GetMenuTree() { export function GetMenuTree() {
return request('/system/menu/treeselect', { return request('/system/menu/treeselect', {
method: 'GET', method: 'GET',

View File

@ -31,6 +31,7 @@ export const CRUD_OPTIONS = {
menuWidth: 100, menuWidth: 100,
actions: [], actions: [],
dialogDrag: true, dialogDrag: true,
rowKey: 'id',
}; };
export const CRUD_VIEW_OPTIONS = { export const CRUD_VIEW_OPTIONS = {