我的权力事项/目录
@aligov/my-power
我的权力/事项模块
API
参数名 | 说明 | 必填 | 类型 | 默认值 | 备注 |
---|---|---|---|---|---|
title | 模块标题 | Y | string | ||
detailurl | 查看详情 | Y | string | ||
groupsQueryService | 查询分组的接口 | Y | () => Promise<IGroup[]> |
||
powerQueryService | 查询列表的接口 | Y | (groupCode: string) => Promise<IPower[]> |
||
statusUIMap | 列表项状态到ui的映射色表 | Y | any | ||
emptyMsg | 分组为空时的提示信息 | Y | string | ||
groupEmptyMsg | 分组内列表为空时的提示信息 | Y | string |
interface IGroup {
groupCode: string;
groupName: string;
}
interface IPower {
name: string;
code: string;
status: string;
statusDesc: string;
updateTime: string;
[p: string]: any;
}
interface IMyPowerProps {
title: string;
detailUrl: string;
groupsQueryService: () => Promise<IGroup[]>;
powerQueryService: (code: string) => Promise<IPower[]>;
statusUIMap: IStatusUIMap;
emptyMsg: string | React.ReactNode;
groupEmptyMsg: string | React.ReactNode;
}
interface IStatusUIMap {
[p: string]: 'success' | 'error' | 'normal';
}