11import React from 'react'
2- import TimeAgo from 'timeago-react'
32
4- import { cutFrom } from '../../utils'
53import {
64 Pagi ,
75 Table ,
@@ -11,6 +9,7 @@ import {
119 UserCell ,
1210 CommunityCell ,
1311 TagsCell ,
12+ TimeStampCell ,
1413} from '../../components'
1514
1615import { OperationWrapper } from './styles'
@@ -27,21 +26,21 @@ const columns = [
2726 } ,
2827 {
2928 title : '标题' ,
30- width : 300 ,
29+ width : 250 ,
3130 dataIndex : 'title' ,
32- align : 'center ' ,
31+ align : 'left ' ,
3332 fixed : 'left' ,
3433 render : text => {
35- return < div > { cutFrom ( text , 15 ) } </ div >
34+ return < div > { text } </ div >
3635 } ,
3736 } ,
3837 {
3938 title : '摘要' ,
40- width : 400 ,
39+ width : 300 ,
4140 dataIndex : 'digest' ,
4241 align : 'center' ,
4342 render : text => {
44- return < div > { cutFrom ( text , 10 ) } </ div >
43+ return < div > { text } </ div >
4544 } ,
4645 } ,
4746 {
@@ -91,47 +90,29 @@ const columns = [
9190 dataIndex : 'views' ,
9291 align : 'center' ,
9392 } ,
94- {
95- title : '收藏' ,
96- width : 100 ,
97- dataIndex : 'favoritedCount' ,
98- align : 'center' ,
99- } ,
100- {
101- title : '点赞' ,
102- width : 100 ,
103- dataIndex : 'starredCount' ,
104- align : 'center' ,
105- } ,
10693 {
10794 title : '评论数' ,
10895 width : 100 ,
10996 dataIndex : 'commentsCount' ,
11097 align : 'center' ,
11198 } ,
11299 {
113- title : '评论参与 ' ,
114- width : 150 ,
115- dataIndex : 'commentsParticipatorsCount ' ,
100+ title : '收藏 ' ,
101+ width : 100 ,
102+ dataIndex : 'favoritedCount ' ,
116103 align : 'center' ,
117104 } ,
118105 {
119- title : '创建时间 ' ,
120- width : 150 ,
121- dataIndex : 'insertedAt ' ,
106+ title : '点赞 ' ,
107+ width : 100 ,
108+ dataIndex : 'starredCount ' ,
122109 align : 'center' ,
123- render : text => {
124- return < TimeAgo datetime = { text } locale = "zh_CN" />
125- } ,
126110 } ,
127111 {
128- title : '上次更新' ,
129- width : 150 ,
130- dataIndex : 'updatedAt' ,
112+ title : '时间戳' ,
113+ width : 120 ,
131114 align : 'center' ,
132- render : text => {
133- return < TimeAgo datetime = { text } locale = "zh_CN" />
134- } ,
115+ render : ( text , record ) => < TimeStampCell data = { record } /> ,
135116 } ,
136117 {
137118 title : '操作' ,
0 commit comments