opti: 文案优化

This commit is contained in:
wenbo.dong 2017-09-20 21:20:20 +08:00
parent 39afe88561
commit a4b82657af
6 changed files with 11 additions and 11 deletions

View File

@ -252,7 +252,7 @@ export default class GroupList extends Component {
<div className="group-operate">
<div className="search">
<Search placeholder="Filter by name" onChange={this.searchGroup} onSearch={(v) => this.searchGroup(null, v)} />
<Search placeholder="搜索分类" onChange={this.searchGroup} onSearch={(v) => this.searchGroup(null, v)} />
</div>
</div>
<Menu

View File

@ -5,7 +5,7 @@ import PropTypes from 'prop-types'
import { fetchInterfaceColList, fetchInterfaceCaseList, setColData } from '../../../../reducer/modules/interfaceCol'
import { autobind } from 'core-decorators';
import axios from 'axios';
import { Input, Icon, Tag, Modal, message, Tooltip, Tree, Dropdown, Menu, Form } from 'antd';
import { Input, Icon, Button, Modal, message, Tooltip, Tree, Dropdown, Menu, Form } from 'antd';
const TreeNode = Tree.TreeNode;
const FormItem = Form.Item;
@ -215,9 +215,9 @@ export default class InterfaceColMenu extends Component {
return (
<div>
<div className="interface-filter">
<Input placeholder="Filter by name" onChange={this.filterCol} />
<Input placeholder="搜索测试集合" onChange={this.filterCol} />
<Tooltip placement="bottom" title="添加集合">
<Tag color="#108ee9" style={{ marginLeft: "16px" }} onClick={() => this.showColModal('add')} className="btn-filter" ><Icon type="plus" /></Tag>
<Button type="primary" style={{ marginLeft: "16px" }} onClick={() => this.showColModal('add')} className="btn-filter" >添加集合</Button>
</Tooltip>
</div>
<Tree

View File

@ -3,7 +3,7 @@ import { connect } from 'react-redux';
import PropTypes from 'prop-types'
import { fetchInterfaceList, fetchInterfaceData, deleteInterfaceData, deleteInterfaceCatData, initInterface } from '../../../../reducer/modules/interface.js';
import { getProject } from '../../../../reducer/modules/project.js';
import { Menu, Input, Icon, Tag, Modal, message, Tree, Dropdown } from 'antd';
import { Menu, Input, Icon, Button, Modal, message, Tree, Dropdown } from 'antd';
import AddInterfaceForm from './AddInterfaceForm';
import AddInterfaceCatForm from './AddInterfaceCatForm';
import axios from 'axios'
@ -252,8 +252,8 @@ class InterfaceMenu extends Component {
const matchParams = this.props.match.params;
let menuList = this.state.list;
const searchBox = <div className="interface-filter">
<Input onChange={this.onFilter} value={this.state.filter} placeholder="Filter by name" />
<Tag color="#108ee9" onClick={() => this.changeModal('add_cat_modal_visible', true)} className="btn-filter" ><Icon type="plus" /></Tag>
<Input onChange={this.onFilter} value={this.state.filter} placeholder="搜索接口" />
<Button type="primary" onClick={() => this.changeModal('add_cat_modal_visible', true)} className="btn-filter" >添加接口</Button>
<Modal
title="添加接口"
visible={this.state.visible}

View File

@ -275,7 +275,7 @@ class View extends Component {
</div>
<div className="colMockUrl">
<span className="colKey">Mock地址</span>
<span className="colValue" onClick={() => window.open(location.protocol + '//' + location.hostname + (location.port !== "" ? ":" + location.port : "") + `/mock/${this.props.currProject._id}${this.props.currProject.basepath}${this.props.curData.path}`, '_blank')}>{location.protocol + '//' + location.hostname + (location.port !== "" ? ":" + location.port : "") + `/mock/${this.props.currProject._id}${this.props.currProject.basepath}${this.props.curData.path}`}</span>
<span className="colValue href" onClick={() => window.open(location.protocol + '//' + location.hostname + (location.port !== "" ? ":" + location.port : "") + `/mock/${this.props.currProject._id}${this.props.currProject.basepath}${this.props.curData.path}`, '_blank')}>{location.protocol + '//' + location.hostname + (location.port !== "" ? ":" + location.port : "") + `/mock/${this.props.currProject._id}${this.props.currProject.basepath}${this.props.curData.path}`}</span>
</div>
{this.props.curData.desc?<div className="colDesc">
<span className="colKey">接口备注</span>

View File

@ -24,7 +24,7 @@
}
}
.colValue {
.colValue.href {
color: #2395f1;
cursor: pointer;
}

View File

@ -57,14 +57,14 @@
}
.interface-filter{
padding: 12px 16px;
padding-right: 58px;
padding-right: 110px;
line-height: 32px;
background-color: #ddd;
position: relative;
}
.btn-filter {
position: absolute;
right: 0;
right: 16px;
top: 50%;
transform: translateY(-50%);
}