mirror of
https://github.com/YMFE/yapi.git
synced 2024-12-21 05:19:42 +08:00
feat: col-menu
This commit is contained in:
parent
61407711ab
commit
e752b87233
@ -64,7 +64,12 @@ export default class InterfaceColMenu extends Component {
|
||||
const { isShowCol, currColId, currCaseId } = nextProps;
|
||||
const action = isShowCol ? 'col' : 'case';
|
||||
const actionId = isShowCol ? currColId : currCaseId;
|
||||
this.setState({expandedKeys: [action+'_'+actionId]})
|
||||
let expandedKeys = this.state.expandedKeys;
|
||||
if (expandedKeys.indexOf(action+'_'+actionId) === -1) {
|
||||
expandedKeys = expandedKeys.concat([action+'_'+actionId])
|
||||
}
|
||||
console.log(expandedKeys)
|
||||
this.setState({expandedKeys})
|
||||
}
|
||||
|
||||
@autobind
|
||||
|
@ -76,7 +76,7 @@ export function fetchCaseData(caseId){
|
||||
export function fetchCaseList(colId) {
|
||||
return {
|
||||
type: FETCH_CASE_LIST,
|
||||
payload: axios.get('/api/col/case_list/col_id=' + colId)
|
||||
payload: axios.get('/api/col/case_list/?col_id=' + colId)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user