Browse Source

fix upLoadList style

pull/17805/head
veveue 6 years ago
committed by afc163
parent
commit
913d19113f
  1. 16
      components/upload/__tests__/__snapshots__/demo.test.js.snap
  2. 24
      components/upload/demo/avatar.md
  3. 4
      components/upload/style/index.less

16
components/upload/__tests__/__snapshots__/demo.test.js.snap

@ -1,13 +1,17 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/upload/demo/avatar.md correctly 1`] = `
<span
class="avatar-uploader"
<div
class="clearfix"
>
<div
class="ant-upload ant-upload-select ant-upload-select-picture-card"
/>
</span>
<span
class="avatar-uploader"
>
<div
class="ant-upload ant-upload-select ant-upload-select-picture-card"
/>
</span>
</div>
`;
exports[`renders ./components/upload/demo/basic.md correctly 1`] = `

24
components/upload/demo/avatar.md

@ -68,17 +68,19 @@ class Avatar extends React.Component {
);
const { imageUrl } = this.state;
return (
<Upload
name="avatar"
listType="picture-card"
className="avatar-uploader"
showUploadList={false}
action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
beforeUpload={beforeUpload}
onChange={this.handleChange}
>
{imageUrl ? <img src={imageUrl} alt="avatar" /> : uploadButton}
</Upload>
<div className="clearfix">
<Upload
name="avatar"
listType="picture-card"
className="avatar-uploader"
showUploadList={false}
action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
beforeUpload={beforeUpload}
onChange={this.handleChange}
>
{imageUrl ? <img src={imageUrl} alt="avatar" /> : uploadButton}
</Upload>
</div>
);
}
}

4
components/upload/style/index.less

@ -35,6 +35,7 @@
&&-select-picture-card {
display: table;
float: left;
width: @upload-picture-card-size;
height: @upload-picture-card-size;
margin-right: 8px;
@ -299,9 +300,6 @@
}
&-picture-card {
// https://github.com/ant-design/ant-design/issues/11183
float: left;
&.@{upload-prefix-cls}-list::after {
display: none;
}

Loading…
Cancel
Save