Skip to content

Commit cb33e75

Browse files
tao1991123guanpu
authored andcommitted
fix(Upload): className not pass in
1 parent 5d01768 commit cb33e75

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/upload/list.jsx

+8-5
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ class List extends Component {
433433
}
434434

435435
render() {
436-
const { listType, children, prefix, rtl } = this.props;
436+
const { listType, children, prefix, rtl, className } = this.props;
437437
const prefixCls = `${prefix}upload`;
438438

439439
let list = this.props.value.map(file => {
@@ -450,10 +450,13 @@ class List extends Component {
450450
if (rtl && listType === 'card' && Array.isArray(list)) {
451451
list = list.reverse();
452452
}
453-
const listclassNames = classNames({
454-
[`${prefixCls}-list`]: true,
455-
[`${prefixCls}-list-${this.props.listType}`]: true,
456-
});
453+
const listclassNames = classNames(
454+
{
455+
[`${prefixCls}-list`]: true,
456+
[`${prefixCls}-list-${this.props.listType}`]: true,
457+
},
458+
className
459+
);
457460

458461
const others = obj.pickAttrsWith(this.props, 'data-');
459462
return (

0 commit comments

Comments
 (0)