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
4644642f
Commit
4644642f
authored
May 10, 2024
by
陈龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 修复切换也会下载图片的问题
parent
68077bd4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
SingleChart.js
packages/extend-components/EC_HistoryView/src/SingleChart.js
+3
-2
index.js
packages/extend-components/EC_HistoryView/src/index.js
+1
-1
No files found.
packages/extend-components/EC_HistoryView/src/SingleChart.js
View file @
4644642f
...
...
@@ -84,9 +84,10 @@ const SingleChart = memo((props) => {
a
.
href
=
chart
.
getDataURL
(
'image/png'
);
a
.
download
=
'曲线图片.png'
a
.
click
();
a
.
remove
()
a
.
remove
();
exportCanvas
.
setExportFlag
(
null
);
}
},
[
exportCanvas
]);
},
[
exportCanvas
.
exportFlag
]);
useEffect
(()
=>
{
chartRef
.
current
?.
resize
?.();
const
chart
=
chartRef
.
current
?.
getEchartsInstance
?.();
...
...
packages/extend-components/EC_HistoryView/src/index.js
View file @
4644642f
...
...
@@ -1395,7 +1395,7 @@ const HistoryView = (props) => {
/
>
)
:
(
<
SingleChart
exportCanvas
=
{
exportFlag
}
exportCanvas
=
{
{
exportFlag
,
setExportFlag
}
}
emptyOrError
=
{
emptyOrError
.
current
}
dateRange
=
{
dateRange
}
showBoxOption
=
{
showBoxOption
}
...
...
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