mirror of
https://github.com/YMFE/yapi.git
synced 2024-12-21 05:19:42 +08:00
feat: 集合按钮添加tooltip提示文字
This commit is contained in:
parent
d5bb1bb7e8
commit
c72fe7f60e
@ -295,9 +295,15 @@ export default class InterfaceColMenu extends Component {
|
||||
<div className="menu-title">
|
||||
<span><Icon type="folder-open" style={{marginRight: 5}} /><span>{col.name}</span></span>
|
||||
<div className="btns">
|
||||
<Icon type='delete' className="interface-delete-icon" onClick={(e) => {e.stopPropagation();this.showDelColConfirm(col._id)}} />
|
||||
<Icon type='edit' className="interface-delete-icon" onClick={(e) => {e.stopPropagation();this.showColModal('edit', col)}} />
|
||||
<Icon type='plus' className="interface-delete-icon" onClick={(e) => {e.stopPropagation();this.showImportInterfaceModal(col._id)}} />
|
||||
<Tooltip title="删除集合">
|
||||
<Icon type='delete' className="interface-delete-icon" onClick={(e) => {e.stopPropagation();this.showDelColConfirm(col._id)}} />
|
||||
</Tooltip>
|
||||
<Tooltip title="编辑集合">
|
||||
<Icon type='edit' className="interface-delete-icon" onClick={(e) => {e.stopPropagation();this.showColModal('edit', col)}} />
|
||||
</Tooltip>
|
||||
<Tooltip title="添加集合">
|
||||
<Icon type='plus' className="interface-delete-icon" onClick={(e) => {e.stopPropagation();this.showImportInterfaceModal(col._id)}} />
|
||||
</Tooltip>
|
||||
</div>
|
||||
{/*<Dropdown overlay={menu(col)} trigger={['click']} onClick={e => e.stopPropagation()}>
|
||||
<Icon className="opts-icon" type='ellipsis'/>
|
||||
@ -318,7 +324,9 @@ export default class InterfaceColMenu extends Component {
|
||||
title={
|
||||
<div className="menu-title" title={interfaceCase.casename}>
|
||||
<span className="casename">{interfaceCase.casename}</span>
|
||||
<Icon type='delete' className="case-delete-icon" onClick={(e) => { e.stopPropagation();this.showDelCaseConfirm(interfaceCase._id) }} />
|
||||
<Tooltip title="删除用例">
|
||||
<Icon type='delete' className="case-delete-icon" onClick={(e) => { e.stopPropagation();this.showDelCaseConfirm(interfaceCase._id) }} />
|
||||
</Tooltip>
|
||||
</div>
|
||||
}
|
||||
></TreeNode>
|
||||
|
@ -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 { Input, Icon, Button, Modal, message, Tree } from 'antd';
|
||||
import { Input, Icon, Button, Modal, message, Tree, Tooltip } from 'antd';
|
||||
import AddInterfaceForm from './AddInterfaceForm';
|
||||
import AddInterfaceCatForm from './AddInterfaceCatForm';
|
||||
import axios from 'axios'
|
||||
@ -339,8 +339,12 @@ class InterfaceMenu extends Component {
|
||||
title={<div className="container-title" onMouseEnter={() => this.enterItem(item._id)} onMouseLeave={this.leaveItem} >
|
||||
<Link className="interface-item" to={"/project/" + matchParams.id + "/interface/api/" + item._id} >{item.title}</Link>
|
||||
<div className="btns">
|
||||
<Icon type='delete' className="interface-delete-icon" onClick={(e) => { e.stopPropagation();this.showConfirm(item._id) }} style={{ display: this.state.delIcon == item._id ? 'block' : 'none' }} />
|
||||
<Icon type='copy' className="interface-delete-icon" onClick={(e) => { e.stopPropagation();this.copyInterface(item) }} style={{ display: this.state.delIcon == item._id ? 'block' : 'none' }} />
|
||||
<Tooltip title="删除接口">
|
||||
<Icon type='delete' className="interface-delete-icon" onClick={(e) => { e.stopPropagation();this.showConfirm(item._id) }} style={{ display: this.state.delIcon == item._id ? 'block' : 'none' }} />
|
||||
</Tooltip>
|
||||
<Tooltip title="复制接口">
|
||||
<Icon type='copy' className="interface-delete-icon" onClick={(e) => { e.stopPropagation();this.copyInterface(item) }} style={{ display: this.state.delIcon == item._id ? 'block' : 'none' }} />
|
||||
</Tooltip>
|
||||
</div>
|
||||
{/*<Dropdown overlay={menu(item)} trigger={['click']} onClick={e => e.stopPropagation()}>
|
||||
<Icon type='ellipsis' className="interface-delete-icon" style={{ opacity: this.state.delIcon == item._id ? 1 : 0 }}/>
|
||||
@ -420,21 +424,27 @@ class InterfaceMenu extends Component {
|
||||
return <TreeNode title={<div className="container-title" onMouseEnter={() => this.enterItem(item._id)} onMouseLeave={this.leaveItem} >
|
||||
<Link className="interface-item" to={"/project/" + matchParams.id + "/interface/api/cat_" + item._id} ><Icon type="folder-open" style={{ marginRight: 5 }} />{item.name}</Link>
|
||||
<div className="btns">
|
||||
<Icon type='delete' className="interface-delete-icon" onClick={(e) => { e.stopPropagation();this.showDelCatConfirm(item._id) }} style={{ display: this.state.delIcon == item._id ? 'block' : 'none' }}/>
|
||||
<Icon type='edit' className="interface-delete-icon" style={{ display: this.state.delIcon == item._id ? 'block' : 'none' }} onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
this.changeModal('change_cat_modal_visible', true);
|
||||
this.setState({
|
||||
curCatdata: item
|
||||
})
|
||||
}} />
|
||||
<Icon type='plus' className="interface-delete-icon" style={{ display: this.state.delIcon == item._id ? 'block' : 'none' }} onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
this.changeModal('visible', true);
|
||||
this.setState({
|
||||
curCatid: item._id
|
||||
});
|
||||
}} />
|
||||
<Tooltip title="删除集合">
|
||||
<Icon type='delete' className="interface-delete-icon" onClick={(e) => { e.stopPropagation();this.showDelCatConfirm(item._id) }} style={{ display: this.state.delIcon == item._id ? 'block' : 'none' }}/>
|
||||
</Tooltip>
|
||||
<Tooltip title="编辑集合">
|
||||
<Icon type='edit' className="interface-delete-icon" style={{ display: this.state.delIcon == item._id ? 'block' : 'none' }} onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
this.changeModal('change_cat_modal_visible', true);
|
||||
this.setState({
|
||||
curCatdata: item
|
||||
})
|
||||
}} />
|
||||
</Tooltip>
|
||||
<Tooltip title="添加集合">
|
||||
<Icon type='plus' className="interface-delete-icon" style={{ display: this.state.delIcon == item._id ? 'block' : 'none' }} onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
this.changeModal('visible', true);
|
||||
this.setState({
|
||||
curCatid: item._id
|
||||
});
|
||||
}} />
|
||||
</Tooltip>
|
||||
</div>
|
||||
|
||||
{/*<Dropdown overlay={menu(item)} trigger={['click']} onClick={e => e.stopPropagation()}>
|
||||
|
@ -1 +1 @@
|
||||
module.exports = {}
|
||||
module.exports = {qsso : require('plugins/yapi-plugin-qsso/client.js')}
|
3435
package-lock.json
generated
3435
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -47,7 +47,8 @@
|
||||
"sha1": "^1.1.1",
|
||||
"underscore": "^1.8.3",
|
||||
"universal-cookie": "^2.0.8",
|
||||
"url": "^0.11.0"
|
||||
"url": "^0.11.0",
|
||||
"yapi-plugin-qsso": "^1.0.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"assets-webpack-plugin": "^3.5.1",
|
||||
|
Loading…
Reference in New Issue
Block a user