|
@@ -22,6 +22,7 @@ import { useClassify } from '@/hooks/tieba/index';
|
|
|
import type { initstateType, actionType } from './data';
|
|
|
|
|
|
import DetailModal from './modal';
|
|
|
+import { Record } from 'immutable';
|
|
|
|
|
|
const request = (url: string): Promise<any> => {
|
|
|
return new Promise((resolve, reject) => {
|
|
@@ -216,7 +217,18 @@ const Posts: React.FC = () => {
|
|
|
dataSource={postsList}
|
|
|
pagination={{ total, onChange: (page) => dispatch({ type: 'curPage', value: page }) }}
|
|
|
>
|
|
|
- <Table.Column key="label" dataIndex="label" title="帖子标题"></Table.Column>
|
|
|
+ <Table.Column
|
|
|
+ key="label"
|
|
|
+ dataIndex="label"
|
|
|
+ title="帖子标题"
|
|
|
+ ellipsis
|
|
|
+ width={200}
|
|
|
+ render={(text, record) => (
|
|
|
+ <Tooltip title={'pagesarticle'} placement="topLeft">
|
|
|
+ <span>{text}</span>
|
|
|
+ </Tooltip>
|
|
|
+ )}
|
|
|
+ />
|
|
|
<Table.Column
|
|
|
key="content"
|
|
|
width={320}
|
|
@@ -244,6 +256,23 @@ const Posts: React.FC = () => {
|
|
|
/>
|
|
|
<Table.Column key="replyNum" dataIndex="replyNum" title="回帖数"></Table.Column>
|
|
|
<Table.Column key="praiseNum" dataIndex="praiseNum" title="点赞数"></Table.Column>
|
|
|
+ <Table.Column
|
|
|
+ key="path"
|
|
|
+ dataIndex="path"
|
|
|
+ title="链接地址"
|
|
|
+ render={(text, record: Record<string, any>) => (
|
|
|
+ <Tooltip
|
|
|
+ title={
|
|
|
+ record.hasOwnProperty('coverImg')
|
|
|
+ ? `/pages/article/index?id=${record.id}&type=POSTS`
|
|
|
+ : `/pages/article/index?id=${record.id}&type=ISSUES`
|
|
|
+ }
|
|
|
+ placement="topLeft"
|
|
|
+ >
|
|
|
+ <span>/pages/article/index....</span>
|
|
|
+ </Tooltip>
|
|
|
+ )}
|
|
|
+ />
|
|
|
<Table.Column
|
|
|
key="action"
|
|
|
dataIndex="action"
|