Commit c5943094 authored by XieZhiXiong's avatar XieZhiXiong

feat: type为card时,超出数量限制不显示上传按钮

parent 8d6ae809
......@@ -180,6 +180,7 @@ export interface IUploaderProps {
value: any[]
listType?: UploadListType
readOnly?: boolean
maxCount?: number
}
export const Upload = connect({
......@@ -284,7 +285,7 @@ export const Upload = connect({
onRemove={this.onRemoveHandler}
listType={'picture-card'}
>
{!others.readOnly ? (
{!others.readOnly && (others.maxCount !== undefined ? this.state.value.length < others.maxCount : true) ? (
<UploadPlaceholder />
) : null}
</AntdUpload>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment