1
0
mirror of https://github.com/zclzone/vue-naive-admin.git synced 2025-04-30 22:29:01 +08:00

feat: 添加PH函数,根据按钮权限判断当前按钮是否渲染

This commit is contained in:
leipu 2025-03-19 10:38:04 +08:00
parent e74856040a
commit 2ff0befdd4

View File

@ -219,7 +219,7 @@ const columns = [
{
title: '操作',
key: 'actions',
width: 320,
width: 380,
align: 'right',
fixed: 'right',
hideInExcel: true,
@ -233,11 +233,25 @@ const columns = [
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),
},
{
default: () => '分配角色',
icon: () => h('i', { class: 'i-carbon:user-role text-14' }),
},
'setRole',
),
h(
NButton,