diff --git a/client/containers/Project/Interface/Interface.js b/client/containers/Project/Interface/Interface.js index e7c53123..9c181a4c 100644 --- a/client/containers/Project/Interface/Interface.js +++ b/client/containers/Project/Interface/Interface.js @@ -79,6 +79,7 @@ class Interface extends Component { render() { const { action } = this.props.match.params; const activeKey = action === 'api' ? 'api' : 'colOrCase'; + // console.log(matchPath(this.props.location.pathname, contentRouter)); return
diff --git a/client/containers/Project/Interface/InterfaceList/InterfaceMenu.js b/client/containers/Project/Interface/InterfaceList/InterfaceMenu.js index bec0720d..2172e089 100644 --- a/client/containers/Project/Interface/InterfaceList/InterfaceMenu.js +++ b/client/containers/Project/Interface/InterfaceList/InterfaceMenu.js @@ -14,7 +14,9 @@ const TreeNode = Tree.TreeNode; @connect( + state => { + return { list: state.inter.list, inter: state.inter.curdata, @@ -213,8 +215,38 @@ class InterfaceMenu extends Component { render() { const matchParams = this.props.match.params; let menuList = this.props.list; + const searchBox =
+ + this.changeModal('add_cat_modal_visible', true)} style={{ marginLeft: "15px" }} > + this.changeModal('visible', false)} + footer={null} + > + this.changeModal('visible', false)} onSubmit={this.handleAddInterface} /> + + + this.changeModal('add_cat_modal_visible', false)} + footer={null} + > + this.changeModal('add_cat_modal_visible', false)} onSubmit={this.handleAddInterfaceCat} /> + + + this.changeModal('change_cat_modal_visible', false)} + footer={null} + > + this.changeModal('change_cat_modal_visible', false)} onSubmit={this.handleChangeInterfaceCat} /> + +
if(menuList.length === 0){ - return null; + return searchBox; } const defaultExpandedKeys = () => { const { router, inter, list } = this.props, rNull = { expands: [], selects: [] }; @@ -307,36 +339,7 @@ class InterfaceMenu extends Component { } } return
-
- - this.changeModal('add_cat_modal_visible', true)} style={{ marginLeft: "15px" }} > - this.changeModal('visible', false)} - footer={null} - > - this.changeModal('visible', false)} onSubmit={this.handleAddInterface} /> - - - this.changeModal('add_cat_modal_visible', false)} - footer={null} - > - this.changeModal('add_cat_modal_visible', false)} onSubmit={this.handleAddInterfaceCat} /> - - - this.changeModal('change_cat_modal_visible', false)} - footer={null} - > - this.changeModal('change_cat_modal_visible', false)} onSubmit={this.handleChangeInterfaceCat} /> - -
+ {searchBox} {menuList.length > 0 ?