mirror of
https://github.com/YMFE/yapi.git
synced 2024-12-21 05:19:42 +08:00
Merge branch 'dev' into dev-feat
This commit is contained in:
commit
bd62adcede
@ -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
|
||||
|
@ -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
|
||||
|
@ -6,11 +6,11 @@
|
||||
.opts-icon, .case-delete-icon {
|
||||
line-height: 25px;
|
||||
width: 30px;
|
||||
transform: rotate(90deg);
|
||||
font-weight: bold;
|
||||
}
|
||||
.opts-icon:hover, .case-delete-icon:hover {
|
||||
color: #2395f1;
|
||||
border-radius: 4px;
|
||||
box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
|
||||
}
|
||||
.menu-title {
|
||||
display: flex;
|
||||
|
@ -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}
|
||||
|
@ -275,7 +275,7 @@ class View extends Component {
|
||||
</div>
|
||||
<div className="colMockUrl">
|
||||
<span className="colKey">Mock地址:</span>
|
||||
<span className="colValue">{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>
|
||||
|
@ -24,6 +24,10 @@
|
||||
|
||||
}
|
||||
}
|
||||
.colValue.href {
|
||||
color: #2395f1;
|
||||
cursor: pointer;
|
||||
}
|
||||
.ace_print-margin{
|
||||
display: none;
|
||||
}
|
||||
|
@ -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%);
|
||||
}
|
||||
@ -76,15 +76,14 @@
|
||||
.interface-delete-icon{
|
||||
position: relative;
|
||||
right: 0;
|
||||
// top: 2px;
|
||||
float: right;
|
||||
line-height: 25px;
|
||||
width: 30px;
|
||||
transform: rotate(90deg);
|
||||
font-weight: bold;
|
||||
}
|
||||
.interface-delete-icon:hover {
|
||||
color: #2395f1;
|
||||
border-radius: 4px;
|
||||
box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
|
||||
}
|
||||
|
||||
.interface-list{
|
||||
|
Loading…
Reference in New Issue
Block a user