1
0
mirror of https://github.com/zclzone/vue-naive-admin.git synced 2026-01-22 23:50:22 +08:00

fix: withPermission完善

This commit is contained in:
zclzone
2025-03-21 14:39:26 +08:00
parent 70c2098d2e
commit cf0ba0a2bf
2 changed files with 29 additions and 0 deletions

View File

@@ -112,6 +112,7 @@
<script setup>
import { MeCrud, MeModal, MeQueryItem } from '@/components'
import { useCrud } from '@/composables'
import { withPermission } from '@/directives'
import { formatDateTime } from '@/utils'
import { NAvatar, NButton, NSwitch, NTag } from 'naive-ui'
import api from './api'
@@ -225,11 +226,24 @@ const columns = [
hideInExcel: true,
render(row) {
return [
withPermission(
h(NButton, {
size: 'small',
type: 'primary',
secondary: true,
onClick: () => handleOpenRolesSet(row),
}, {
default: () => '超管专属',
icon: () => h('i', { class: 'i-carbon:user-role text-14' }),
}),
'SuperAdmin',
),
h(
NButton,
{
size: 'small',
type: 'primary',
class: 'ml-12px',
secondary: true,
onClick: () => handleOpenRolesSet(row),
},