docs: reduce demo transfer/upload (#25487)

This commit is contained in:
xrkffgg 2020-07-08 08:58:45 +08:00 committed by GitHub
parent 8079e0fb8e
commit efdbb21f08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 435 additions and 441 deletions

View File

@ -380,7 +380,7 @@ exports[`renders ./components/transfer/demo/advanced.md correctly 1`] = `
`;
exports[`renders ./components/transfer/demo/basic.md correctly 1`] = `
<div>
Array [
<div
class="ant-transfer"
>
@ -1069,7 +1069,7 @@ exports[`renders ./components/transfer/demo/basic.md correctly 1`] = `
</ul>
</div>
</div>
</div>
</div>,
<div
class="ant-space ant-space-horizontal ant-space-align-center"
style="margin-top:16px"
@ -1093,8 +1093,8 @@ exports[`renders ./components/transfer/demo/basic.md correctly 1`] = `
</span>
</button>
</div>
</div>
</div>
</div>,
]
`;
exports[`renders ./components/transfer/demo/custom-item.md correctly 1`] = `
@ -2065,7 +2065,7 @@ Array [
`;
exports[`renders ./components/transfer/demo/oneWay.md correctly 1`] = `
<div>
Array [
<div
class="ant-transfer"
>
@ -2791,7 +2791,7 @@ exports[`renders ./components/transfer/demo/oneWay.md correctly 1`] = `
</ul>
</div>
</div>
</div>
</div>,
<div
class="ant-space ant-space-horizontal ant-space-align-center"
style="margin-top:16px"
@ -2815,8 +2815,8 @@ exports[`renders ./components/transfer/demo/oneWay.md correctly 1`] = `
</span>
</button>
</div>
</div>
</div>
</div>,
]
`;
exports[`renders ./components/transfer/demo/search.md correctly 1`] = `
@ -3165,7 +3165,7 @@ exports[`renders ./components/transfer/demo/search.md correctly 1`] = `
`;
exports[`renders ./components/transfer/demo/table-transfer.md correctly 1`] = `
<div>
Array [
<div
class="ant-transfer ant-transfer-customize-list"
>
@ -4242,7 +4242,7 @@ exports[`renders ./components/transfer/demo/table-transfer.md correctly 1`] = `
</div>
</div>
</div>
</div>
</div>,
<button
aria-checked="false"
class="ant-switch"
@ -4258,7 +4258,7 @@ exports[`renders ./components/transfer/demo/table-transfer.md correctly 1`] = `
>
disabled
</span>
</button>
</button>,
<button
aria-checked="false"
class="ant-switch"
@ -4274,12 +4274,11 @@ exports[`renders ./components/transfer/demo/table-transfer.md correctly 1`] = `
>
showSearch
</span>
</button>
</div>
</button>,
]
`;
exports[`renders ./components/transfer/demo/tree-transfer.md correctly 1`] = `
<div>
<div
class="tree-transfer ant-transfer ant-transfer-customize-list"
>
@ -4655,5 +4654,4 @@ exports[`renders ./components/transfer/demo/tree-transfer.md correctly 1`] = `
</div>
</div>
</div>
</div>
`;

View File

@ -62,7 +62,7 @@ class App extends React.Component {
render() {
const { targetKeys, selectedKeys, disabled } = this.state;
return (
<div>
<>
<Transfer
dataSource={mockData}
titles={['Source', 'Target']}
@ -82,7 +82,7 @@ class App extends React.Component {
onChange={this.handleDisable}
/>
</Space>
</div>
</>
);
}
}

View File

@ -62,7 +62,7 @@ class App extends React.Component {
render() {
const { targetKeys, selectedKeys, disabled } = this.state;
return (
<div>
<>
<Transfer
dataSource={mockData}
titles={['Source', 'Target']}
@ -83,7 +83,7 @@ class App extends React.Component {
onChange={this.handleDisable}
/>
</Space>
</div>
</>
);
}
}

View File

@ -125,7 +125,7 @@ class App extends React.Component {
render() {
const { targetKeys, disabled, showSearch } = this.state;
return (
<div>
<>
<TableTransfer
dataSource={mockData}
targetKeys={targetKeys}
@ -152,7 +152,7 @@ class App extends React.Component {
onChange={this.triggerShowSearch}
style={{ marginTop: 16 }}
/>
</div>
</>
);
}
}

View File

@ -99,9 +99,9 @@ class App extends React.Component {
render() {
const { targetKeys } = this.state;
return (
<div>
<>
<TreeTransfer dataSource={treeData} targetKeys={targetKeys} onChange={this.onChange} />
</div>
</>
);
}
}

View File

@ -2042,7 +2042,7 @@ exports[`renders ./components/upload/demo/picture-card.md correctly 1`] = `
`;
exports[`renders ./components/upload/demo/picture-style.md correctly 1`] = `
<div>
Array [
<span
class=""
>
@ -2253,9 +2253,9 @@ exports[`renders ./components/upload/demo/picture-style.md correctly 1`] = `
</div>
</div>
</div>
</span>
<br />
<br />
</span>,
<br />,
<br />,
<span
class="upload-list-inline"
>
@ -2466,12 +2466,11 @@ exports[`renders ./components/upload/demo/picture-style.md correctly 1`] = `
</div>
</div>
</div>
</span>
</div>
</span>,
]
`;
exports[`renders ./components/upload/demo/preview-file.md correctly 1`] = `
<div>
<span
class=""
>
@ -2522,11 +2521,9 @@ exports[`renders ./components/upload/demo/preview-file.md correctly 1`] = `
class="ant-upload-list ant-upload-list-picture"
/>
</span>
</div>
`;
exports[`renders ./components/upload/demo/transform-file.md correctly 1`] = `
<div>
<span
class=""
>
@ -2577,7 +2574,6 @@ exports[`renders ./components/upload/demo/transform-file.md correctly 1`] = `
class="ant-upload-list ant-upload-list-text"
/>
</span>
</div>
`;
exports[`renders ./components/upload/demo/upload-custom-action-icon.md correctly 1`] = `
@ -2891,7 +2887,7 @@ exports[`renders ./components/upload/demo/upload-custom-action-icon.md correctly
`;
exports[`renders ./components/upload/demo/upload-manually.md correctly 1`] = `
<div>
Array [
<span
class=""
>
@ -2941,7 +2937,7 @@ exports[`renders ./components/upload/demo/upload-manually.md correctly 1`] = `
<div
class="ant-upload-list ant-upload-list-text"
/>
</span>
</span>,
<button
class="ant-btn ant-btn-primary"
disabled=""
@ -2951,8 +2947,8 @@ exports[`renders ./components/upload/demo/upload-manually.md correctly 1`] = `
<span>
Start Upload
</span>
</button>
</div>
</button>,
]
`;
exports[`renders ./components/upload/demo/upload-with-aliyun-oss.md correctly 1`] = `

View File

@ -46,7 +46,7 @@ const props2 = {
};
ReactDOM.render(
<div>
<>
<Upload {...props}>
<Button>
<UploadOutlined /> Upload
@ -59,7 +59,7 @@ ReactDOM.render(
<UploadOutlined /> Upload
</Button>
</Upload>
</div>,
</>,
mountNode,
);
```

View File

@ -33,13 +33,13 @@ const props = {
};
ReactDOM.render(
<div>
<>
<Upload {...props}>
<Button>
<UploadOutlined /> Upload
</Button>
</Upload>
</div>,
</>,
mountNode,
);
```

View File

@ -41,13 +41,13 @@ const props = {
};
ReactDOM.render(
<div>
<>
<Upload {...props}>
<Button>
<UploadOutlined /> Upload
</Button>
</Upload>
</div>,
</>,
mountNode,
);
```

View File

@ -80,7 +80,7 @@ class Demo extends React.Component {
};
return (
<div>
<>
<Upload {...props}>
<Button>
<UploadOutlined /> Select File
@ -95,7 +95,7 @@ class Demo extends React.Component {
>
{uploading ? 'Uploading' : 'Start Upload'}
</Button>
</div>
</>
);
}
}