forked from ant-design/ant-design
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
54 additions
and
247 deletions.
There are no files selected for viewing
299 changes: 53 additions & 246 deletions
299
components/upload/__tests__/__snapshots__/uploadlist.test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,268 +1,75 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Upload List should be uploading when upload a file 1`] = ` | ||
<Upload | ||
accept="" | ||
action="http://uploadcare.com/" | ||
beforeUpload={[Function]} | ||
className="" | ||
data={Object {}} | ||
disabled={false} | ||
listType="text" | ||
multiple={false} | ||
prefixCls="ant-upload" | ||
showUploadList={true} | ||
supportServerRender={true} | ||
type="select" | ||
<span | ||
class="" | ||
> | ||
<span | ||
className="" | ||
<div | ||
class="ant-upload ant-upload-select ant-upload-select-text" | ||
> | ||
<div | ||
className="ant-upload ant-upload-select ant-upload-select-text" | ||
style={ | ||
Object { | ||
"display": "", | ||
} | ||
} | ||
<span | ||
class="ant-upload" | ||
role="button" | ||
tabindex="0" | ||
> | ||
<Upload | ||
<input | ||
accept="" | ||
action="http://uploadcare.com/" | ||
beforeUpload={[Function]} | ||
component="span" | ||
customRequest={null} | ||
data={Object {}} | ||
disabled={false} | ||
headers={Object {}} | ||
listType="text" | ||
multipart={false} | ||
multiple={false} | ||
name="file" | ||
onError={[Function]} | ||
onProgress={[Function]} | ||
onReady={[Function]} | ||
onStart={[Function]} | ||
onSuccess={[Function]} | ||
prefixCls="ant-upload" | ||
showUploadList={true} | ||
supportServerRender={true} | ||
type="select" | ||
withCredentials={false} | ||
style="display: none;" | ||
type="file" | ||
/> | ||
<button> | ||
upload | ||
</button> | ||
</span> | ||
</div> | ||
<div | ||
class="ant-upload-list ant-upload-list-text" | ||
> | ||
<div | ||
class="ant-upload-list-item ant-upload-list-item-uploading" | ||
> | ||
<div | ||
class="ant-upload-list-item-info" | ||
> | ||
<AjaxUploader | ||
accept="" | ||
action="http://uploadcare.com/" | ||
beforeUpload={[Function]} | ||
component="span" | ||
customRequest={null} | ||
data={Object {}} | ||
disabled={false} | ||
headers={Object {}} | ||
listType="text" | ||
multipart={false} | ||
multiple={false} | ||
name="file" | ||
onError={[Function]} | ||
onProgress={[Function]} | ||
onReady={[Function]} | ||
onStart={[Function]} | ||
onSuccess={[Function]} | ||
prefixCls="ant-upload" | ||
showUploadList={true} | ||
supportServerRender={true} | ||
type="select" | ||
withCredentials={false} | ||
> | ||
<span> | ||
<i | ||
class="anticon anticon-spin anticon-loading" | ||
/> | ||
<span | ||
className="ant-upload" | ||
onClick={[Function]} | ||
onDragOver={[Function]} | ||
onDrop={[Function]} | ||
onKeyDown={[Function]} | ||
role="button" | ||
tabIndex="0" | ||
class="ant-upload-list-item-name" | ||
title="foo.png" | ||
> | ||
<input | ||
accept="" | ||
multiple={false} | ||
onChange={[Function]} | ||
style={ | ||
Object { | ||
"display": "none", | ||
} | ||
} | ||
type="file" | ||
/> | ||
<button> | ||
upload | ||
</button> | ||
foo.png | ||
</span> | ||
</AjaxUploader> | ||
</Upload> | ||
</div> | ||
<UploadList | ||
items={ | ||
Array [ | ||
Object { | ||
"error": undefined, | ||
"lastModified": undefined, | ||
"lastModifiedDate": undefined, | ||
"name": "foo.png", | ||
"originFileObj": Object { | ||
"filename": "foo.png", | ||
"uid": "rc-upload-1507622331497-4", | ||
}, | ||
"percent": 0, | ||
"response": undefined, | ||
"size": undefined, | ||
"status": "uploading", | ||
"type": undefined, | ||
"uid": "rc-upload-1507622331497-4", | ||
}, | ||
] | ||
} | ||
listType="text" | ||
locale={ | ||
Object { | ||
"previewFile": "预览文件", | ||
"removeFile": "删除文件", | ||
"uploadError": "上传错误", | ||
"uploading": "文件上传中", | ||
} | ||
} | ||
onRemove={[Function]} | ||
prefixCls="ant-upload" | ||
progressAttr={ | ||
Object { | ||
"showInfo": false, | ||
"strokeWidth": 2, | ||
} | ||
} | ||
showPreviewIcon={true} | ||
showRemoveIcon={true} | ||
> | ||
<Animate | ||
animation={Object {}} | ||
className="ant-upload-list ant-upload-list-text" | ||
component="div" | ||
componentProps={Object {}} | ||
onAppear={[Function]} | ||
onEnd={[Function]} | ||
onEnter={[Function]} | ||
onLeave={[Function]} | ||
transitionAppear={false} | ||
transitionEnter={true} | ||
transitionLeave={true} | ||
transitionName="ant-upload-animate" | ||
</span> | ||
</div> | ||
<i | ||
class="anticon anticon-cross" | ||
title="删除文件" | ||
/> | ||
<div | ||
class="ant-upload-list-item-progress" | ||
> | ||
<div | ||
className="ant-upload-list ant-upload-list-text" | ||
class="ant-progress ant-progress-line ant-progress-status-normal" | ||
> | ||
<AnimateChild | ||
animation={Object {}} | ||
transitionAppear={false} | ||
transitionEnter={true} | ||
transitionLeave={true} | ||
transitionName="ant-upload-animate" | ||
> | ||
<div> | ||
<div | ||
className="ant-upload-list-item ant-upload-list-item-uploading" | ||
class="ant-progress-outer" | ||
> | ||
<div | ||
className="ant-upload-list-item-info" | ||
> | ||
<span> | ||
<Icon | ||
type="loading" | ||
> | ||
<i | ||
className="anticon anticon-spin anticon-loading" | ||
/> | ||
</Icon> | ||
<span | ||
className="ant-upload-list-item-name" | ||
onClick={[Function]} | ||
title="foo.png" | ||
> | ||
foo.png | ||
</span> | ||
</span> | ||
</div> | ||
<Icon | ||
onClick={[Function]} | ||
title="删除文件" | ||
type="cross" | ||
class="ant-progress-inner" | ||
> | ||
<i | ||
className="anticon anticon-cross" | ||
onClick={[Function]} | ||
title="删除文件" | ||
<div | ||
class="ant-progress-bg" | ||
style="width: 0%; height: 2px;" | ||
/> | ||
</Icon> | ||
<Animate | ||
animation={Object {}} | ||
component="" | ||
componentProps={Object {}} | ||
onAppear={[Function]} | ||
onEnd={[Function]} | ||
onEnter={[Function]} | ||
onLeave={[Function]} | ||
transitionAppear={false} | ||
transitionEnter={true} | ||
transitionLeave={true} | ||
transitionName="fade" | ||
> | ||
<AnimateChild | ||
animation={Object {}} | ||
transitionAppear={false} | ||
transitionEnter={true} | ||
transitionLeave={true} | ||
transitionName="fade" | ||
> | ||
<div | ||
className="ant-upload-list-item-progress" | ||
> | ||
<Progress | ||
percent={0} | ||
prefixCls="ant-progress" | ||
showInfo={false} | ||
strokeWidth={2} | ||
trailColor="#f3f3f3" | ||
type="line" | ||
> | ||
<div | ||
className="ant-progress ant-progress-line ant-progress-status-normal" | ||
> | ||
<div> | ||
<div | ||
className="ant-progress-outer" | ||
> | ||
<div | ||
className="ant-progress-inner" | ||
> | ||
<div | ||
className="ant-progress-bg" | ||
style={ | ||
Object { | ||
"height": 2, | ||
"width": "0%", | ||
} | ||
} | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</Progress> | ||
</div> | ||
</AnimateChild> | ||
</Animate> | ||
</div> | ||
</div> | ||
</AnimateChild> | ||
</div> | ||
</div> | ||
</Animate> | ||
</UploadList> | ||
</span> | ||
</Upload> | ||
</div> | ||
</div> | ||
</div> | ||
</span> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters