Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jocustom-docs
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhanglong
jocustom-docs
Commits
4e511b5d
Commit
4e511b5d
authored
Jul 22, 2026
by
zl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
79c1449d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
12 deletions
+32
-12
components/bigImage.vue
+32
-12
No files found.
components/bigImage.vue
View file @
4e511b5d
<
script
setup
>
import
{
ref
,
defineProps
}
from
'vue'
;
const
props
=
defineProps
([
'src'
]);
import
{
ref
}
from
'vue'
defineProps
({
src
:
{
type
:
String
,
required
:
true
,
},
alt
:
{
type
:
String
,
default
:
''
,
},
})
const
isOpen
=
ref
(
false
)
const
popupImage
=
ref
(
null
);
const
open
=
()
=>
{
popupImage
.
value
.
style
.
display
=
'block'
;
}
;
isOpen
.
value
=
true
}
const
close
=
()
=>
{
popupImage
.
value
.
style
.
display
=
'none'
;
isOpen
.
value
=
false
}
</
script
>
<img
class=
"original-image"
:src=
"props.src"
@
click=
"open()"
>
<
template
>
<figure
class=
"big-image"
>
<img
class=
"original-image"
:src=
"src"
:alt=
"alt"
@
click=
"open"
>
<div
class=
"popup-image"
ref=
"popupImage"
@
click=
"close"
>
<img
:src=
"props.src"
@
click=
"$event.stopPropagation()"
/>
</div>
<div
v-show=
"isOpen"
class=
"popup-image"
@
click=
"close"
>
<img
:src=
"src"
:alt=
"alt"
@
click
.
stop
>
</div>
</figure>
</
template
>
<
style
>
.big-image
{
margin
:
0
;
}
.original-image
{
margin-bottom
:
20px
;
cursor
:
pointer
;
display
:
block
;
}
.popup-image
{
position
:
fixed
;
width
:
100%
;
...
...
@@ -32,8 +52,8 @@ const close = () => {
top
:
0
;
left
:
0
;
z-index
:
30
;
display
:
none
;
}
.popup-image
img
{
position
:
absolute
;
top
:
50%
;
...
...
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