fix: crud组件列表操作栏和列表顶部操作栏增加hidden隐藏字段
This commit is contained in:
parent
fdc1933bbe
commit
53fdd79a2e
|
|
@ -55,6 +55,7 @@
|
|||
<!-- 其他 -->
|
||||
<template v-else-if="typeof item === 'object'">
|
||||
<el-button
|
||||
v-if="item.hidden === undefined || item.hidden === false"
|
||||
v-hasPerm="[`${contentConfig.pageName}:${item.auth}`]"
|
||||
:icon="item.icon"
|
||||
:type="item.type ?? 'default'"
|
||||
|
|
@ -284,6 +285,7 @@
|
|||
</template>
|
||||
<!-- 其他 -->
|
||||
<template v-else-if="typeof item === 'object'">
|
||||
<template v-if="item.hidden === undefined || item.hidden === false">
|
||||
<el-button
|
||||
v-if="item.isBtn"
|
||||
v-hasPerm="[`${contentConfig.pageName}:${item.auth}`]"
|
||||
|
|
@ -307,7 +309,9 @@
|
|||
<el-button
|
||||
v-if="item.render === undefined || item.render(scope.row)"
|
||||
v-bind="
|
||||
item.auth ? { 'v-hasPerm': [`${contentConfig.pageName}:${item.auth}`] } : {}
|
||||
item.auth
|
||||
? { 'v-hasPerm': [`${contentConfig.pageName}:${item.auth}`] }
|
||||
: {}
|
||||
"
|
||||
:icon="item.icon"
|
||||
:type="item.type ?? 'primary'"
|
||||
|
|
@ -347,6 +351,7 @@
|
|||
</template>
|
||||
</template>
|
||||
</template>
|
||||
</template>
|
||||
<!-- 自定义 -->
|
||||
<template v-else-if="col.templet === 'custom'">
|
||||
<slot :name="col.slotName ?? col.prop" :prop="col.prop" v-bind="scope" />
|
||||
|
|
|
|||
|
|
@ -148,6 +148,7 @@ export interface IContentConfig<T = any> {
|
|||
icon?: string;
|
||||
name: string;
|
||||
text: string;
|
||||
hidden?: boolean;
|
||||
type?: "primary" | "success" | "warning" | "danger" | "info";
|
||||
}
|
||||
>;
|
||||
|
|
@ -215,6 +216,7 @@ export interface IContentConfig<T = any> {
|
|||
name: string;
|
||||
text: string;
|
||||
isBtn?: boolean;
|
||||
hidden?: boolean;
|
||||
type?: "primary" | "success" | "warning" | "danger" | "info";
|
||||
render?: (row: IObject) => boolean;
|
||||
options?: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue