Update edit.js
This commit is contained in:
parent
a43e84ab65
commit
073da1c556
|
@ -213,6 +213,7 @@ export default class add extends React.Component{
|
|||
addNewkey(){
|
||||
let step = "step2-" + this.state.keys.length
|
||||
this.state.keys.push(step)
|
||||
this.setState({keys:this.state.keys})
|
||||
}
|
||||
|
||||
onPhoneChange(e){
|
||||
|
@ -229,9 +230,7 @@ export default class add extends React.Component{
|
|||
closeStep(index){
|
||||
|
||||
|
||||
_.remove(this.state.keys, (n)=>{
|
||||
return n == this.state.keys[index];
|
||||
});
|
||||
this.state.keys[index] = ""
|
||||
|
||||
this.setState({keys:this.state.keys})
|
||||
console.log(this.state.keys)
|
||||
|
@ -347,7 +346,7 @@ export default class add extends React.Component{
|
|||
<div className="plan-title">key</div>
|
||||
{
|
||||
this.state.keys.map((item,index) => {
|
||||
return(
|
||||
return item ? (
|
||||
<Card style={{ width:'100%',height:"auto","margin-bottom":"10px" }} title={this.state.step2_pagetitle} action={
|
||||
index > 0 ?
|
||||
( <span className="zent-link" target="_blank" onClick={(e)=>{ this.closeStep(index)} }>
|
||||
|
@ -359,7 +358,7 @@ export default class add extends React.Component{
|
|||
|
||||
<Step2 ref={"step2-"+ index} addNewkey ={()=>{this.addNewkey()}} data={item} disabled={this.state.disabled} />
|
||||
</Card>
|
||||
)
|
||||
) : null
|
||||
})
|
||||
}
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue