mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-05 05:28:20 +08:00
33 lines
815 B
TypeScript
33 lines
815 B
TypeScript
|
import React, { useState } from 'react';
|
||
|
import { Button, Image, Space } from 'antd';
|
||
|
|
||
|
const App: React.FC = () => {
|
||
|
const [random, setRandom] = useState<number>();
|
||
|
|
||
|
return (
|
||
|
<Space size={12}>
|
||
|
<Image
|
||
|
width={200}
|
||
|
src={`https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png?${random}`}
|
||
|
placeholder={
|
||
|
<Image
|
||
|
preview={false}
|
||
|
src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png?x-oss-process=image/blur,r_50,s_50/quality,q_1/resize,m_mfit,h_200,w_200"
|
||
|
width={200}
|
||
|
/>
|
||
|
}
|
||
|
/>
|
||
|
<Button
|
||
|
type="primary"
|
||
|
onClick={() => {
|
||
|
setRandom(Date.now());
|
||
|
}}
|
||
|
>
|
||
|
Reload
|
||
|
</Button>
|
||
|
</Space>
|
||
|
);
|
||
|
};
|
||
|
|
||
|
export default App;
|