管理后台初始化,登录,团队管理,报价单管理 完成
This commit is contained in:
59
src/pages/resource/team/components/TeamActions.jsx
Normal file
59
src/pages/resource/team/components/TeamActions.jsx
Normal file
@@ -0,0 +1,59 @@
|
||||
import React from 'react';
|
||||
import { Button, Space, Popconfirm } from 'antd';
|
||||
import { EditOutlined, DeleteOutlined, SaveOutlined, CloseOutlined } from '@ant-design/icons';
|
||||
|
||||
export const TeamActions = ({
|
||||
record,
|
||||
editable,
|
||||
editingKey,
|
||||
onEdit,
|
||||
onSave,
|
||||
onCancel,
|
||||
onDelete,
|
||||
}) => {
|
||||
if (editable) {
|
||||
return (
|
||||
<Space>
|
||||
<Button
|
||||
icon={<SaveOutlined />}
|
||||
onClick={() => onSave(record.id)}
|
||||
type="link"
|
||||
>
|
||||
保存
|
||||
</Button>
|
||||
<Button
|
||||
icon={<CloseOutlined />}
|
||||
onClick={onCancel}
|
||||
type="link"
|
||||
>
|
||||
取消
|
||||
</Button>
|
||||
</Space>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<Space>
|
||||
<Button
|
||||
disabled={editingKey !== ''}
|
||||
icon={<EditOutlined />}
|
||||
onClick={() => onEdit(record)}
|
||||
type="link"
|
||||
>
|
||||
编辑
|
||||
</Button>
|
||||
<Popconfirm
|
||||
title="确定要删除该团队吗?"
|
||||
onConfirm={() => onDelete(record.id)}
|
||||
>
|
||||
<Button
|
||||
icon={<DeleteOutlined />}
|
||||
type="link"
|
||||
danger
|
||||
>
|
||||
删除
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
</Space>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user