refactor: ♻️ cURD组件额外的操作列可以不需要auth属性
CURD组件额外的操作列可以不需要auth属性
This commit is contained in:
@@ -284,7 +284,9 @@
|
|||||||
<template v-else-if="typeof item === 'object'">
|
<template v-else-if="typeof item === 'object'">
|
||||||
<el-button
|
<el-button
|
||||||
v-if="item.render === undefined || item.render(scope.row)"
|
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"
|
:icon="item.icon"
|
||||||
:type="item.type ?? 'primary'"
|
:type="item.type ?? 'primary'"
|
||||||
size="small"
|
size="small"
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ export interface IContentConfig<T = any> {
|
|||||||
| "edit"
|
| "edit"
|
||||||
| "delete"
|
| "delete"
|
||||||
| {
|
| {
|
||||||
auth: string;
|
auth?: string;
|
||||||
icon?: string;
|
icon?: string;
|
||||||
name: string;
|
name: string;
|
||||||
text: string;
|
text: string;
|
||||||
|
|||||||
@@ -105,7 +105,6 @@ const contentConfig: IContentConfig<UserPageQuery> = {
|
|||||||
templet: "tool",
|
templet: "tool",
|
||||||
operat: [
|
operat: [
|
||||||
{
|
{
|
||||||
auth: "password:reset",
|
|
||||||
icon: "Document",
|
icon: "Document",
|
||||||
name: "detail",
|
name: "detail",
|
||||||
text: "详情",
|
text: "详情",
|
||||||
|
|||||||
Reference in New Issue
Block a user