Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wanjj_1210
ant-design
提交
49e8672e
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,发现更多精彩内容 >>
提交
49e8672e
编写于
10月 31, 2018
作者:
I
ilanus
提交者:
偏右
11月 03, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
🚨
linting comment
上级
88a3737e
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
77 addition
and
76 deletion
+77
-76
components/comment/__tests__/__snapshots__/demo.test.js.snap
components/comment/__tests__/__snapshots__/demo.test.js.snap
+56
-54
components/comment/__tests__/demo.test.js
components/comment/__tests__/demo.test.js
+1
-1
components/comment/demo/basic.md
components/comment/demo/basic.md
+7
-7
components/comment/demo/editor.md
components/comment/demo/editor.md
+9
-9
components/comment/demo/list.md
components/comment/demo/list.md
+1
-1
components/comment/demo/nested.md
components/comment/demo/nested.md
+3
-4
未找到文件。
components/comment/__tests__/__snapshots__/demo.test.js.snap
浏览文件 @
49e8672e
...
...
@@ -117,84 +117,86 @@ exports[`renders ./components/comment/demo/basic.md correctly 1`] = `
exports[`renders ./components/comment/demo/editor.md correctly 1`] = `
<div>
<div
class="ant-comment"
>
<div>
<div
class="ant-comment
-inner
"
class="ant-comment"
>
<div
class="ant-comment-avatar"
>
<span
class="ant-avatar ant-avatar-circle ant-avatar-image"
>
<img
alt="Han Solo"
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
/>
</span>
</div>
<div
class="ant-comment-content"
class="ant-comment-inner"
>
<div
class="ant-comment-content-author"
/>
class="ant-comment-avatar"
>
<span
class="ant-avatar ant-avatar-circle ant-avatar-image"
>
<img
alt="Han Solo"
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
/>
</span>
</div>
<div
class="ant-comment-content
-detail
"
class="ant-comment-content"
>
<form
class="ant-form ant-form-horizontal"
<div
class="ant-comment-content-author"
/>
<div
class="ant-comment-content-detail"
>
<
div
class="ant-
row ant-form-item
"
<
form
class="ant-
form ant-form-horizontal
"
>
<div
class="ant-
form-item-control-wrapper
"
class="ant-
row ant-form-item
"
>
<div
class="ant-form-item-control"
class="ant-form-item-control
-wrapper
"
>
<
span
class="ant-form-item-c
hildren
"
<
div
class="ant-form-item-c
ontrol
"
>
<textarea
class="ant-input"
data-__field="[object Object]"
data-__meta="[object Object]"
id="message"
rows="4"
/>
</span>
<span
class="ant-form-item-children"
>
<textarea
class="ant-input"
data-__field="[object Object]"
data-__meta="[object Object]"
id="message"
rows="4"
/>
</span>
</div>
</div>
</div>
</div>
<div
class="ant-row ant-form-item"
>
<div
class="ant-
form-item-control-wrapper
"
class="ant-
row ant-form-item
"
>
<div
class="ant-form-item-control"
class="ant-form-item-control
-wrapper
"
>
<
span
class="ant-form-item-c
hildren
"
<
div
class="ant-form-item-c
ontrol
"
>
<button
class="ant-btn ant-btn-primary"
type="submit"
<span
class="ant-form-item-children"
>
<span>
Add Comment
</span>
</button>
</span>
<button
class="ant-btn ant-btn-primary"
type="submit"
>
<span>
Add Comment
</span>
</button>
</span>
</div>
</div>
</div>
</
div
>
</
form
>
</
form
>
</
div
>
</div>
</div>
</div>
...
...
components/comment/__tests__/demo.test.js
浏览文件 @
49e8672e
import
demoTest
from
'
../../../tests/shared/demoTest
'
;
demoTest
(
'
comment
'
);
demoTest
(
'
comment
'
);
components/comment/demo/basic.md
浏览文件 @
49e8672e
...
...
@@ -37,7 +37,7 @@ class App extends React.Component {
likes
:
0
,
dislikes
:
1
,
action
:
'
disliked
'
,
})
})
;
}
render
()
{
...
...
@@ -75,20 +75,20 @@ class App extends React.Component {
<
Comment
actions
=
{
actions
}
author
=
{
<
a
>
Han Solo
</
a
>
}
avatar
=
{
avatar
=
{
(
<
Avatar
src
=
"https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
alt
=
"Han Solo"
/>
}
content
=
{
)
}
content
=
{
(
<
p
>
We supply a series of design principles, practical patterns and high quality design resources (Sketch and Axure), to help people create their product prototypes beautifully and efficiently.
</
p
>
}
datetime
=
{
)
}
datetime
=
{
(
<
Tooltip
title
=
{
moment
().
format
(
'
YYYY-MM-DD HH:mm:ss
'
)
}
>
<
span
>
{
moment
().
fromNow
()
}
</
span
>
</
Tooltip
>
}
)
}
/>
);
}
...
...
components/comment/demo/editor.md
浏览文件 @
49e8672e
...
...
@@ -14,7 +14,7 @@ title:
Comment can be used as editor, user can customize the editor component.
````
jsx
import
{
Comment
,
Icon
,
Tooltip
,
Avatar
,
Form
,
Button
,
List
,
Input
}
from
'
antd
'
;
import
{
Comment
,
Avatar
,
Form
,
Button
,
List
,
Input
}
from
'
antd
'
;
import
moment
from
'
moment
'
;
const
FormItem
=
Form
.
Item
;
...
...
@@ -49,7 +49,7 @@ class Editor extends React.Component {
}
render
()
{
const
{
getFieldDecorator
,
getFieldsError
,
getFieldError
,
isFieldTouched
}
=
this
.
props
.
form
;
const
{
getFieldDecorator
,
getFieldsError
}
=
this
.
props
.
form
;
return
(
<
Form
onSubmit
=
{
this
.
handleSubmit
}
>
...
...
@@ -99,7 +99,7 @@ class App extends React.Component {
datetime
:
moment
().
fromNow
(),
},
...
this
.
state
.
comments
,
]
]
,
});
if
(
cb
)
cb
();
},
1000
);
...
...
@@ -107,27 +107,27 @@ class App extends React.Component {
render
()
{
return
(
<
React
.
Fragment
>
<
div
>
{
this
.
state
.
comments
.
length
>
0
&&
(
<
CommentList
comments
=
{
this
.
state
.
comments
}
/>
)
}
<
Comment
avatar
=
{
avatar
=
{
(
<
Avatar
src
=
"https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
alt
=
"Han Solo"
/>
}
content
=
{
)
}
content
=
{
(
<
EditorForm
submitting
=
{
this
.
state
.
submitting
}
onSubmit
=
{
this
.
handleSubmit
}
/>
}
)
}
/>
</
React
.
Fragment
>
</
div
>
);
}
}
...
...
components/comment/demo/list.md
浏览文件 @
49e8672e
...
...
@@ -14,7 +14,7 @@ title:
A basic comment used with
`antd`
List component to render a series of comments.
````
jsx
import
{
Comment
,
Icon
,
Tooltip
,
List
}
from
'
antd
'
;
import
{
Comment
,
Tooltip
,
List
}
from
'
antd
'
;
import
moment
from
'
moment
'
;
const
data
=
[
...
...
components/comment/demo/nested.md
浏览文件 @
49e8672e
...
...
@@ -14,20 +14,19 @@ title:
Comment can be nested
````
jsx
import
{
Comment
,
Icon
,
Tooltip
,
Avatar
}
from
'
antd
'
;
import
moment
from
'
moment
'
;
import
{
Comment
,
Avatar
}
from
'
antd
'
;
function
ExampleComment
({
children
})
{
return
(
<
Comment
actions
=
{
[<
span
>
Reply to
</
span
>]
}
author
=
{
<
a
>
Han Solo
</
a
>
}
avatar
=
{
avatar
=
{
(
<
Avatar
src
=
"https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
alt
=
"Han Solo"
/>
}
)
}
content
=
{
<
p
>
We supply a series of design principles, practical patterns and high quality design resources (Sketch and Axure).
</
p
>
}
>
{
children
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录