Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
liyeyun
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
cfld-frontend
liyeyun
Commits
37597cb6
Commit
37597cb6
authored
Dec 17, 2023
by
shilei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://101.201.78.203/cfld-front/liyeyun
into dev
parents
fe049fc9
5996e15e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
7 deletions
+18
-7
CommonImage.vue
src/components/common/CommonImage.vue
+12
-3
HomeView.vue
src/views/home/HomeView.vue
+6
-4
No files found.
src/components/common/CommonImage.vue
View file @
37597cb6
<!-- 图片展示,方便修改占位图、错误图 -->
<
template
>
<ElImage
:src=
"
s
rc"
@
click=
"handleClick"
>
<ElImage
:src=
"
formatedS
rc"
@
click=
"handleClick"
>
<template
#
placeholder
>
<img
class=
"h-full w-full"
:src=
"currentdefault"
@
click
.
stop
=
"handleClick"
/>
<img
class=
"h-full w-full"
:src=
"currentdefault"
@
click=
"handleClick"
/>
</
template
>
<
template
#
error
>
<img
class=
"h-full w-full"
:src=
"currentdefault"
@
click
.
stop
=
"handleClick"
/>
<img
class=
"h-full w-full"
:src=
"currentdefault"
@
click=
"handleClick"
/>
</
template
>
</ElImage>
</template>
...
...
@@ -45,6 +45,15 @@ const currentdefault = computed(() => {
return
props
.
type
?
config
[
props
.
type
]
:
defaultPicIcon
;
});
const
formatedSrc
=
computed
(()
=>
{
const
{
src
}
=
props
;
if
(
src
)
{
return
`
${
src
}
?x-image-process=style/style-a460`
;
}
else
{
return
src
;
}
});
const
handleClick
=
()
=>
{
emit
(
'click'
);
};
...
...
src/views/home/HomeView.vue
View file @
37597cb6
...
...
@@ -97,10 +97,12 @@
</div>
<div
v-if=
"homePageData?.noticeList.length"
class=
"flex items-center"
>
<img
src=
"@/assets/images/icon-volume.png"
class=
"h-4 w-4"
alt=
""
/>
<div
class=
"relative h-5 w-[180px] overflow-hidden
"
>
<ul
ref=
"marquee2"
class=
"ml-2 h-5 w-[
20
0px] overflow-y-scroll text-sm text-white"
>
<div
style=
"width: calc(850px - 17px)"
class=
"relative h-5 overflow-hidden text-sm
"
>
<ul
ref=
"marquee2"
class=
"ml-2 h-5 w-[
85
0px] overflow-y-scroll text-sm text-white"
>
<li
v-for=
"item in homePageData.noticeList"
:key=
"item.name"
class=
"name"
>
<p
class=
"w-180 ell"
>
{{
item
.
name
}}
</p>
<p
class=
"w-180 ell"
>
{{
item
.
name
}}
</p>
</li>
</ul>
</div>
...
...
@@ -169,7 +171,7 @@
:src=
"item.imgUrl"
alt=
""
/>
<div
v-if=
"
!
item.isVr"
class=
"absolute bottom-2 left-2"
>
<div
v-if=
"item.isVr"
class=
"absolute bottom-2 left-2"
>
<img
class=
"h-[45px] w-[45px] rounded-[50%]"
src=
"@/assets/images/vr-icon.png"
/>
</div>
</div>
...
...
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