Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
client
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
67b151ff
authored
Aug 15, 2025
by
孙美琪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
轮播图修改
parent
2373e2f2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
5 deletions
+35
-5
src/assets/styles/index-CMeKdScn.scss
+0
-0
src/layout/user-layout.vue
+1
-1
src/views/index.vue
+34
-4
No files found.
src/assets/styles/index-CMeKdScn.scss
View file @
67b151ff
This diff is collapsed.
Click to expand it.
src/layout/user-layout.vue
View file @
67b151ff
...
@@ -243,7 +243,7 @@ function logout() {
...
@@ -243,7 +243,7 @@ function logout() {
}
}
.app-main
{
.app-main
{
padding-top
:
64
px
;
padding-top
:
90
px
;
height
:
100%
;
height
:
100%
;
//
height
:
calc
(
100vh
-
64px
);
//
height
:
calc
(
100vh
-
64px
);
overflow-y
:
auto
;
overflow-y
:
auto
;
...
...
src/views/index.vue
View file @
67b151ff
<
template
>
<
template
>
<div
class=
"app-container home"
>
<div
class=
"app-container home"
>
<div
class=
"banner"
>
<div
class=
"banner"
>
<el-carousel
height=
"1064px"
:indicator-position=
"bannerImgList.length
<
=
1
?
'
none
'
:
''
"
>
<el-carousel
:height=
"carouselHeight + 'px'"
:indicator-position=
"bannerImgList.length
<
=
1
?
'
none
'
:
''
"
>
<el-carousel-item
v-for=
"item in bannerImgList"
:key=
"item"
@
click=
"handleCarousel(item.url)"
>
<el-carousel-item
<!--
<img
:src=
"baseUrl + item.image"
alt=
""
>
-->
v-for=
"item in bannerImgList"
<img
:src=
"item.image"
alt=
""
/>
:key=
"item"
@
click=
"handleCarousel(item.url)"
>
<div
class=
"carousel-image"
>
<img
:src=
"item.image"
alt=
""
/>
</div>
</el-carousel-item>
</el-carousel-item>
</el-carousel>
</el-carousel>
</div>
</div>
...
@@ -340,6 +345,25 @@ const dialogTitle = ref('')
...
@@ -340,6 +345,25 @@ const dialogTitle = ref('')
const
iframeSrc
=
ref
(
''
)
const
iframeSrc
=
ref
(
''
)
const
iframeShow
=
ref
(
false
)
const
iframeShow
=
ref
(
false
)
const
myCarousel
=
ref
(
null
)
const
myCarousel
=
ref
(
null
)
const
carouselHeight
=
ref
(
500
);
// 默认高度
function
updateHeight
()
{
// 根据窗口宽度计算高度
const
width
=
window
.
innerWidth
;
if
(
width
<
768
)
{
carouselHeight
.
value
=
width
*
0.6
;
// 移动设备上高度为宽度的60%
}
else
{
carouselHeight
.
value
=
width
*
0.4
;
// 桌面设备上高度为宽度的40%
}
}
onMounted
(()
=>
{
updateHeight
();
window
.
addEventListener
(
'resize'
,
updateHeight
);
});
onBeforeUnmount
(()
=>
{
window
.
removeEventListener
(
'resize'
,
updateHeight
);
});
function
getBanner
()
{
function
getBanner
()
{
banner
().
then
(
res
=>
{
banner
().
then
(
res
=>
{
...
@@ -502,6 +526,12 @@ function handleCarousel(url) {
...
@@ -502,6 +526,12 @@ function handleCarousel(url) {
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
.carousel-image
{
width
:
100%
;
height
:
100%
;
object-fit
:
cover
;
}
.view-more-text
{
.view-more-text
{
position
:
sticky
;
position
:
sticky
;
text-align
:
center
;
text-align
:
center
;
...
...
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