Commit b9ba9c62 authored by zhangwenshuai's avatar zhangwenshuai

update

parent 891e5d3e
...@@ -39,19 +39,25 @@ export default class Operate extends Component<Props> { ...@@ -39,19 +39,25 @@ export default class Operate extends Component<Props> {
}; };
renderBtn = (btn: any) => { renderBtn = (btn: any) => {
const { render, label, onClick } = btn; const { render, label, onClick, type, ghost, icon } = btn;
if (typeof render === 'function') { if (typeof render === 'function') {
return render(btn); return render(btn);
} }
return <Button onClick={onClick}>{label}</Button>; return (
<Button type={type} onClick={onClick} ghost={ghost}>
{icon}
{label}
</Button>
);
}; };
render() { render() {
const { operateConfig, columns } = this.props; const { operateConfig, columns } = this.props;
const { menusGroup, buttonsGroup, renderCustomNode, showCondition }: any = operateConfig || {}; const { menusGroup, buttonsGroup, renderCustomNode, showCondition }: any = operateConfig || {};
const filter: any = menusGroup const filter: any =
&& menusGroup.find((item: any) => { menusGroup &&
menusGroup.find((item: any) => {
return item.type === 'filter'; return item.type === 'filter';
}); });
return ( return (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment