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
1552fd13
Commit
1552fd13
authored
Jan 18, 2022
by
leon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
http://106.15.103.105/lihuizhen/ec-report-refactor
into develop
parents
b8ddde40
dadd89e9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
0 deletions
+70
-0
NormalImage.vue
components/NormalImage/NormalImage.vue
+68
-0
index.vue
pages/index/index.vue
+2
-0
No files found.
components/NormalImage/NormalImage.vue
0 → 100644
View file @
1552fd13
<
template
>
<view
class=
"normal-image"
>
<BasicText
:elementInfo=
"elementInfo.option.title"
></BasicText>
<u-empty
v-if=
"!elementInfo.option.images.list.length"
></u-empty>
<u-image
v-if=
"elementInfo.option.images.list.length === 1"
width=
"100%"
:height=
"imageHeight"
:src=
"elementInfo.option.images.list[0].url"
>
</u-image>
<u-swiper
v-if=
"elementInfo.option.images.list.length > 1"
mode=
"dot"
:autoplay=
"elementInfo.optison.images.autoplay"
:interval=
"elementInfo.option.images.autoplaySpeed * 1000"
:indicator=
"elementInfo.option.images.dots"
:list=
"elementInfo.option.images.list"
width=
"100%"
:height=
"imageHeight"
name=
"url"
>
</u-swiper>
</view>
</
template
>
<
script
>
export
default
{
name
:
"NormalImage"
,
props
:
{
elementInfo
:
{
type
:
Object
,
required
:
true
}
},
data
()
{
return
{
windowWidth
:
0
,
//屏幕宽度
imageHeight
:
0
//图片高度
};
},
mounted
()
{
uni
.
getSystemInfo
({
success
:
res
=>
{
this
.
windowWidth
=
res
.
windowWidth
;
this
.
imageHeight
=
(
this
.
windowWidth
*
this
.
elementInfo
.
height
)
/
this
.
elementInfo
.
width
;
}
});
},
onLoad
()
{
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.normal-image {
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
image {
max-width: 100%;
max-height: 100%;
object-fit: contain;
}
}
</
style
>
pages/index/index.vue
View file @
1552fd13
...
...
@@ -32,6 +32,8 @@
<BasicText
v-if=
"element.type == 'BasicText'"
:elementInfo=
"element"
></BasicText>
<!-- 真实时间 -->
<RealTime
v-if=
"element.type == 'RealTime'"
:elementInfo=
"element"
></RealTime>
<!-- 普通图片 -->
<NormalImage
v-if=
"element.type == 'NormalImage'"
:elementInfo=
"element"
></NormalImage>
</view>
</view>
</
template
>
...
...
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