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