--- order: 10 title: zh-CN: 限制数量 en-US: Max Count --- ## zh-CN 通过 `maxCount` 限制上传数量。当为 `1` 时,始终用最新上传的代替当前。 ## en-US Limit files with `maxCount`. Will replace current one when `maxCount` is `1`. ```jsx import { Upload, Button, Space } from 'antd'; import { UploadOutlined } from '@ant-design/icons'; ReactDOM.render( , mountNode, ); ```