diff --git a/client/containers/Project/Interface/InterfaceList/InterfaceEditForm.js b/client/containers/Project/Interface/InterfaceList/InterfaceEditForm.js index 0d6f7624649c6150c716e2cd847eecc3d3eaa822..8ea79f8c61593d25344d4154af80e9346a02d86f 100755 --- a/client/containers/Project/Interface/InterfaceList/InterfaceEditForm.js +++ b/client/containers/Project/Interface/InterfaceList/InterfaceEditForm.js @@ -548,9 +548,12 @@ class InterfaceEditForm extends Component { this.state.bulkValue.split('\n').forEach((item, index) => { let valueItem = Object.assign({}, curValue[index] || dataTpl[this.state.bulkName]); - valueItem.name = item.split(':')[0]; - valueItem.example = item.split(':')[1] || ''; - newValue.push(valueItem); + let indexOfColon = item.indexOf(':'); + if (indexOfColon!==-1) { + valueItem.name = item.substring(0, indexOfColon); + valueItem.example = item.substring(indexOfColon + 1) || ''; + newValue.push(valueItem); + } }); this.props.form.setFieldsValue({[this.state.bulkName]: newValue});