Skip to content

Commit

Permalink
fix: 修复字典操作按钮权限控制失效的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles7c committed Oct 16, 2024
1 parent 20bbf6c commit 795932e
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions src/views/system/dict/tree/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<template #icon><icon-plus /></template>
</a-button>
</div>
<a class="dict-tree__container">
<a class="dict-tree__tree">
<div class="dict-tree__container">
<div class="dict-tree__tree">
<a-tree :data="(treeData as unknown as TreeNodeData[])" :field-names="{ key: 'id' }" block-node
@select="select">
<template #title="node">
Expand All @@ -25,22 +25,18 @@
</template>
<template #extra="node">
<a-trigger trigger="click" align-point animation-name="slide-dynamic-origin" auto-fit-transform-origin position="bl" scroll-to-close>
<icon-more-vertical class="action" />
<icon-more-vertical v-if="has.hasPermOr(['system:dict:update', 'system:dict:delete'])" class="action" />
<template #content>
<RightMenu
v-if="has.hasPermOr(['system:dict:update', 'system:dict:delete'])"
:data="node"
@on-menu-item-click="onMenuItemClick"
/>
<RightMenu :data="node" @on-menu-item-click="onMenuItemClick" />
</template>
</a-trigger>
</template>
</a-tree>
</a>
</a>
</div>
</div>
</div>

<DictAddModal ref="DictAddModalRef" @save-success="getTreeData" />
</div>
</template>

<script setup lang="tsx">
Expand Down

0 comments on commit 795932e

Please sign in to comment.