mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-10 11:03:19 +08:00
docs: reduce demo transfer/upload (#25487)
This commit is contained in:
parent
8079e0fb8e
commit
efdbb21f08
@ -380,7 +380,7 @@ exports[`renders ./components/transfer/demo/advanced.md correctly 1`] = `
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders ./components/transfer/demo/basic.md correctly 1`] = `
|
exports[`renders ./components/transfer/demo/basic.md correctly 1`] = `
|
||||||
<div>
|
Array [
|
||||||
<div
|
<div
|
||||||
class="ant-transfer"
|
class="ant-transfer"
|
||||||
>
|
>
|
||||||
@ -1069,7 +1069,7 @@ exports[`renders ./components/transfer/demo/basic.md correctly 1`] = `
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>,
|
||||||
<div
|
<div
|
||||||
class="ant-space ant-space-horizontal ant-space-align-center"
|
class="ant-space ant-space-horizontal ant-space-align-center"
|
||||||
style="margin-top:16px"
|
style="margin-top:16px"
|
||||||
@ -1093,8 +1093,8 @@ exports[`renders ./components/transfer/demo/basic.md correctly 1`] = `
|
|||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>,
|
||||||
</div>
|
]
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders ./components/transfer/demo/custom-item.md correctly 1`] = `
|
exports[`renders ./components/transfer/demo/custom-item.md correctly 1`] = `
|
||||||
@ -2065,7 +2065,7 @@ Array [
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders ./components/transfer/demo/oneWay.md correctly 1`] = `
|
exports[`renders ./components/transfer/demo/oneWay.md correctly 1`] = `
|
||||||
<div>
|
Array [
|
||||||
<div
|
<div
|
||||||
class="ant-transfer"
|
class="ant-transfer"
|
||||||
>
|
>
|
||||||
@ -2791,7 +2791,7 @@ exports[`renders ./components/transfer/demo/oneWay.md correctly 1`] = `
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>,
|
||||||
<div
|
<div
|
||||||
class="ant-space ant-space-horizontal ant-space-align-center"
|
class="ant-space ant-space-horizontal ant-space-align-center"
|
||||||
style="margin-top:16px"
|
style="margin-top:16px"
|
||||||
@ -2815,8 +2815,8 @@ exports[`renders ./components/transfer/demo/oneWay.md correctly 1`] = `
|
|||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>,
|
||||||
</div>
|
]
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders ./components/transfer/demo/search.md correctly 1`] = `
|
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`] = `
|
exports[`renders ./components/transfer/demo/table-transfer.md correctly 1`] = `
|
||||||
<div>
|
Array [
|
||||||
<div
|
<div
|
||||||
class="ant-transfer ant-transfer-customize-list"
|
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>
|
</div>
|
||||||
</div>
|
</div>,
|
||||||
<button
|
<button
|
||||||
aria-checked="false"
|
aria-checked="false"
|
||||||
class="ant-switch"
|
class="ant-switch"
|
||||||
@ -4258,7 +4258,7 @@ exports[`renders ./components/transfer/demo/table-transfer.md correctly 1`] = `
|
|||||||
>
|
>
|
||||||
disabled
|
disabled
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>,
|
||||||
<button
|
<button
|
||||||
aria-checked="false"
|
aria-checked="false"
|
||||||
class="ant-switch"
|
class="ant-switch"
|
||||||
@ -4274,12 +4274,11 @@ exports[`renders ./components/transfer/demo/table-transfer.md correctly 1`] = `
|
|||||||
>
|
>
|
||||||
showSearch
|
showSearch
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>,
|
||||||
</div>
|
]
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders ./components/transfer/demo/tree-transfer.md correctly 1`] = `
|
exports[`renders ./components/transfer/demo/tree-transfer.md correctly 1`] = `
|
||||||
<div>
|
|
||||||
<div
|
<div
|
||||||
class="tree-transfer ant-transfer ant-transfer-customize-list"
|
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>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
`;
|
`;
|
||||||
|
@ -62,7 +62,7 @@ class App extends React.Component {
|
|||||||
render() {
|
render() {
|
||||||
const { targetKeys, selectedKeys, disabled } = this.state;
|
const { targetKeys, selectedKeys, disabled } = this.state;
|
||||||
return (
|
return (
|
||||||
<div>
|
<>
|
||||||
<Transfer
|
<Transfer
|
||||||
dataSource={mockData}
|
dataSource={mockData}
|
||||||
titles={['Source', 'Target']}
|
titles={['Source', 'Target']}
|
||||||
@ -82,7 +82,7 @@ class App extends React.Component {
|
|||||||
onChange={this.handleDisable}
|
onChange={this.handleDisable}
|
||||||
/>
|
/>
|
||||||
</Space>
|
</Space>
|
||||||
</div>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ class App extends React.Component {
|
|||||||
render() {
|
render() {
|
||||||
const { targetKeys, selectedKeys, disabled } = this.state;
|
const { targetKeys, selectedKeys, disabled } = this.state;
|
||||||
return (
|
return (
|
||||||
<div>
|
<>
|
||||||
<Transfer
|
<Transfer
|
||||||
dataSource={mockData}
|
dataSource={mockData}
|
||||||
titles={['Source', 'Target']}
|
titles={['Source', 'Target']}
|
||||||
@ -83,7 +83,7 @@ class App extends React.Component {
|
|||||||
onChange={this.handleDisable}
|
onChange={this.handleDisable}
|
||||||
/>
|
/>
|
||||||
</Space>
|
</Space>
|
||||||
</div>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -125,7 +125,7 @@ class App extends React.Component {
|
|||||||
render() {
|
render() {
|
||||||
const { targetKeys, disabled, showSearch } = this.state;
|
const { targetKeys, disabled, showSearch } = this.state;
|
||||||
return (
|
return (
|
||||||
<div>
|
<>
|
||||||
<TableTransfer
|
<TableTransfer
|
||||||
dataSource={mockData}
|
dataSource={mockData}
|
||||||
targetKeys={targetKeys}
|
targetKeys={targetKeys}
|
||||||
@ -152,7 +152,7 @@ class App extends React.Component {
|
|||||||
onChange={this.triggerShowSearch}
|
onChange={this.triggerShowSearch}
|
||||||
style={{ marginTop: 16 }}
|
style={{ marginTop: 16 }}
|
||||||
/>
|
/>
|
||||||
</div>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -99,9 +99,9 @@ class App extends React.Component {
|
|||||||
render() {
|
render() {
|
||||||
const { targetKeys } = this.state;
|
const { targetKeys } = this.state;
|
||||||
return (
|
return (
|
||||||
<div>
|
<>
|
||||||
<TreeTransfer dataSource={treeData} targetKeys={targetKeys} onChange={this.onChange} />
|
<TreeTransfer dataSource={treeData} targetKeys={targetKeys} onChange={this.onChange} />
|
||||||
</div>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2042,7 +2042,7 @@ exports[`renders ./components/upload/demo/picture-card.md correctly 1`] = `
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders ./components/upload/demo/picture-style.md correctly 1`] = `
|
exports[`renders ./components/upload/demo/picture-style.md correctly 1`] = `
|
||||||
<div>
|
Array [
|
||||||
<span
|
<span
|
||||||
class=""
|
class=""
|
||||||
>
|
>
|
||||||
@ -2253,9 +2253,9 @@ exports[`renders ./components/upload/demo/picture-style.md correctly 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>,
|
||||||
<br />
|
<br />,
|
||||||
<br />
|
<br />,
|
||||||
<span
|
<span
|
||||||
class="upload-list-inline"
|
class="upload-list-inline"
|
||||||
>
|
>
|
||||||
@ -2466,12 +2466,11 @@ exports[`renders ./components/upload/demo/picture-style.md correctly 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>,
|
||||||
</div>
|
]
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders ./components/upload/demo/preview-file.md correctly 1`] = `
|
exports[`renders ./components/upload/demo/preview-file.md correctly 1`] = `
|
||||||
<div>
|
|
||||||
<span
|
<span
|
||||||
class=""
|
class=""
|
||||||
>
|
>
|
||||||
@ -2522,11 +2521,9 @@ exports[`renders ./components/upload/demo/preview-file.md correctly 1`] = `
|
|||||||
class="ant-upload-list ant-upload-list-picture"
|
class="ant-upload-list ant-upload-list-picture"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders ./components/upload/demo/transform-file.md correctly 1`] = `
|
exports[`renders ./components/upload/demo/transform-file.md correctly 1`] = `
|
||||||
<div>
|
|
||||||
<span
|
<span
|
||||||
class=""
|
class=""
|
||||||
>
|
>
|
||||||
@ -2577,7 +2574,6 @@ exports[`renders ./components/upload/demo/transform-file.md correctly 1`] = `
|
|||||||
class="ant-upload-list ant-upload-list-text"
|
class="ant-upload-list ant-upload-list-text"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders ./components/upload/demo/upload-custom-action-icon.md correctly 1`] = `
|
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`] = `
|
exports[`renders ./components/upload/demo/upload-manually.md correctly 1`] = `
|
||||||
<div>
|
Array [
|
||||||
<span
|
<span
|
||||||
class=""
|
class=""
|
||||||
>
|
>
|
||||||
@ -2941,7 +2937,7 @@ exports[`renders ./components/upload/demo/upload-manually.md correctly 1`] = `
|
|||||||
<div
|
<div
|
||||||
class="ant-upload-list ant-upload-list-text"
|
class="ant-upload-list ant-upload-list-text"
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>,
|
||||||
<button
|
<button
|
||||||
class="ant-btn ant-btn-primary"
|
class="ant-btn ant-btn-primary"
|
||||||
disabled=""
|
disabled=""
|
||||||
@ -2951,8 +2947,8 @@ exports[`renders ./components/upload/demo/upload-manually.md correctly 1`] = `
|
|||||||
<span>
|
<span>
|
||||||
Start Upload
|
Start Upload
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>,
|
||||||
</div>
|
]
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`renders ./components/upload/demo/upload-with-aliyun-oss.md correctly 1`] = `
|
exports[`renders ./components/upload/demo/upload-with-aliyun-oss.md correctly 1`] = `
|
||||||
|
@ -46,7 +46,7 @@ const props2 = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
ReactDOM.render(
|
ReactDOM.render(
|
||||||
<div>
|
<>
|
||||||
<Upload {...props}>
|
<Upload {...props}>
|
||||||
<Button>
|
<Button>
|
||||||
<UploadOutlined /> Upload
|
<UploadOutlined /> Upload
|
||||||
@ -59,7 +59,7 @@ ReactDOM.render(
|
|||||||
<UploadOutlined /> Upload
|
<UploadOutlined /> Upload
|
||||||
</Button>
|
</Button>
|
||||||
</Upload>
|
</Upload>
|
||||||
</div>,
|
</>,
|
||||||
mountNode,
|
mountNode,
|
||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
@ -33,13 +33,13 @@ const props = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
ReactDOM.render(
|
ReactDOM.render(
|
||||||
<div>
|
<>
|
||||||
<Upload {...props}>
|
<Upload {...props}>
|
||||||
<Button>
|
<Button>
|
||||||
<UploadOutlined /> Upload
|
<UploadOutlined /> Upload
|
||||||
</Button>
|
</Button>
|
||||||
</Upload>
|
</Upload>
|
||||||
</div>,
|
</>,
|
||||||
mountNode,
|
mountNode,
|
||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
@ -41,13 +41,13 @@ const props = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
ReactDOM.render(
|
ReactDOM.render(
|
||||||
<div>
|
<>
|
||||||
<Upload {...props}>
|
<Upload {...props}>
|
||||||
<Button>
|
<Button>
|
||||||
<UploadOutlined /> Upload
|
<UploadOutlined /> Upload
|
||||||
</Button>
|
</Button>
|
||||||
</Upload>
|
</Upload>
|
||||||
</div>,
|
</>,
|
||||||
mountNode,
|
mountNode,
|
||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
@ -80,7 +80,7 @@ class Demo extends React.Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<>
|
||||||
<Upload {...props}>
|
<Upload {...props}>
|
||||||
<Button>
|
<Button>
|
||||||
<UploadOutlined /> Select File
|
<UploadOutlined /> Select File
|
||||||
@ -95,7 +95,7 @@ class Demo extends React.Component {
|
|||||||
>
|
>
|
||||||
{uploading ? 'Uploading' : 'Start Upload'}
|
{uploading ? 'Uploading' : 'Start Upload'}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user