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
0a9171d5
Commit
0a9171d5
authored
Dec 16, 2023
by
王玉鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 详情页vr跳转修正
parent
913a52ac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
CommonImage.vue
src/components/common/CommonImage.vue
+11
-3
ImageList.vue
src/components/common/ImageList.vue
+1
-0
No files found.
src/components/common/CommonImage.vue
View file @
0a9171d5
<!-- 图片展示,方便修改占位图、错误图 -->
<
template
>
<ElImage
:src=
"src"
>
<ElImage
:src=
"src"
@
click=
"handleClick"
>
<template
#
placeholder
>
<img
class=
"h-full w-full"
:src=
"currentdefault"
/>
<img
class=
"h-full w-full"
:src=
"currentdefault"
@
click
.
stop=
"handleClick"
/>
</
template
>
<
template
#
error
>
<img
class=
"h-full w-full"
:src=
"currentdefault"
@
click
.
stop=
"handleClick"
/>
</
template
>
<
template
#
error
><img
class=
"h-full w-full"
:src=
"currentdefault"
/></
template
>
</ElImage>
</template>
...
...
@@ -30,6 +32,8 @@ const props = withDefaults(
},
);
const
emit
=
defineEmits
([
'click'
]);
const
currentdefault
=
computed
(()
=>
{
const
config
:
Record
<
DetailType
,
string
>
=
{
[
DetailType
.
carrier
]:
defaultCarrierPic
,
...
...
@@ -40,4 +44,8 @@ const currentdefault = computed(() => {
};
return
props
.
type
?
config
[
props
.
type
]
:
defaultPicIcon
;
});
const
handleClick
=
()
=>
{
emit
(
'click'
);
};
</
script
>
src/components/common/ImageList.vue
View file @
0a9171d5
...
...
@@ -19,6 +19,7 @@
<div
v-if=
"image?.href"
class=
"vr-icon absolute left-1/2 top-1/2 z-20 -translate-x-1/2 -translate-y-1/2 cursor-pointer"
@
click=
"handleClick(image?.href)"
></div>
</SwiperSlide>
</Swiper>
...
...
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