1.0.5 • Published 4 years ago

@aligov/my-power v1.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

我的权力事项/目录

@aligov/my-power

我的权力/事项模块

API

参数名说明必填类型默认值备注
title模块标题Ystring
detailurl查看详情Ystring
groupsQueryService查询分组的接口Y() => Promise<IGroup[]>
powerQueryService查询列表的接口Y(groupCode: string) => Promise<IPower[]>
statusUIMap列表项状态到ui的映射色表Yany
emptyMsg分组为空时的提示信息Ystring
groupEmptyMsg分组内列表为空时的提示信息Ystring
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';
}