import React, { useState, useRef } from "react"; import { Button, Row, Col } from "antd"; import CheckTable from "../CheckTable"; import { doFetch } from "@/utils/doFetch"; import { ArrowRightOutlined, ArrowLeftOutlined } from "@ant-design/icons"; const TableTransfer = (props) => { const { leftColumns = [], rightColumns = [], leftPath, rightPath, toLeft, toRight, leftCol, rightCol, leftDataSource, rightDataSource, leftEditTable, leftExtraparams, rightExtraparams, leftRowKey = "id", rightRowKey = "id", leftRowName, rightRowName, leftPagination, rightPagination, pageSize, leftClickParams, rightClickParams, leftTitle = "", rightTitle = "", rightSelectRowKey, leftSelectRowKey, } = props; const getCol = (itemcol) => { if (itemcol) { return itemcol; } else { return { xs: 24, sm: 24, md: 24, lg: 10, xl: 10, xxl: 10 }; } }, actionRef = useRef(), actionRefs = useRef(), [leftValues, clf] = useState([]), [rightValues, clr] = useState([]); function reload() { actionRef.current.reload(); actionRefs.current.reload(); clf([]); clr([]); } return (
{leftTitle}
{ clf(val); }} value={leftValues} >
{rightTitle}
{ clr(val); }} value={rightValues} >
); }; export default TableTransfer;