Update step2.js
This commit is contained in:
parent
09480081ca
commit
21633bc7d5
|
@ -283,17 +283,16 @@ export default class acclist extends React.Component{
|
||||||
}
|
}
|
||||||
onRestrict(e,rowdata){
|
onRestrict(e,rowdata){
|
||||||
|
|
||||||
|
let text = e.target.value;
|
||||||
|
text = text.replace(/[^\d]/g,'')
|
||||||
|
|
||||||
|
|
||||||
let rowIndex =this.state.distdata.findIndex((o)=>{return o.title == rowdata.title})
|
let rowIndex =this.state.distdata.findIndex((o)=>{return o.title == rowdata.title})
|
||||||
|
|
||||||
|
|
||||||
console.log(rowdata)
|
|
||||||
console.log("当前输入的值")
|
this.state.distdata[rowIndex].restrict =text;
|
||||||
console.log( e.target.value)
|
|
||||||
console.log(rowIndex)
|
|
||||||
this.state.distdata[rowIndex].restrict = e.target.value;
|
|
||||||
this.setState({distdata:this.state.distdata})
|
this.setState({distdata:this.state.distdata})
|
||||||
console.log(this.state.distdata)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onDisabledCombinedDate = (val)=>{
|
onDisabledCombinedDate = (val)=>{
|
||||||
|
@ -536,7 +535,7 @@ export default class acclist extends React.Component{
|
||||||
if(com == "restrict")
|
if(com == "restrict")
|
||||||
{
|
{
|
||||||
|
|
||||||
return <input placeholder="请输入数量" value={rowData.restrict} onChange={(e)=>{this.onRestrict(e,rowData)}} />
|
return <Input placeholder="请输入数量" type="number" value={rowData.restrict} onChange={(e)=>{this.onRestrict(e,rowData)}} />
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in New Issue