欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 财经 > 产业 > EP1 banner海报swiper轮播器

EP1 banner海报swiper轮播器

2024/10/25 6:32:44 来源:https://blog.csdn.net/weixin_43659550/article/details/142030301  浏览:    关键词: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文件夹中添加过测试时使用的图片资源。

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com