mirror of
https://github.com/YMFE/yapi.git
synced 2024-12-09 05:00:30 +08:00
修改测试集排序
This commit is contained in:
parent
b5fa4b66b0
commit
ae3de1214f
@ -125,6 +125,7 @@ class InterfaceColContent extends Component {
|
||||
rows = rows.sort((n, o) => {
|
||||
return n.index > o.index
|
||||
})
|
||||
console.log(rows);
|
||||
this.setState({
|
||||
rows: rows
|
||||
})
|
||||
@ -500,12 +501,13 @@ class InterfaceColContent extends Component {
|
||||
row: dnd.Row
|
||||
}
|
||||
};
|
||||
|
||||
console.log(rows);
|
||||
const resolvedColumns = resolve.columnChildren({ columns });
|
||||
const resolvedRows = resolve.resolve({
|
||||
columns: resolvedColumns,
|
||||
method: resolve.nested
|
||||
})(rows);
|
||||
console.log(resolvedRows);
|
||||
let colEnv = this.props.currProject.env || [];
|
||||
return (
|
||||
<div className="interface-col">
|
||||
|
@ -151,6 +151,9 @@ class interfaceColController extends baseController{
|
||||
result.req_params = this.handleParamsValue(data.req_params, result.req_params)
|
||||
resultList[index] = result;
|
||||
}
|
||||
resultList = resultList.sort((a,b)=>{
|
||||
return a.index - b.index;
|
||||
});
|
||||
ctx.body = yapi.commons.resReturn(resultList);
|
||||
} catch (e) {
|
||||
ctx.body = yapi.commons.resReturn(null, 402, e.message);
|
||||
|
Loading…
Reference in New Issue
Block a user