refactor: ♻️ cURD组件额外的操作列可以不需要auth属性
CURD组件额外的操作列可以不需要auth属性
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -174,7 +174,7 @@ export interface IContentConfig<T = any> {
|
||||
| "edit"
|
||||
| "delete"
|
||||
| {
|
||||
auth: string;
|
||||
auth?: string;
|
||||
icon?: string;
|
||||
name: string;
|
||||
text: string;
|
||||
|
||||
@@ -105,7 +105,6 @@ const contentConfig: IContentConfig<UserPageQuery> = {
|
||||
templet: "tool",
|
||||
operat: [
|
||||
{
|
||||
auth: "password:reset",
|
||||
icon: "Document",
|
||||
name: "detail",
|
||||
text: "详情",
|
||||
|
||||
Reference in New Issue
Block a user