UNPKG

ttk-app-core

Version:

@ttk/recat enterprise develop framework

45 lines (43 loc) 984 B
import React, { useState, useCallback } from "react"; import { Table } from "antd"; import { useData, useActions, useCommit } from "@ttk/app-loader"; import { dateRange } from "@/"; import { Record } from "immutable"; export default function TableCom(props) { const commit = useCommit(); const actions = useActions(props); const { tempData } = useData([props, "receiveData"]).toJS(); var dataSource = []; dataSource.push(tempData); const columns = [ { title: "应收", dataIndex: "rec", key: "rec", }, { title: "其他应收", dataIndex: "otherRec", key: "otherRec", }, { title: "应付", dataIndex: "pay", key: "pay", }, { title: "其他应付", dataIndex: "otherPay", key: "otherPay", }, ]; return ( <Table dataSource={dataSource} columns={columns} pagination={false} bordered={true} rowKey={record=>record.time} /> ); }