Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
company-portal-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
company-portal-ui
Commits
0262b484
Commit
0262b484
authored
Mar 11, 2025
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改导航
parent
dbb1fd1b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
10 deletions
+31
-10
admin/src/views/portal/ProductDetailsView.vue
admin/src/views/portal/ProductDetailsView.vue
+31
-10
No files found.
admin/src/views/portal/ProductDetailsView.vue
View file @
0262b484
...
...
@@ -3,7 +3,7 @@
<div
class=
"gallery-box"
v-if=
" photos.length > 0"
>
<div
class=
"gallery"
>
<div
class=
"active-photo"
:style=
"'background-image: url('+ photos[activePhoto]+');'"
>
<button
type=
"button"
<!--
<button
type=
"button"
aria-label=
"Previous Photo"
class=
"previous"
@
click=
"previousPhoto()"
>
...
...
@@ -14,19 +14,26 @@
class=
"next"
@
click=
"nextPhoto()"
>
▶
</button>
</button>
-->
</div>
<div
class=
"thumbnails"
>
<div
class=
"thumbnails"
>
<div
v-for=
"(photo, index) in photos"
:key=
"index"
:src=
"photo"
@
click=
"activePhoto = index"
:class=
"
{'active': activePhoto === index}"
:style="'background-image: url('+photo+');background-size: cover; /* 让背景填充整个区域 */\n'+
' background-position: center center; /* 保持居中 */\n'+
' background-repeat: no-repeat;'">
:style="'background-image: url('+photo+');'">
</div>
<!--
<div
class=
"image-container"
>
<img
v-for=
"(photo, index) in photos"
:src=
"photo"
/>
<div/>
-->
</div>
</div>
</div>
...
...
@@ -136,12 +143,12 @@ export default {
.gallery-box
.gallery
.active-photo
{
width
:
100%
;
margin-bottom
:
5px
;
padding-bottom
:
65%
;
background-size
:
cover
;
padding-bottom
:
60%
;
background-position
:
center
;
background-repeat
:
no-repeat
;
background-size
:
contain
;
border
:
2px
solid
#fff
;
position
:
relative
;
}
.gallery-box
.gallery
.active-photo
button
{
...
...
@@ -180,6 +187,7 @@ export default {
display
:
grid
;
grid-template-columns
:
repeat
(
auto-fill
,
minmax
(
100px
,
1
fr
));
grid-gap
:
4px
;
}
.thumbnails
div
{
border
:
2px
solid
#fff
;
...
...
@@ -190,6 +198,7 @@ export default {
background-position
:
center
;
background-repeat
:
no-repeat
;
opacity
:
1
;
place-items
:
center
;
}
.thumbnails
:hover
{
/*opacity: 0.6;*/
...
...
@@ -200,4 +209,16 @@ export default {
}
.image-container
{
width
:
300px
;
/* 设定固定宽度 */
height
:
200px
;
/* 设定固定高度 */
overflow
:
hidden
;
/* 防止溢出 */
}
.image-container
img
{
width
:
100%
;
height
:
auto
;
clip-path
:
inset
(
10%
10%
10%
10%
);
}
</
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