Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
submodule
Project
Project
Details
Activity
Releases
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
web_component
submodule
Commits
8518b48c
Commit
8518b48c
authored
Aug 25, 2020
by
zhangwenshuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update input detail format
parent
453e65d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
getFormatter.tsx
...onents/apolloTable/component/base/_utils/getFormatter.tsx
+2
-2
No files found.
components/apolloTable/component/base/_utils/getFormatter.tsx
View file @
8518b48c
...
@@ -14,7 +14,7 @@ const initValue = (val) => {
...
@@ -14,7 +14,7 @@ const initValue = (val) => {
export
const
GetFormatter
=
{
export
const
GetFormatter
=
{
INPUT
:
(
val
)
=>
{
INPUT
:
(
val
)
=>
{
const
newValue
=
initValue
(
val
);
const
newValue
=
initValue
(
val
);
return
newValue
?
newValue
[
0
].
value
:
undefined
;
return
newValue
?
newValue
[
0
].
text
||
newValue
[
0
].
value
:
undefined
;
},
},
SEARCH
:
(
val
)
=>
{
SEARCH
:
(
val
)
=>
{
const
newValue
=
initValue
(
val
);
const
newValue
=
initValue
(
val
);
...
@@ -101,7 +101,7 @@ export const GetFormatter = {
...
@@ -101,7 +101,7 @@ export const GetFormatter = {
if
(
unit
&&
unit
.
code
===
'wan'
)
{
if
(
unit
&&
unit
.
code
===
'wan'
)
{
let
formateVal
=
Number
((
newValue
[
0
]
||
{}).
value
);
let
formateVal
=
Number
((
newValue
[
0
]
||
{}).
value
);
formateVal
=
formateVal
?
formateVal
/
10000
:
formateVal
;
formateVal
=
formateVal
?
formateVal
/
10000
:
formateVal
;
newValue
=
[{
value
:
formateVal
,
text
:
formateVal
}]
newValue
=
[{
value
:
formateVal
,
text
:
formateVal
}]
;
}
}
if
(
precision
>=
0
&&
isNumber
(
newValue
[
0
].
value
))
{
if
(
precision
>=
0
&&
isNumber
(
newValue
[
0
].
value
))
{
return
Number
(
newValue
[
0
].
value
).
toFixed
(
precision
);
return
Number
(
newValue
[
0
].
value
).
toFixed
(
precision
);
...
...
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