Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
swifteditor
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
daixuan
swifteditor
Commits
7b3ea0f1
Commit
7b3ea0f1
authored
Dec 06, 2018
by
fukai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改IE下光标问题
parent
526bb79a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
9 deletions
+23
-9
SWFPage2.js
src/swift/SWFPage2.js
+10
-8
ZTextArea.js
src/swift/Tags/ZTextArea.js
+13
-1
No files found.
src/swift/SWFPage2.js
View file @
7b3ea0f1
...
@@ -408,7 +408,8 @@ class SNDBIC extends Component{
...
@@ -408,7 +408,8 @@ class SNDBIC extends Component{
this
.
state
=
{
snd_bic
:
props
.
snd_bic
,
err_msg
:
this
.
props
.
err_msg
}
this
.
state
=
{
snd_bic
:
props
.
snd_bic
,
err_msg
:
this
.
props
.
err_msg
}
}
}
onChange
=
val
=>
{
onChange
=
val
=>
{
if
((
!
val
&&
!
this
.
state
.
snd_bic
)
||
val
==
this
.
state
.
snd_bic
)
return
let
err_msg
=
validateRCV_BIC
(
val
)
let
err_msg
=
validateRCV_BIC
(
val
)
this
.
props
.
onChange
(
val
,
err_msg
)
this
.
props
.
onChange
(
val
,
err_msg
)
...
@@ -442,7 +443,8 @@ class RCVBIC extends Component{
...
@@ -442,7 +443,8 @@ class RCVBIC extends Component{
this
.
state
=
{
rcv_bic
:
props
.
rcv_bic
,
err_msg
:
this
.
props
.
err_msg
}
this
.
state
=
{
rcv_bic
:
props
.
rcv_bic
,
err_msg
:
this
.
props
.
err_msg
}
}
}
onChange
=
val
=>
{
onChange
=
val
=>
{
if
((
!
val
&&
!
this
.
state
.
rcv_bic
)
||
val
==
this
.
state
.
rcv_bic
)
return
let
err_msg
=
validateRCV_BIC
(
val
)
let
err_msg
=
validateRCV_BIC
(
val
)
this
.
props
.
onChange
(
val
,
err_msg
)
this
.
props
.
onChange
(
val
,
err_msg
)
...
@@ -765,16 +767,16 @@ export class Tag extends MessageArea
...
@@ -765,16 +767,16 @@ export class Tag extends MessageArea
// this.state = {name:this.name}
// this.state = {name:this.name}
this
.
state
=
{
tagValue
:
this
.
props
.
pattern
.
tagValue
}
this
.
state
=
{
tagValue
:
this
.
props
.
pattern
.
tagValue
}
}
}
onValue
=
val
=>
{
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
=>
{
this
.
props
.
pattern
.
tagValue
=
val
this
.
props
.
pattern
.
tagValue
=
val
TagV
(
"T"
+
this
.
props
.
pattern
.
tag
,
this
.
props
.
pattern
.
status
,
val
,
this
.
props
.
pattern
.
tno
,
this
.
props
.
mty
)
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
.
setState
({
tagValue
:
this
.
props
.
pattern
.
tagValue
})
//this.props.updateTreeValue()
//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
)
if
(
!
comp
)
return
null
;
return
null
;
...
...
src/swift/Tags/ZTextArea.js
View file @
7b3ea0f1
...
@@ -6,10 +6,20 @@ import {Input} from 'antd'
...
@@ -6,10 +6,20 @@ import {Input} from 'antd'
export
default
class
ZTextArea
extends
Component
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
)
=>
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
)
replace2
(
this
.
eibs
.
refs
.
input
,
e
.
nativeEvent
,
rows
,
this
.
props
.
cols
,
this
.
props
.
value
)
this
.
props
.
onChange
&&
this
.
props
.
onChange
(
e
)
this
.
props
.
onChange
&&
this
.
props
.
onChange
(
e
)
...
@@ -98,6 +108,8 @@ const LineChar = '\r'
...
@@ -98,6 +108,8 @@ const LineChar = '\r'
function
replace2
(
obj
,
evt
,
rows
,
cols
,
oldval
)
function
replace2
(
obj
,
evt
,
rows
,
cols
,
oldval
)
{
{
let
result
=
obj
.
value
;
let
result
=
obj
.
value
;
if
((
!
result
&&
!
oldval
)
||
result
==
oldval
)
return
result
=
result
.
replace
(
/
[\r\n]{1,2}
/g
,
'
\
r'
)
result
=
result
.
replace
(
/
[\r\n]{1,2}
/g
,
'
\
r'
)
let
position
=
getTxtCursorPosition
(
obj
)
let
position
=
getTxtCursorPosition
(
obj
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment