1.0.0 • Published 4 years ago
@teamix/action-group v1.0.0
操作分组_spacex_1623830780015
@teamix/action-group
将多的操作进行分组展示
API
参数名 | 说明 | 必填 | 类型 | 默认值 | 备注 |
---|---|---|---|---|---|
preButtons | 前置按钮配置数据 | 否 | 详见下方 | [] | |
moreText | 展开文案 | 否 | 详见下方 | 全部操作' | |
dataSource | 下拉面板数据 | 是 | 详见下方 | ||
onItemClick | 点击单回调 | 是 | 详见下方 | () => {} |
interface IChild {
text: string;
tooltip?: string;
disabled?: boolean;
[key: string]: any;
}
interface IDataSourceItem {
title: string;
children: Array<IChild>;
}
interface IActionGroupProps extends React.HTMLAttributes<HTMLDivElement> {
preButtons?: Array<{
type: 'primary' | 'secondary' | 'normal';
text: string;
disabled?: boolean;
onClick?: () => void;
[key: string]: any;
}>;
moreText: string;
dataSource: IDataSourceItem[];
onItemClick?: (item: {
text: string;
tooltip?: string;
disabled?: boolean;
[key: string]: any;
}) => void;
}
1.0.0
4 years ago