方法
-
this.handleRadioChange(e} value={clickValue}>
- {
- showList.map((item, index) => {
- return
-
- {item.name}
-
- {item.type && this.handleComponent(item, clickIndex, index)}
-
-
+ {
+ showList.map((item, index) => {
+ return click(item.name)}>
+ {item.name}
+
+ {item.type && this.handleComponent(item, clickIndex, index)}
+
-
- })
- }
-
+
+
+ })
+ }
{
moreFlag &&
更多
}
diff --git a/client/components/ModalPostman/MockList.js b/client/components/ModalPostman/MockList.js
index af3f0796..122c6e63 100644
--- a/client/components/ModalPostman/MockList.js
+++ b/client/components/ModalPostman/MockList.js
@@ -12,7 +12,7 @@ class MockList extends Component {
static propTypes = {
click: PropTypes.func,
clickValue: PropTypes.string
-
+
}
constructor(props) {
@@ -30,8 +30,8 @@ class MockList extends Component {
})
}
-
- onFilter= (e)=> {
+
+ onFilter = (e) => {
const list = wordList.filter(item => {
return item.mock.indexOf(e.target.value) !== -1
@@ -42,15 +42,15 @@ class MockList extends Component {
})
}
-
- onSearch=(v)=>{
- console.log("v",v);
+
+ onSearch = (v) => {
+ console.log("v", v);
// this.props.click(v);
}
render() {
- const { list, filter} = this.state;
- const {click, clickValue} = this.props;
+ const { list, filter } = this.state;
+ const { click, clickValue } = this.props;
return (
mock数据
@@ -61,15 +61,20 @@ class MockList extends Component {
placeholder="搜索mock数据"
className="mock-search"
/>
-
- {
- list.map((item, index) => {
- return
- {item.mock}
-
- })
- }
-
+ {/* */}
+ {
+ list.map((item, index) => {
+ return click(item.mock)} >
+ {item.mock}
+
+ })
+ }
+ {/* */}
)
diff --git a/client/components/ModalPostman/index.js b/client/components/ModalPostman/index.js
index 02d380d6..69ea8ba5 100644
--- a/client/components/ModalPostman/index.js
+++ b/client/components/ModalPostman/index.js
@@ -58,7 +58,7 @@ class ModalPostman extends Component {
mockClick(index) {
return (e, params) => {
console.log('value', params);
- let curname = e.target.value;
+ let curname = e;
let newParamsList = closeRightTabsAndAddNewTab(this.state.methodsParamsList, index, curname, params)
this.setState({
methodsParamsList: newParamsList
diff --git a/client/components/ModalPostman/index.scss b/client/components/ModalPostman/index.scss
index 040b4508..b20c6c43 100644
--- a/client/components/ModalPostman/index.scss
+++ b/client/components/ModalPostman/index.scss
@@ -27,7 +27,12 @@
}
.row {
margin-bottom: 8px;
- width:100%;
+ width: 100%;
+ height: 32px;
+ line-height: 30px;
+ padding: 0 16px;
+ cursor: pointer;
+
.ant-radio-button-wrapper{
border: 0;
width: 100%;
@@ -38,6 +43,11 @@
width:100%
}
}
+
+ .checked{
+ color:#fff;
+ background-color:#2395f1;
+ }
}
.modal-postman-expression, .modal-postman-preview {
border-top: 1px solid #e9e9e9;