fix issue

pull/330/head
vapao 2021-03-28 10:27:33 +08:00
parent 3a0aa86797
commit a1c42a312f
3 changed files with 20 additions and 8 deletions

View File

@ -1,6 +1,6 @@
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import { Button, Card, List, Modal, Form, Input, Switch, Divider, Badge } from 'antd'; import { Button, Card, List, Modal, Form, Input, Switch, Divider, Tag } from 'antd';
import { DownSquareOutlined, PlusOutlined, UpSquareOutlined } from '@ant-design/icons'; import { DownSquareOutlined, PlusOutlined, UpSquareOutlined, SoundOutlined } from '@ant-design/icons';
import { http } from 'libs'; import { http } from 'libs';
import styles from "./index.module.less"; import styles from "./index.module.less";
@ -80,9 +80,10 @@ function NoticeIndex(props) {
) : ( ) : (
<List> <List>
{records.map(item => ( {records.map(item => (
<List.Item key={item.id} onClick={() => setNotice(item)}> <List.Item key={item.id} className={styles.item} onClick={() => setNotice(item)}>
<Badge dot={!item.read_ids.includes(id)}><span className={styles.title}>{item.title}</span></Badge> {!item.read_ids.includes(id) && <SoundOutlined style={{color: '#ff4d4f', marginRight: 4}} />}
<span style={{fontSize: 12, color: '#999'}}>{item.created_at.substr(0, 10)}</span> <span className={styles.title}>{item.title}</span>
<span className={styles.date}>{item.created_at.substr(0, 10)}</span>
</List.Item> </List.Item>
))} ))}
{records.length === 0 && ( {records.length === 0 && (

View File

@ -3,7 +3,7 @@ import { Button, Card, List } from 'antd';
function TodoIndex(props) { function TodoIndex(props) {
return ( return (
<Card title="待办事项" bodyStyle={{height: 220, padding: '0 24px'}}> <Card title="待办事项" bodyStyle={{height: 234, padding: '0 24px'}}>
<List> <List>
<List.Item extra={<Button type="link">已完成</Button>}> </List.Item> <List.Item extra={<Button type="link">已完成</Button>}> </List.Item>
<List.Item>工单 资源添加 需要你审核</List.Item> <List.Item>工单 资源添加 需要你审核</List.Item>

View File

@ -1,7 +1,8 @@
.notice { .notice {
:global(.ant-card-body) { :global(.ant-card-body) {
height: 220px; height: 234px;
padding: 0 24px; padding: 0 24px;
overflow: auto;
} }
button { button {
@ -9,17 +10,27 @@
} }
.title { .title {
flex: 1;
cursor: pointer; cursor: pointer;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.title:hover { .title:hover {
color: #1890ff color: #1890ff
} }
.badge {
overflow: hidden;
}
.date {
display: inline-block;
font-size: 12px;
color: #999;
}
.add { .add {
display: flex; display: flex;
justify-content: center; justify-content: center;