fix: 项目简介多行文本溢出

This commit is contained in:
zwjamnsss 2017-07-26 10:26:15 +08:00
parent a59696c565
commit 3ee8cc356f
4 changed files with 26 additions and 3 deletions

View File

@ -7,8 +7,10 @@ import {
GET_INTERFACE_REQ_PARAMS,
GET_INTERFACE_RES_PARAMS,
PUSH_INTERFACE_NAME,
PUSH_INTERFACE_METHOD
PUSH_INTERFACE_METHOD,
FETCH_INTERFACE_PROJECT
} from '../constants/action-types.js'
import axios from 'axios'
export function pushInputValue (value) {
return {
@ -72,3 +74,10 @@ export function pushInterfaceMethod (value) {
payload: value
}
}
export function fetchInterfaceProject(id) {
return {
type: FETCH_INTERFACE_PROJECT,
payload: axios.get('/project/get', { params: {id}})
}
}

View File

@ -111,6 +111,7 @@ export default class InterfaceTest extends Component {
</div>
<Button onClick={this.testInterface}>发送跨域请求</Button>
<div>
返回结果
{JSON.stringify(this.state.res, 2)}
</div>
</div>

View File

@ -203,11 +203,11 @@ export default class GroupList extends Component {
<div className="group-bar">
<div className="curr-group">
<div className="curr-group-name">
{currGroup.group_name}
<div className="text" title={currGroup.group_name}>{currGroup.group_name}</div>
<Icon className="edit-group" type="edit" title="编辑分组" onClick={() => this.showModal(TYPE_EDIT)}/>
<Icon className="delete-group" type="delete" title="删除分组" onClick={this.deleteGroup}/>
</div>
<div className="curr-group-desc">简介{currGroup.group_desc}</div>
<div className="curr-group-desc" title={currGroup.group_desc}>简介{currGroup.group_desc}</div>
</div>
<div className="group-operate">
<div className="search">

View File

@ -5,12 +5,25 @@
border-radius: 4px 4px 0 0;
padding: 32px 24px;
.curr-group-name {
.text {
display: inline-block;
overflow:hidden;
white-space:nowrap;
text-overflow:ellipsis;
max-width: 150px;
}
color: #fff;
font-size: 24px;
}
.curr-group-desc {
color: #fff;
font-size: 12px;
max-height: 54px;
text-overflow:ellipsis;
overflow:hidden;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
display: -webkit-box;
}
.delete-group, .edit-group {
font-size: 18px;