fix: text overflow

This commit is contained in:
lbaf23 2021-08-14 14:30:52 +08:00
parent 73c7e91891
commit a0b9bf3295
2 changed files with 8 additions and 2 deletions

View File

@ -1,7 +1,6 @@
import React, {useEffect, useState} from 'react';
import {Card, Col, Divider, Empty, Image, Input, Pagination, Row, Select, Spin, Tag} from 'antd';
import {EyeOutlined, TeamOutlined} from '@ant-design/icons';
import {Link} from 'react-router-dom';
import './project-list.less';
import ProjectListApi from '../../../api/ProjectListApi'
@ -211,7 +210,8 @@ function ProjectList(obj) {
}
description={
<div>
{item.subjects === '' ? '无' : item.subjects}
<span className="des-text">{item.subjects === '' ? '--' : item.subjects}</span><br/>
<span className="des-text">{item.skills === '' ? '--' : item.skills}</span>
{item.learning ?
<Tag color="geekblue" style={{zIndex: '999', float: 'right'}}>学习中</Tag> : null}
{item.teacherId === uid && type === 'teacher' ?

View File

@ -17,3 +17,9 @@
position: absolute;
bottom: 0;
}
.des-text {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}