Skip to content

Commit

Permalink
fix: 1.31 反馈意见修改
Browse files Browse the repository at this point in the history
  • Loading branch information
JavanCheng committed Feb 2, 2023
1 parent f11c86f commit 79f3101
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 16 deletions.
2 changes: 2 additions & 0 deletions src/pages/CatMessage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const CatMessage: React.FC = () => {
...CAT_MESSAGE_COLUMNS,
{
...OPERATIONS,
width: 150,
render: (_, record) => (
<>
<Button
Expand Down Expand Up @@ -122,6 +123,7 @@ const CatMessage: React.FC = () => {
}}
pagination={{
pageSize: 10,
showSizeChanger: false,
}}
/>
<View open={viewVisible} setViewVisible={setViewVisible} currentCat={currentCat} />
Expand Down
21 changes: 5 additions & 16 deletions src/pages/CatMessage/settings.tsx
Original file line number Diff line number Diff line change
@@ -1,36 +1,28 @@
import { NAME } from '@/pages/commonSettings';
import { ProColumns } from '@ant-design/pro-components';
import { Avatar, Badge, Space } from 'antd';
import { Avatar } from 'antd';

const MAX_ORDER = 10;

export const AVATAR_IMG: ProColumns = {
title: '缩略图',
dataIndex: 'avatarUrl',
hideInSearch: true,
width: 80,
render: (_) => <Avatar src={_} size={40}></Avatar>,
};

export const COLOR: ProColumns = {
title: '花色',
dataIndex: 'color',
width: 80,
hideInSearch: true,
};

export const AREA: ProColumns = {
title: '出没区域',
dataIndex: 'area',
};

export const IS_COLLECTED: ProColumns = {
title: '是否收录',
dataIndex: 'isCollected',
hideInSearch: true,
render: (_) => (
<Space>
<Badge status={_ ? 'success' : 'error'} text={_ ? '是' : '否'} />
</Space>
),
width: 200,
};

export const CAT_MESSAGE_COLUMNS = [
Expand All @@ -41,6 +33,7 @@ export const CAT_MESSAGE_COLUMNS = [
{
order: MAX_ORDER + 8,
...NAME,
width: 80,
},
{
order: MAX_ORDER + 6,
Expand All @@ -50,8 +43,4 @@ export const CAT_MESSAGE_COLUMNS = [
order: MAX_ORDER + 4,
...AREA,
},
// {
// order: MAX_ORDER + 2,
// ...IS_COLLECTED,
// },
];
1 change: 1 addition & 0 deletions src/pages/News/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ const News = () => {
}}
pagination={{
pageSize: 10,
showSizeChanger: false,
}}
/>
<View open={viewVisible} setViewVisible={setViewVisible} currentNew={currentNew} />
Expand Down
1 change: 1 addition & 0 deletions src/pages/Notice/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ const Notice: React.FC = () => {
columns={columns}
pagination={{
pageSize: 20,
showSizeChanger: false,
}}
/>
<Create open={createVisible} setCreateVisible={setCreateVisible} actionRef={actionRef} />
Expand Down

0 comments on commit 79f3101

Please sign in to comment.