添加事件

This commit is contained in:
fanshuai 2025-03-24 22:27:21 +08:00
parent d20a81da30
commit c59e8e3c37

View File

@ -34,7 +34,9 @@ export default {
const prevSlide = () => {
currentIndex.value = (currentIndex.value - 1 + slides.length) % slides.length
}
const geet = () => {
alert(`欢迎咨询`)
}
//
onMounted(() => {
setInterval(nextSlide, 4000)
@ -45,6 +47,7 @@ export default {
currentIndex,
nextSlide,
prevSlide,
geet,
}
},
}
@ -68,7 +71,7 @@ export default {
<div>客户案例</div>
<div>关于我们</div>
</div>
<el-button class="an-3" type="primary">免费咨询</el-button>
<el-button @click="geet" class="an-3" type="primary">免费咨询</el-button>
</div>
</div>
</el-header>
@ -389,7 +392,7 @@ export default {
flex-direction: column;
justify-content: space-around;
height: 250px;
margin-right: 300px;
background-color: #fff;
width: 600px;
margin-top: 50px;
@ -402,7 +405,6 @@ export default {
display: flex;
flex-direction: column;
justify-content: space-around;
margin-right: 300px;
height: 500px;
margin-top: 50px;
margin-left: 100px;