Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wanjj_1210
ant-design
提交
39cf26f4
A
ant-design
项目概览
wanjj_1210
/
ant-design
与 Fork 源项目一致
从无法访问的项目Fork
通知
10
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
ant-design
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
39cf26f4
编写于
9月 30, 2020
作者:
X
xrk
提交者:
GitHub
9月 30, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
docs: update image demo (#26962)
上级
26c5c6e5
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
38 addition
and
31 deletion
+38
-31
components/image/__tests__/__snapshots__/demo.test.js.snap
components/image/__tests__/__snapshots__/demo.test.js.snap
+35
-25
components/image/demo/placeholder.md
components/image/demo/placeholder.md
+3
-6
未找到文件。
components/image/__tests__/__snapshots__/demo.test.js.snap
浏览文件 @
39cf26f4
...
...
@@ -26,38 +26,48 @@ exports[`renders ./components/image/demo/fallback.md correctly 1`] = `
`;
exports[`renders ./components/image/demo/placeholder.md correctly 1`] = `
Array [
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
<div
class="ant-
image
"
style="
width:200
px"
class="ant-
space-item
"
style="
margin-right:12
px"
>
<img
class="ant-image-img"
src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png?undefined"
/>
<div
aria-hidden="tru
e"
class="ant-image-placeholder
"
class="ant-imag
e"
style="width:200px
"
>
<img
class="ant-image-img"
src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png?undefined"
/>
<div
class="ant-imag
e"
style="width:200px
"
aria-hidden="tru
e"
class="ant-image-placeholder
"
>
<img
class="ant-image-img"
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"
/>
<div
class="ant-image"
style="width:200px"
>
<img
class="ant-image-img"
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"
/>
</div>
</div>
</div>
</div>,
<button
class="ant-btn ant-btn-primary"
style="margin-left:10px"
type="button"
</div>
<div
class="ant-space-item"
>
<span>
Reload
</span>
</button>,
]
<button
class="ant-btn ant-btn-primary"
type="button"
>
<span>
Reload
</span>
</button>
</div>
</div>
`;
components/image/demo/placeholder.md
浏览文件 @
39cf26f4
...
...
@@ -15,12 +15,12 @@ Progressive when large image loading.
```
jsx
import
React
from
'
react
'
;
import
{
Image
,
Button
}
from
'
antd
'
;
import
{
Image
,
Button
,
Space
}
from
'
antd
'
;
function
ImageDemo
()
{
const
[
random
,
setRandom
]
=
React
.
useState
();
return
(
<>
<
Space
size
=
{
12
}
>
<
Image
width
=
{
200
}
src
=
{
`https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png?
${
random
}
`
}
...
...
@@ -33,16 +33,13 @@ function ImageDemo() {
/>
<
Button
type
=
"primary"
style
=
{
{
marginLeft
:
10
,
}
}
onClick
=
{
()
=>
{
setRandom
(
Date
.
now
());
}
}
>
Reload
</
Button
>
</>
</
Space
>
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录