该按钮一秒只能点击一次
import React from 'react';
import { Button } from 'antd';
import throttle from 'lodash/throttle'
const throttleButton = (props) => {
const { onClick } = props;
return (
<Button type="primary" {...props} onClick={throttle(onClick, 1000)}>
{props.children}
</Button>
)
};
export default throttleButton;