mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-07 17:44:35 +08:00
chore: replace demo image to public avatar resources (#32479)
* docs: replace avatar image to joeschmoe placeholder * docs: usage randomme avatar url
This commit is contained in:
parent
8cafb114a7
commit
827225b895
@ -57,7 +57,7 @@ describe('Avatar Render', () => {
|
||||
|
||||
it('should handle onError correctly', () => {
|
||||
const LOAD_FAILURE_SRC = 'http://error.url';
|
||||
const LOAD_SUCCESS_SRC = 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png';
|
||||
const LOAD_SUCCESS_SRC = 'https://joeschmoe.io/api/v1/random';
|
||||
|
||||
const div = global.document.createElement('div');
|
||||
global.document.body.appendChild(div);
|
||||
@ -95,7 +95,7 @@ describe('Avatar Render', () => {
|
||||
|
||||
it('should show image on success after a failure state', () => {
|
||||
const LOAD_FAILURE_SRC = 'http://error.url';
|
||||
const LOAD_SUCCESS_SRC = 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png';
|
||||
const LOAD_SUCCESS_SRC = 'https://joeschmoe.io/api/v1/random';
|
||||
|
||||
const div = global.document.createElement('div');
|
||||
global.document.body.appendChild(div);
|
||||
@ -195,7 +195,7 @@ describe('Avatar Render', () => {
|
||||
});
|
||||
|
||||
it('should exist crossorigin attribute', () => {
|
||||
const LOAD_SUCCESS_SRC = 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png';
|
||||
const LOAD_SUCCESS_SRC = 'https://joeschmoe.io/api/v1/random';
|
||||
const wrapper = mount(
|
||||
<Avatar src={LOAD_SUCCESS_SRC} crossOrigin="anonymous">
|
||||
crossorigin
|
||||
@ -206,7 +206,7 @@ describe('Avatar Render', () => {
|
||||
});
|
||||
|
||||
it('should not exist crossorigin attribute', () => {
|
||||
const LOAD_SUCCESS_SRC = 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png';
|
||||
const LOAD_SUCCESS_SRC = 'https://joeschmoe.io/api/v1/random';
|
||||
const wrapper = mount(<Avatar src={LOAD_SUCCESS_SRC}>crossorigin</Avatar>);
|
||||
expect(wrapper.html().includes('crossorigin')).toEqual(false);
|
||||
expect(wrapper.find('img').prop('crossOrigin')).toEqual(undefined);
|
||||
|
@ -156,7 +156,7 @@ exports[`Avatar Render should handle onError correctly 1`] = `
|
||||
onError={[Function]}
|
||||
shape="circle"
|
||||
size="default"
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
>
|
||||
<span
|
||||
className="ant-avatar ant-avatar-circle ant-avatar-image"
|
||||
@ -164,7 +164,7 @@ exports[`Avatar Render should handle onError correctly 1`] = `
|
||||
>
|
||||
<img
|
||||
onError={[Function]}
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</Avatar>
|
||||
@ -205,7 +205,7 @@ exports[`Avatar Render should show image on success after a failure state 2`] =
|
||||
<Avatar
|
||||
shape="circle"
|
||||
size="default"
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
>
|
||||
<span
|
||||
className="ant-avatar ant-avatar-circle ant-avatar-image"
|
||||
@ -213,7 +213,7 @@ exports[`Avatar Render should show image on success after a failure state 2`] =
|
||||
>
|
||||
<img
|
||||
onError={[Function]}
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</Avatar>
|
||||
|
@ -342,7 +342,7 @@ Array [
|
||||
class="ant-avatar ant-avatar-circle ant-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
<span
|
||||
@ -416,7 +416,7 @@ Array [
|
||||
class="ant-avatar ant-avatar-circle ant-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
<span
|
||||
@ -453,7 +453,7 @@ Array [
|
||||
class="ant-avatar ant-avatar-lg ant-avatar-circle ant-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
<span
|
||||
@ -635,7 +635,7 @@ Array [
|
||||
class="ant-avatar ant-avatar-circle ant-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>,
|
||||
<span
|
||||
@ -646,7 +646,8 @@ Array [
|
||||
>
|
||||
<img
|
||||
class="ant-image-img"
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
style="width:32px"
|
||||
/>
|
||||
<div
|
||||
class="ant-image-mask"
|
||||
|
@ -20,7 +20,7 @@ import { UserOutlined, AntDesignOutlined } from '@ant-design/icons';
|
||||
const Demo = () => (
|
||||
<>
|
||||
<Avatar.Group>
|
||||
<Avatar src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />
|
||||
<Avatar src="https://joeschmoe.io/api/v1/random" />
|
||||
<Avatar style={{ backgroundColor: '#f56a00' }}>K</Avatar>
|
||||
<Tooltip title="Ant User" placement="top">
|
||||
<Avatar style={{ backgroundColor: '#87d068' }} icon={<UserOutlined />} />
|
||||
@ -29,7 +29,7 @@ const Demo = () => (
|
||||
</Avatar.Group>
|
||||
<Divider />
|
||||
<Avatar.Group maxCount={2} maxStyle={{ color: '#f56a00', backgroundColor: '#fde3cf' }}>
|
||||
<Avatar src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />
|
||||
<Avatar src="https://joeschmoe.io/api/v1/random" />
|
||||
<Avatar style={{ backgroundColor: '#f56a00' }}>K</Avatar>
|
||||
<Tooltip title="Ant User" placement="top">
|
||||
<Avatar style={{ backgroundColor: '#87d068' }} icon={<UserOutlined />} />
|
||||
@ -42,7 +42,7 @@ const Demo = () => (
|
||||
size="large"
|
||||
maxStyle={{ color: '#f56a00', backgroundColor: '#fde3cf' }}
|
||||
>
|
||||
<Avatar src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />
|
||||
<Avatar src="https://joeschmoe.io/api/v1/random" />
|
||||
<Avatar style={{ backgroundColor: '#f56a00' }}>K</Avatar>
|
||||
<Tooltip title="Ant User" placement="top">
|
||||
<Avatar style={{ backgroundColor: '#87d068' }} icon={<UserOutlined />} />
|
||||
|
@ -22,10 +22,8 @@ ReactDOM.render(
|
||||
<Avatar icon={<UserOutlined />} />
|
||||
<Avatar>U</Avatar>
|
||||
<Avatar size={40}>USER</Avatar>
|
||||
<Avatar src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />
|
||||
<Avatar
|
||||
src={<Image src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />}
|
||||
/>
|
||||
<Avatar src="https://joeschmoe.io/api/v1/random" />
|
||||
<Avatar src={<Image src="https://joeschmoe.io/api/v1/random" style={{ width: 32 }} />} />
|
||||
<Avatar style={{ color: '#f56a00', backgroundColor: '#fde3cf' }}>U</Avatar>
|
||||
<Avatar style={{ backgroundColor: '#87d068' }} icon={<UserOutlined />} />
|
||||
</>,
|
||||
|
@ -682,7 +682,7 @@ exports[`renders ./components/card/demo/meta.md correctly 1`] = `
|
||||
class="ant-avatar ant-avatar-circle ant-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -37,9 +37,7 @@ class App extends React.Component {
|
||||
|
||||
<Card style={{ width: 300, marginTop: 16 }} loading={loading}>
|
||||
<Meta
|
||||
avatar={
|
||||
<Avatar src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />
|
||||
}
|
||||
avatar={<Avatar src="https://joeschmoe.io/api/v1/random" />}
|
||||
title="Card title"
|
||||
description="This is the description"
|
||||
/>
|
||||
@ -55,9 +53,7 @@ class App extends React.Component {
|
||||
>
|
||||
<Skeleton loading={loading} avatar active>
|
||||
<Meta
|
||||
avatar={
|
||||
<Avatar src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />
|
||||
}
|
||||
avatar={<Avatar src="https://joeschmoe.io/api/v1/random" />}
|
||||
title="Card title"
|
||||
description="This is the description"
|
||||
/>
|
||||
|
@ -35,7 +35,7 @@ ReactDOM.render(
|
||||
]}
|
||||
>
|
||||
<Meta
|
||||
avatar={<Avatar src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />}
|
||||
avatar={<Avatar src="https://joeschmoe.io/api/v1/random" />}
|
||||
title="Card title"
|
||||
description="This is the description"
|
||||
/>
|
||||
|
@ -15,7 +15,7 @@ exports[`renders ./components/comment/demo/basic.md correctly 1`] = `
|
||||
>
|
||||
<img
|
||||
alt="Han Solo"
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@ -132,7 +132,7 @@ exports[`renders ./components/comment/demo/editor.md correctly 1`] = `
|
||||
>
|
||||
<img
|
||||
alt="Han Solo"
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@ -222,7 +222,7 @@ exports[`renders ./components/comment/demo/list.md correctly 1`] = `
|
||||
>
|
||||
<img
|
||||
alt="comment-avatar"
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
@ -276,7 +276,7 @@ exports[`renders ./components/comment/demo/list.md correctly 1`] = `
|
||||
>
|
||||
<img
|
||||
alt="comment-avatar"
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
@ -339,7 +339,7 @@ exports[`renders ./components/comment/demo/nested.md correctly 1`] = `
|
||||
>
|
||||
<img
|
||||
alt="Han Solo"
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@ -392,7 +392,7 @@ exports[`renders ./components/comment/demo/nested.md correctly 1`] = `
|
||||
>
|
||||
<img
|
||||
alt="Han Solo"
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@ -445,7 +445,7 @@ exports[`renders ./components/comment/demo/nested.md correctly 1`] = `
|
||||
>
|
||||
<img
|
||||
alt="Han Solo"
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@ -496,7 +496,7 @@ exports[`renders ./components/comment/demo/nested.md correctly 1`] = `
|
||||
>
|
||||
<img
|
||||
alt="Han Solo"
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -56,12 +56,7 @@ const Demo = () => {
|
||||
<Comment
|
||||
actions={actions}
|
||||
author={<a>Han Solo</a>}
|
||||
avatar={
|
||||
<Avatar
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
alt="Han Solo"
|
||||
/>
|
||||
}
|
||||
avatar={<Avatar src="https://joeschmoe.io/api/v1/random" alt="Han Solo" />}
|
||||
content={
|
||||
<p>
|
||||
We supply a series of design principles, practical patterns and high quality design
|
||||
|
@ -65,7 +65,7 @@ class App extends React.Component {
|
||||
...this.state.comments,
|
||||
{
|
||||
author: 'Han Solo',
|
||||
avatar: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png',
|
||||
avatar: 'https://joeschmoe.io/api/v1/random',
|
||||
content: <p>{this.state.value}</p>,
|
||||
datetime: moment().fromNow(),
|
||||
},
|
||||
@ -87,12 +87,7 @@ class App extends React.Component {
|
||||
<>
|
||||
{comments.length > 0 && <CommentList comments={comments} />}
|
||||
<Comment
|
||||
avatar={
|
||||
<Avatar
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
alt="Han Solo"
|
||||
/>
|
||||
}
|
||||
avatar={<Avatar src="https://joeschmoe.io/api/v1/random" alt="Han Solo" />}
|
||||
content={
|
||||
<Editor
|
||||
onChange={this.handleChange}
|
||||
|
@ -21,7 +21,7 @@ const data = [
|
||||
{
|
||||
actions: [<span key="comment-list-reply-to-0">Reply to</span>],
|
||||
author: 'Han Solo',
|
||||
avatar: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png',
|
||||
avatar: 'https://joeschmoe.io/api/v1/random',
|
||||
content: (
|
||||
<p>
|
||||
We supply a series of design principles, practical patterns and high quality design
|
||||
@ -38,7 +38,7 @@ const data = [
|
||||
{
|
||||
actions: [<span key="comment-list-reply-to-0">Reply to</span>],
|
||||
author: 'Han Solo',
|
||||
avatar: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png',
|
||||
avatar: 'https://joeschmoe.io/api/v1/random',
|
||||
content: (
|
||||
<p>
|
||||
We supply a series of design principles, practical patterns and high quality design
|
||||
|
@ -20,12 +20,7 @@ const ExampleComment = ({ children }) => (
|
||||
<Comment
|
||||
actions={[<span key="comment-nested-reply-to">Reply to</span>]}
|
||||
author={<a>Han Solo</a>}
|
||||
avatar={
|
||||
<Avatar
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
alt="Han Solo"
|
||||
/>
|
||||
}
|
||||
avatar={<Avatar src="https://joeschmoe.io/api/v1/random" alt="Han Solo" />}
|
||||
content={
|
||||
<p>
|
||||
We supply a series of design principles, practical patterns and high quality design
|
||||
|
@ -14852,7 +14852,7 @@ exports[`ConfigProvider components List configProvider 1`] = `
|
||||
class="config-avatar config-avatar-circle config-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@ -14904,7 +14904,7 @@ exports[`ConfigProvider components List configProvider componentSize large 1`] =
|
||||
class="config-avatar config-avatar-circle config-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@ -14956,7 +14956,7 @@ exports[`ConfigProvider components List configProvider componentSize middle 1`]
|
||||
class="config-avatar config-avatar-circle config-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@ -15008,7 +15008,7 @@ exports[`ConfigProvider components List configProvider virtual and dropdownMatch
|
||||
class="ant-avatar ant-avatar-circle ant-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@ -15060,7 +15060,7 @@ exports[`ConfigProvider components List normal 1`] = `
|
||||
class="ant-avatar ant-avatar-circle ant-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@ -15112,7 +15112,7 @@ exports[`ConfigProvider components List prefixCls 1`] = `
|
||||
class="ant-avatar ant-avatar-circle ant-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -362,9 +362,7 @@ describe('ConfigProvider', () => {
|
||||
<List.Item {...props}>
|
||||
<List.Item.Meta
|
||||
{...props}
|
||||
avatar={
|
||||
<Avatar src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />
|
||||
}
|
||||
avatar={<Avatar src="https://joeschmoe.io/api/v1/random" />}
|
||||
title="Ant Design"
|
||||
description="Ant Design, a design language for background applications, is refined by Ant UED Team"
|
||||
/>
|
||||
|
@ -9,7 +9,7 @@ describe('List Item Layout', () => {
|
||||
key: 1,
|
||||
href: 'https://ant.design',
|
||||
title: `ant design`,
|
||||
avatar: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png',
|
||||
avatar: 'https://joeschmoe.io/api/v1/random',
|
||||
description:
|
||||
'Ant Design, a design language for background applications, is refined by Ant UED Team.',
|
||||
content:
|
||||
|
@ -26,7 +26,7 @@ exports[`renders ./components/list/demo/basic.md correctly 1`] = `
|
||||
class="ant-avatar ant-avatar-circle ant-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@ -63,7 +63,7 @@ exports[`renders ./components/list/demo/basic.md correctly 1`] = `
|
||||
class="ant-avatar ant-avatar-circle ant-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@ -100,7 +100,7 @@ exports[`renders ./components/list/demo/basic.md correctly 1`] = `
|
||||
class="ant-avatar ant-avatar-circle ant-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@ -137,7 +137,7 @@ exports[`renders ./components/list/demo/basic.md correctly 1`] = `
|
||||
class="ant-avatar ant-avatar-circle ant-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@ -1658,7 +1658,7 @@ exports[`renders ./components/list/demo/vertical.md correctly 1`] = `
|
||||
class="ant-avatar ant-avatar-circle ant-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@ -1824,7 +1824,7 @@ exports[`renders ./components/list/demo/vertical.md correctly 1`] = `
|
||||
class="ant-avatar ant-avatar-circle ant-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@ -1990,7 +1990,7 @@ exports[`renders ./components/list/demo/vertical.md correctly 1`] = `
|
||||
class="ant-avatar ant-avatar-circle ant-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -38,7 +38,7 @@ ReactDOM.render(
|
||||
renderItem={item => (
|
||||
<List.Item>
|
||||
<List.Item.Meta
|
||||
avatar={<Avatar src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />}
|
||||
avatar={<Avatar src="https://joeschmoe.io/api/v1/random" />}
|
||||
title={<a href="https://ant.design">{item.title}</a>}
|
||||
description="Ant Design, a design language for background applications, is refined by Ant UED Team"
|
||||
/>
|
||||
|
@ -27,7 +27,7 @@ const InfiniteListExample = () => {
|
||||
return;
|
||||
}
|
||||
setLoading(true);
|
||||
fetch('https://randomuser.me/api/?results=10&inc=name,gender,email,nat&noinfo')
|
||||
fetch('https://randomuser.me/api/?results=10&inc=name,gender,email,nat,picture&noinfo')
|
||||
.then(res => res.json())
|
||||
.then(body => {
|
||||
setData([...data, ...body.results]);
|
||||
@ -65,9 +65,7 @@ const InfiniteListExample = () => {
|
||||
renderItem={item => (
|
||||
<List.Item key={item.id}>
|
||||
<List.Item.Meta
|
||||
avatar={
|
||||
<Avatar src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />
|
||||
}
|
||||
avatar={<Avatar src={item.picture.large} />}
|
||||
title={<a href="https://ant.design">{item.name.last}</a>}
|
||||
description={item.email}
|
||||
/>
|
||||
|
@ -25,7 +25,7 @@ import AutoSizer from 'react-virtualized/dist/commonjs/AutoSizer';
|
||||
import VList from 'react-virtualized/dist/commonjs/List';
|
||||
import InfiniteLoader from 'react-virtualized/dist/commonjs/InfiniteLoader';
|
||||
|
||||
const fakeDataUrl = 'https://randomuser.me/api/?results=5&inc=name,gender,email,nat&noinfo';
|
||||
const fakeDataUrl = 'https://randomuser.me/api/?results=5&inc=name,gender,email,nat,picture&noinfo';
|
||||
|
||||
class VirtualizedExample extends React.Component {
|
||||
state = {
|
||||
@ -88,7 +88,7 @@ class VirtualizedExample extends React.Component {
|
||||
return (
|
||||
<List.Item key={key} style={style}>
|
||||
<List.Item.Meta
|
||||
avatar={<Avatar src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />}
|
||||
avatar={<Avatar src={item.picture.large} />}
|
||||
title={<a href="https://ant.design">{item.name.last}</a>}
|
||||
description={item.email}
|
||||
/>
|
||||
|
@ -18,7 +18,7 @@ import { List, Avatar, Button, Skeleton } from 'antd';
|
||||
import reqwest from 'reqwest';
|
||||
|
||||
const count = 3;
|
||||
const fakeDataUrl = `https://randomuser.me/api/?results=${count}&inc=name,gender,email,nat&noinfo`;
|
||||
const fakeDataUrl = `https://randomuser.me/api/?results=${count}&inc=name,gender,email,nat,picture&noinfo`;
|
||||
|
||||
class LoadMoreList extends React.Component {
|
||||
state = {
|
||||
@ -102,9 +102,7 @@ class LoadMoreList extends React.Component {
|
||||
>
|
||||
<Skeleton avatar title={false} loading={item.loading} active>
|
||||
<List.Item.Meta
|
||||
avatar={
|
||||
<Avatar src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />
|
||||
}
|
||||
avatar={<Avatar src={item.picture.large} />}
|
||||
title={<a href="https://ant.design">{item.name.last}</a>}
|
||||
description="Ant Design, a design language for background applications, is refined by Ant UED Team"
|
||||
/>
|
||||
|
@ -22,7 +22,7 @@ for (let i = 0; i < 23; i++) {
|
||||
listData.push({
|
||||
href: 'https://ant.design',
|
||||
title: `ant design part ${i}`,
|
||||
avatar: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png',
|
||||
avatar: 'https://joeschmoe.io/api/v1/random',
|
||||
description:
|
||||
'Ant Design, a design language for background applications, is refined by Ant UED Team.',
|
||||
content:
|
||||
|
@ -22,7 +22,7 @@ for (let i = 0; i < 3; i++) {
|
||||
listData.push({
|
||||
href: 'https://ant.design',
|
||||
title: `ant design part ${i}`,
|
||||
avatar: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png',
|
||||
avatar: 'https://joeschmoe.io/api/v1/random',
|
||||
description:
|
||||
'Ant Design, a design language for background applications, is refined by Ant UED Team.',
|
||||
content:
|
||||
|
Loading…
Reference in New Issue
Block a user