diff --git a/webapp/src/component/preItem/modal/AddPreItem.jsx b/webapp/src/component/preItem/modal/AddPreItem.jsx index 37a25a6..806d2cb 100644 --- a/webapp/src/component/preItem/modal/AddPreItem.jsx +++ b/webapp/src/component/preItem/modal/AddPreItem.jsx @@ -46,12 +46,12 @@ export default class AddPreItem extends React.Component{ state['sourceLabel']=''; state['args']=''; state['status']=1; - state['configJson']=''; + state['configJson']= JSON.stringify({}); } state[name] = trim(value); if(name=='sourceField'){ - state['sourceLabel']=this.props.fieldList.filter(x=>x.fieldName==value)[0].label; + state['sourceLabel']= this.props.fieldList.filter(x => x.fieldName==value)[0].label; } this.setState(state); @@ -83,7 +83,7 @@ export default class AddPreItem extends React.Component{ args:'', reqType:'GET', visible:true, - configJson:'' + configJson:JSON.stringify({}) }) } diff --git a/webapp/src/component/preItem/modal/EditPreItem.jsx b/webapp/src/component/preItem/modal/EditPreItem.jsx index 009eea2..5bd67d2 100644 --- a/webapp/src/component/preItem/modal/EditPreItem.jsx +++ b/webapp/src/component/preItem/modal/EditPreItem.jsx @@ -64,7 +64,7 @@ export default class EditPreItem extends React.Component{ state['sourceField']=''; state['sourceLabel']=''; state['args']=''; - state['configJson']=''; + state['configJson']=JSON.stringify({}); } state[name] = trim(value);