Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wisdom-components
Project
Project
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
ReactWeb5
wisdom-components
Commits
eec20185
Commit
eec20185
authored
Jul 14, 2023
by
陈龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 优化移动端显示
parent
78d1e6fa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
utils.js
packages/extend-components/EC_HistoryView/src/utils.js
+13
-1
No files found.
packages/extend-components/EC_HistoryView/src/utils.js
View file @
eec20185
...
...
@@ -13,6 +13,17 @@ const COLOR = {
LOWLOWER
:
'#FF0000'
,
AVG
:
'#00B8B1'
,
};
const
isMobile
=
()
=>
{
const
userAgent
=
navigator
.
userAgent
.
toLowerCase
();
if
(
/ipad|iphone|midp|rv:1.2.3.4|ucweb|android|windows ce|windows mobile/
.
test
(
userAgent
)
)
{
return
true
;
}
return
false
;
}
/**
* 图表系列名称格式化
*
...
...
@@ -557,12 +568,13 @@ const optionGenerator = (dataSource, cusOption, contrast, contrastOption, smooth
});
tooltip = {
formatter: (e) => {
debugger
return `
<
div
>
$
{
headTemplate
(
e
[
0
])}
<
div
>
<
div
style
=
"display: flex; align-items: center;"
>
<
span
>
$
{
e
[
0
].
seriesName
isMobile
()?
'当前值'
:
e
[
0
].
seriesName
}
<
/span><span style="display:inline-block;">:</
span
>
<
span
style
=
"color: ${COLOR.NORMAL};margin: 0 5px 0 auto;"
>
$
{
e
[
0
]?.
value
?.[
1
]
??
'-'
...
...
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