mirror of
https://github.com/YMFE/yapi.git
synced 2025-02-23 13:59:28 +08:00
fix: 测试接口导入支持状态过滤
This commit is contained in:
parent
f6ab1a3af6
commit
7a8367a322
@ -3,6 +3,7 @@
|
||||
* 增加项目文档记录wiki
|
||||
* 支持swagger URL 导入
|
||||
* 接口运行和测试集合中加入参数备注信息
|
||||
* 测试接口导入支持状态过滤
|
||||
|
||||
#### Bug Fixed
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React, { PureComponent as Component } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Table, Select } from 'antd';
|
||||
import { Table, Select, Tooltip, Icon } from 'antd';
|
||||
import variable from '../../../../constants/variable';
|
||||
import { connect } from 'react-redux';
|
||||
const Option = Select.Option;
|
||||
@ -179,7 +179,14 @@ export default class ImportInterface extends Component {
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
title: (
|
||||
<span>
|
||||
状态{' '}
|
||||
<Tooltip title="筛选满足条件的接口集合">
|
||||
<Icon type="question-circle-o" />
|
||||
</Tooltip>
|
||||
</span>
|
||||
),
|
||||
dataIndex: 'status',
|
||||
render: text => {
|
||||
return (
|
||||
@ -190,6 +197,23 @@ export default class ImportInterface extends Component {
|
||||
<span className="tag-status undone">未完成</span>
|
||||
))
|
||||
);
|
||||
},
|
||||
filters: [
|
||||
{
|
||||
text: '已完成',
|
||||
value: 'done'
|
||||
},
|
||||
{
|
||||
text: '未完成',
|
||||
value: 'undone'
|
||||
}
|
||||
],
|
||||
onFilter: (value, record) => {
|
||||
let arr = record.children.filter(item => {
|
||||
return item.status.indexOf(value) === 0;
|
||||
});
|
||||
return arr.length > 0;
|
||||
// record.status.indexOf(value) === 0
|
||||
}
|
||||
}
|
||||
];
|
||||
|
@ -235,7 +235,7 @@ class InterfaceList extends Component {
|
||||
width: 14,
|
||||
render: (text, record) => {
|
||||
const key = record.key;
|
||||
return (
|
||||
return (
|
||||
<Select
|
||||
value={key + '-' + text}
|
||||
className="select"
|
||||
|
Loading…
Reference in New Issue
Block a user