fix(CarouselBoard): 将轮播间隔从60秒改为10秒
优化轮播体验,加快信息展示频率,提升用户交互体验
This commit is contained in:
parent
cb8a9d001f
commit
91a4ea06e5
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,90 +1,98 @@
|
|||||||
<template>
|
<template>
|
||||||
<dv-full-screen-container>
|
<dv-full-screen-container>
|
||||||
<div class="carousel-board-container">
|
<div class="carousel-board-container">
|
||||||
<dv-border-box-1 class="dashboard-border">
|
<dv-border-box-1 class="dashboard-border">
|
||||||
<el-carousel ref="carousel" :interval="60000" height="100vh" arrow="never" indicator-position="bottom" autoplay
|
<el-carousel
|
||||||
class="dashboard-carousel">
|
ref="carousel"
|
||||||
<el-carousel-item>
|
:interval="10000"
|
||||||
<QualityStatisticsCard />
|
height="100vh"
|
||||||
</el-carousel-item>
|
arrow="never"
|
||||||
<el-carousel-item>
|
indicator-position="bottom"
|
||||||
<WorkorderOnlineCard />
|
autoplay
|
||||||
</el-carousel-item>
|
class="dashboard-carousel"
|
||||||
</el-carousel>
|
>
|
||||||
</dv-border-box-1>
|
<el-carousel-item>
|
||||||
</div>
|
<QualityStatisticsCard />
|
||||||
</dv-full-screen-container>
|
</el-carousel-item>
|
||||||
|
<el-carousel-item>
|
||||||
|
<WorkorderOnlineCard />
|
||||||
|
</el-carousel-item>
|
||||||
|
</el-carousel>
|
||||||
|
</dv-border-box-1>
|
||||||
|
</div>
|
||||||
|
</dv-full-screen-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import QualityStatisticsCard from './components/QualityStatisticsCard.vue'
|
import QualityStatisticsCard from "./components/QualityStatisticsCard.vue";
|
||||||
import WorkorderOnlineCard from './components/WorkorderOnlineCard.vue'
|
import WorkorderOnlineCard from "./components/WorkorderOnlineCard.vue";
|
||||||
export default {
|
export default {
|
||||||
name: 'CarouselBoard',
|
name: "CarouselBoard",
|
||||||
components: {
|
components: {
|
||||||
QualityStatisticsCard,
|
QualityStatisticsCard,
|
||||||
WorkorderOnlineCard,
|
WorkorderOnlineCard,
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
// 可以在这里添加一些初始化逻辑
|
|
||||||
console.log('Carousel board initialized')
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
// 可以添加一些控制轮播的方法
|
|
||||||
nextSlide() {
|
|
||||||
this.$refs.carousel.next()
|
|
||||||
},
|
},
|
||||||
prevSlide() {
|
mounted() {
|
||||||
this.$refs.carousel.prev()
|
// 可以在这里添加一些初始化逻辑
|
||||||
|
console.log("Carousel board initialized");
|
||||||
},
|
},
|
||||||
pause() {
|
methods: {
|
||||||
this.$refs.carousel.pause()
|
// 可以添加一些控制轮播的方法
|
||||||
|
nextSlide() {
|
||||||
|
this.$refs.carousel.next();
|
||||||
|
},
|
||||||
|
prevSlide() {
|
||||||
|
this.$refs.carousel.prev();
|
||||||
|
},
|
||||||
|
pause() {
|
||||||
|
this.$refs.carousel.pause();
|
||||||
|
},
|
||||||
|
play() {
|
||||||
|
this.$refs.carousel.play();
|
||||||
|
},
|
||||||
},
|
},
|
||||||
play() {
|
};
|
||||||
this.$refs.carousel.play()
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.carousel-board-container {
|
.carousel-board-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 0px;
|
padding: 0;
|
||||||
background: linear-gradient(135deg, #001529 0%, #002140 100%);
|
margin: 0;
|
||||||
overflow: auto;
|
background: linear-gradient(135deg, #001529 0%, #002140 100%);
|
||||||
box-sizing: border-box;
|
overflow: auto;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dashboard-border {
|
.dashboard-border {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dashboard-carousel {
|
.dashboard-carousel {
|
||||||
background: rgba(0, 20, 40, 0.8);
|
background: rgba(0, 20, 40, 0.8);
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 优化轮播项样式 */
|
/* 优化轮播项样式 */
|
||||||
.el-carousel__item {
|
.el-carousel__item {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 确保指示器清晰可见 */
|
/* 确保指示器清晰可见 */
|
||||||
.el-carousel__indicator {
|
.el-carousel__indicator {
|
||||||
width: 12px;
|
width: 12px;
|
||||||
height: 12px;
|
height: 12px;
|
||||||
margin: 0 8px;
|
margin: 0 8px;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
background-color: rgba(255, 255, 255, 0.3);
|
background-color: rgba(255, 255, 255, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-carousel__indicator--active {
|
.el-carousel__indicator--active {
|
||||||
width: 24px;
|
width: 24px;
|
||||||
background-color: #00ffff;
|
background-color: #00ffff;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user