
import React from 'react';
import { Button } from 'kts-components-antd-x3';
import Invoice from '../../';

const Buyer = Invoice.Buyer

export default () => {

  const controller = React.useMemo(() => new Invoice.InvoiceController, [])

  const onClick = React.useCallback(async () => {
    console.log('===> 当前组件状态', await controller.validateFields());
  }, []);

  return (
    <div>
      <Button onClick={onClick} style={{ marginBottom: 10 }}>获取数据</Button>
      <Invoice invoiceType='digtal' controller={controller}/>
    </div>
  );
};
