ToB企服应用市场:ToB评测及商务社交产业平台
标题:
EP1 banner海报swiper轮播器
[打印本页]
作者:
我爱普洱茶
时间:
2024-9-12 08:33
标题:
EP1 banner海报swiper轮播器
文件路径:
E:/homework/uniappv3tswallpaper/pages/index/index.vue
<template>
<view class="homeLayout">
<view class="banner">
<swiper :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000" circular="true"
indicator-color="rgba(255,255,255,0.5)">
<swiper-item v-for="item in 3">
<image src="../../common/images/banner1.jpg" mode="scaleToFill"></image>
</swiper-item>
</swiper>
</view>
</view>
</template>
<script setup>
</script>
<style lang="scss">
.homeLayout {
.banner {
width: 750rpx;
padding: 30rpx 0;
swiper {
width: 100%;
height: 340rpx;
&-item {
width: 100%;
height: 100%;
padding: 0 30rpx;
image {
width: 100%;
height: 100%;
border-radius: 10rpx;
}
}
}
}
}
</style>
复制代码
文件路径:
E:/homework/uniappv3tswallpaper/App.vue
<script>
export default {
onLaunch: function() {
console.log('App Launch')
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style lang="scss">
/*每个页面公共css */
@import "common/style/common-style.scss"
</style>
复制代码
文件路径:
E:/homework/uniappv3tswallpaper/common/style/common-style.scss
view,swiper,swiper-item{
box-sizing: border-box;
}
复制代码
留意:
已经在common文件夹中添加过测试时使用的图片资源。
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
欢迎光临 ToB企服应用市场:ToB评测及商务社交产业平台 (https://dis.qidao123.com/)
Powered by Discuz! X3.4