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
Hide 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
<
template
>
<
template
>
<view
class=
"remoteView"
>
<view
class=
"remoteView"
>
<NormalTitle
:elementInfo=
"elementInfo"
></NormalTitle>
<NormalTitle
:elementInfo=
"elementInfo"
></NormalTitle>
<u-image
<u-image
class=
"remoteImage"
class=
"remoteImage"
:src=
"imageUrl"
:src=
"imageUrl"
width=
"100%"
width=
"100%"
:height=
"imageHeight"
height=
"100%"
mode=
"aspectFit"
></u-image>
></u-image>
</view>
</view>
</
template
>
</
template
>
...
@@ -18,37 +19,29 @@
...
@@ -18,37 +19,29 @@
mixins
:
[
echartElementData
],
mixins
:
[
echartElementData
],
data
()
{
data
()
{
return
{
return
{
imageUrl
:
""
,
imageUrl
:
""
windowWidth
:
0
,
//屏幕宽度
imageHeight
:
0
//图片高度
};
};
},
},
methods
:{
methods
:{
initChart
()
{
initChart
()
{
uni
.
getSystemInfo
({
success
:
res
=>
{
this
.
windowWidth
=
res
.
windowWidth
;
this
.
imageHeight
=
(
this
.
windowWidth
*
this
.
elementInfo
.
height
)
/
this
.
elementInfo
.
width
;
}
});
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
imageUrl
=
this
.
elementData
.
dataList
.
imageUrl
this
.
imageUrl
=
this
.
elementData
.
dataList
.
imageUrl
})
})
},
}
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.remoteView
{
.remoteView
{
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
height
:
100%
;
width
:
100%
;
overflow
:
hidden
;
height
:
100%
;
}
overflow
:
hidden
;
.remoteImage
{
}
object-fit
:
contain
;
.remoteImage
{
}
width
:
100%
;
height
:
100%
;
}
</
style
>
</
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