Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
E
ec-report-refactor
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
lihuizhen
ec-report-refactor
Commits
d14e396f
Commit
d14e396f
authored
Feb 23, 2022
by
Jenny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 远程图片
parent
671f2342
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
25 deletions
+18
-25
RemoteImage.vue
components/RemoteImage/RemoteImage.vue
+18
-25
No files found.
components/RemoteImage/RemoteImage.vue
View file @
d14e396f
...
...
@@ -5,7 +5,8 @@
class=
"remoteImage"
:src=
"imageUrl"
width=
"100%"
:height=
"imageHeight"
height=
"100%"
mode=
"aspectFit"
></u-image>
</view>
</
template
>
...
...
@@ -18,24 +19,15 @@
mixins
:
[
echartElementData
],
data
()
{
return
{
imageUrl
:
""
,
windowWidth
:
0
,
//屏幕宽度
imageHeight
:
0
//图片高度
imageUrl
:
""
};
},
methods
:{
initChart
()
{
uni
.
getSystemInfo
({
success
:
res
=>
{
this
.
windowWidth
=
res
.
windowWidth
;
this
.
imageHeight
=
(
this
.
windowWidth
*
this
.
elementInfo
.
height
)
/
this
.
elementInfo
.
width
;
}
});
this
.
$nextTick
(()
=>
{
this
.
imageUrl
=
this
.
elementData
.
dataList
.
imageUrl
})
},
}
}
}
</
script
>
...
...
@@ -44,11 +36,12 @@
.remoteView
{
display
:
flex
;
flex-direction
:
column
;
width
:
100%
;
height
:
100%
;
overflow
:
hidden
;
}
.remoteImage
{
object-fit
:
contain
;
}
}
.remoteImage
{
width
:
100%
;
height
:
100%
;
}
</
style
>
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