feat(PageContent): 操作栏增加render配置参数

This commit is contained in:
cshaptx4869
2024-06-14 10:07:42 +08:00
parent 182e37d1bb
commit a96aad082f
5 changed files with 37 additions and 10 deletions

View File

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

View File

@@ -20,8 +20,8 @@ export type IObject = Record<string, any>;
export interface IOperatData {
name: string;
row: any;
column: any;
row: IObject;
column: IObject;
$index: number;
}
@@ -152,7 +152,7 @@ export interface IContentConfig<T = any> {
imageWidth?: number;
imageHeight?: number;
// list模板相关参数
selectList?: Record<string, any>;
selectList?: IObject;
// switch模板相关参数
activeValue?: boolean | string | number;
inactiveValue?: boolean | string | number;
@@ -173,6 +173,8 @@ export interface IContentConfig<T = any> {
icon?: string;
name: string;
text: string;
type?: "primary" | "success" | "warning" | "danger" | "info";
render?: (row: IObject) => boolean;
}
>;
// filter值拼接符