| | |
| | | } |
| | | }; |
| | | |
| | | |
| | | const LogininforTableList = () => { |
| | | const Main = () => { |
| | | const formTableRef = useRef(); |
| | | const actionRef = useRef(); |
| | | const [selectedRows, setSelectedRows] = useState([]); |
| | |
| | | render: (_, record) => [ |
| | | <Button |
| | | type="link" |
| | | size="small" |
| | | key="edit" |
| | | onClick={() => { |
| | | setModalVisible(true); |
| | |
| | | </Button>, |
| | | <Button |
| | | type="link" |
| | | size="small" |
| | | danger |
| | | key="batchRemove" |
| | | onClick={async () => { |
| | |
| | | actionRef={actionRef} |
| | | formRef={formTableRef} |
| | | rowKey="id" |
| | | key="logininforList" |
| | | key="role" |
| | | search={{ |
| | | labelWidth: 120, |
| | | }} |
| | |
| | | }} |
| | | /> |
| | | </div> |
| | | |
| | | {selectedRows?.length > 0 && ( |
| | | <FooterToolbar |
| | | extra={ |
| | |
| | | Modal.confirm({ |
| | | title: '删除', |
| | | content: '确定删除该项吗?', |
| | | okText: '确认', |
| | | cancelText: '取消', |
| | | onOk: async () => { |
| | | const success = await handleRemove(selectedRows); |
| | | if (success) { |
| | |
| | | ); |
| | | }; |
| | | |
| | | export default LogininforTableList; |
| | | export default Main; |