feat: col-menu

This commit is contained in:
zwjamnsss 2017-08-18 17:56:26 +08:00
parent 61407711ab
commit e752b87233
2 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -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)
}
}