refactor: ♻️ cURD组件额外的操作列可以不需要auth属性

CURD组件额外的操作列可以不需要auth属性
This commit is contained in:
胡少翔
2024-11-27 17:53:51 +08:00
parent 239781788e
commit 64a6adad96
3 changed files with 4 additions and 3 deletions

View File

@@ -284,7 +284,9 @@
<template v-else-if="typeof item === 'object'">
<el-button
v-if="item.render === undefined || item.render(scope.row)"
v-hasPerm="[`${contentConfig.pageName}:${item.auth}`]"
v-bind="
item.auth ? { 'v-hasPerm': [`${contentConfig.pageName}:${item.auth}`] } : {}
"
:icon="item.icon"
:type="item.type ?? 'primary'"
size="small"