Commit 7b3ea0f1 by fukai

修改IE下光标问题

parent 526bb79a
......@@ -408,7 +408,8 @@ class SNDBIC extends Component{
this.state = {snd_bic:props.snd_bic,err_msg:this.props.err_msg}
}
onChange = val=>{
if((!val && !this.state.snd_bic) || val == this.state.snd_bic)
return
let err_msg = validateRCV_BIC(val)
this.props.onChange(val,err_msg)
......@@ -442,7 +443,8 @@ class RCVBIC extends Component{
this.state = {rcv_bic:props.rcv_bic,err_msg:this.props.err_msg}
}
onChange = val=>{
if((!val && !this.state.rcv_bic) || val == this.state.rcv_bic)
return
let err_msg = validateRCV_BIC(val)
this.props.onChange(val,err_msg)
......@@ -765,16 +767,16 @@ export class Tag extends MessageArea
// this.state = {name:this.name}
this.state={tagValue:this.props.pattern.tagValue}
}
output()
{
let comp = TagSet("T"+this.props.pattern.tag,{action:this.props.action,enLock:this.props.enLock,mty:this.props.mty,status:this.props.pattern.status,value:this.props.pattern.tagValue,desp:this.props.pattern.label},
val=>{
onValue = val=>{
this.props.pattern.tagValue = val
TagV("T"+this.props.pattern.tag,this.props.pattern.status,val,this.props.pattern.tno,this.props.mty)
this.setState({tagValue:this.props.pattern.tagValue})
//this.props.updateTreeValue()
}
output()
{
let comp = TagSet("T"+this.props.pattern.tag,{action:this.props.action,enLock:this.props.enLock,mty:this.props.mty,status:this.props.pattern.status,value:this.props.pattern.tagValue,desp:this.props.pattern.label},
this.onValue
)
if(!comp)
return null;
......
......@@ -6,10 +6,20 @@ import {Input} from 'antd'
export default class ZTextArea extends Component
{
shouldComponentUpdate(nextProps, nextState)
{
if((!this.props.value && !nextProps.value) || this.props.value == nextProps.value)
return false
return true
}
onChange=(e)=>
{
const rows = this.props.maxLength/this.props.cols
const rows = this.props.maxLength/this.props.cols
let nval = e.target.value
let oldval = this.props.value
if((!oldval && ! nval) || nval== oldval)
return
replace2(this.eibs.refs.input,e.nativeEvent,rows,this.props.cols,this.props.value)
this.props.onChange && this.props.onChange(e)
......@@ -98,6 +108,8 @@ const LineChar = '\r'
function replace2(obj,evt,rows,cols,oldval)
{
let result = obj.value;
if((!result && !oldval ) || result == oldval)
return
result = result.replace(/[\r\n]{1,2}/g,'\r')
let position = getTxtCursorPosition(obj)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment