mirror of
https://github.com/YMFE/yapi.git
synced 2025-01-30 13:20:24 +08:00
opti: 优化项目列表header
This commit is contained in:
parent
c037476cfc
commit
3ca71f2234
@ -1,10 +1,10 @@
|
|||||||
import React, { Component } from 'react'
|
import React, { Component } from 'react'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import { connect } from 'react-redux'
|
import { connect } from 'react-redux'
|
||||||
import { Button, Icon, Modal, Alert, Input, message, Menu, Row, Col } from 'antd'
|
import { Icon, Modal, Alert, Input, message, Menu, Row, Col } from 'antd'
|
||||||
import { autobind } from 'core-decorators';
|
import { autobind } from 'core-decorators';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { withRouter, Link } from 'react-router-dom';
|
import { withRouter } from 'react-router-dom';
|
||||||
const { TextArea } = Input;
|
const { TextArea } = Input;
|
||||||
const Search = Input.Search;
|
const Search = Input.Search;
|
||||||
const TYPE_EDIT = 'edit';
|
const TYPE_EDIT = 'edit';
|
||||||
@ -223,9 +223,9 @@ export default class GroupList extends Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { currGroup } = this.props;
|
const { currGroup } = this.props;
|
||||||
const delmark = <Icon className="edit-group" type="edit" title="编辑分组" onClick={() => this.showModal(TYPE_EDIT)} />
|
const delmark = <Icon className="edit-group" type="edit" title="编辑分组" onClick={() => this.showModal(TYPE_EDIT)} />
|
||||||
const editmark = <Icon className="delete-group" onClick={() => { this.showConfirm() }} type="delete" title="删除分组" />
|
const editmark = <Icon className="delete-group" onClick={() => { this.showConfirm() }} type="delete" title="删除分组" />
|
||||||
const addmark = <Icon className="edit-group" onClick={this.showModal} type="plus" title="删除分组" />
|
const addmark = <Icon className="edit-group" onClick={this.showModal} type="plus" title="添加分组" />
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -251,10 +251,6 @@ export default class GroupList extends Component {
|
|||||||
<div className="search">
|
<div className="search">
|
||||||
<Search placeholder="Filter by name" onChange={this.searchGroup} onSearch={(v) => this.searchGroup(null, v)} />
|
<Search placeholder="Filter by name" onChange={this.searchGroup} onSearch={(v) => this.searchGroup(null, v)} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Link to="/add-project"> <Button type="primary" >添加项目</Button></Link>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<Menu
|
<Menu
|
||||||
className="group-list"
|
className="group-list"
|
||||||
|
@ -101,7 +101,7 @@ class ProjectList extends Component {
|
|||||||
render() {
|
render() {
|
||||||
const projectData = this.state.projectData;
|
const projectData = this.state.projectData;
|
||||||
return (
|
return (
|
||||||
<div style={{paddingTop: '15px'}} className="m-panel card-panel card-panel-s project-list" >
|
<div style={{paddingTop: '20px'}} className="m-panel card-panel card-panel-s project-list" >
|
||||||
<Row className="project-list-header">
|
<Row className="project-list-header">
|
||||||
<Col span={16} style={{textAlign: 'left'}}>
|
<Col span={16} style={{textAlign: 'left'}}>
|
||||||
{this.props.currGroup.group_name}分组 共 {projectData.length} 个项目
|
{this.props.currGroup.group_name}分组 共 {projectData.length} 个项目
|
||||||
|
@ -16,11 +16,12 @@
|
|||||||
.project-list{
|
.project-list{
|
||||||
.project-list-header{
|
.project-list-header{
|
||||||
background: #eee;
|
background: #eee;
|
||||||
height: 48px;
|
height: 64px;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
padding: 7px 15px;
|
padding: 12px 15px;
|
||||||
|
font-weight: bold;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user