当前位置:网站首页>Uni app realizes advertisement scroll bar
Uni app realizes advertisement scroll bar
2022-07-01 13:41:00 【Front end childe Jia】
Parameter description
- circular Boolean false Whether to adopt the joint sliding , That is, play to the end and return to the beginning
- vertical Boolean false Whether the sliding direction is longitudinal
- previous-margin String 0px Front margin , Can be used to expose a small part of the previous item , Accept px and rpx
- next-margin String 0px Back margin , Can be used to expose a small part of the latter , Accept px and rpx value
- autoplay Boolean false Auto switch or not
- disable-touch Boolean false Prohibit users touch operation
- interval Number 5000 Auto switch interval
- duration Number 500 The length of the slide animation
- @change EventHandle
- current It will trigger change event ,event.detail = {current: current, source: source}
- current Number 0 The current slider index
html
<view class="scroll_box">
<swiper class="swiper" circular="true" vertical="true" :previous-margin='50+"rpx"' :next-margin='50+"rpx"'
:autoplay="true" disable-touch='false' :interval="3000" :duration="2000" @change='EventHandle'>
<swiper-item v-for="(item,index) in list" :key="index">
<view :class="current==index?'swiper-item':'' ">{
{item}}</view>
</swiper-item>
</swiper>
</view>
js
data() {
return {
current: 0,
list: [
' just 1657*****8768 receive commission 9.9999 element ',
' just 1657*****8768 receive commission 9.9999 element ',
' just 1657*****8768 receive commission 9.9999 element ',
' just 1657*****8768 receive commission 9.9999 element ',
' just 1657*****8768 receive commission 9.9999 element ',
' just 1657*****8768 receive commission 9.9999 element ',
],
};
},
methods: {
EventHandle(e) {
this.current = e.target.current;
},
},
css
.scroll_box {
background: #FFFFFF;
margin: 30rpx;
border-radius: 10rpx;
.swiper {
height: 150rpx;
}
.swiper-item {
background-color: #FECA71;
font-size: 32rpx;
}
}
边栏推荐
- Grafana reports an error: error= "failed to send notification to email addresses: [email protected] : 535 Error:
- Summary of 20 practical typescript single line codes
- 1553B environment construction
- word2vec训练中文词向量
- 流量管理技术
- minimum spanning tree
- Investment analysis and prospect prediction report of global and Chinese dimethyl sulfoxide industry Ⓦ 2022 ~ 2028
- Machine learning summary (I): linear regression, ridge regression, Lasso regression
- 盲盒NFT数字藏品平台系统开发(搭建源码)
- Enter the top six! Boyun's sales ranking in China's cloud management software market continues to rise
猜你喜欢

What is the future development direction of people with ordinary education, appearance and family background? The career planning after 00 has been made clear

Google Earth Engine(GEE)——全球人类居住区网格数据 1975-1990-2000-2014 (P2016)

Enter the top six! Boyun's sales ranking in China's cloud management software market continues to rise

SAP 智能机器人流程自动化(iRPA)解决方案分享

流量管理技术

Cs5268 advantages replace ag9321mcq typec multi in one docking station scheme

清华章毓晋老师新书:2D视觉系统和图像技术(文末送5本)

Wave animation color five pointed star loader loading JS special effects

A Fletter version of Notepad

Professor Li Zexiang, Hong Kong University of science and technology: I'm wrong. Why is engineering consciousness more important than the best university?
随机推荐
leetcode 322. Coin change (medium)
Detailed explanation of leetcode reconstruction binary tree [easy to understand]
arthas使用
龙蜥社区开源 coolbpf,BPF 程序开发效率提升百倍
受益互联网出海 汇量科技业绩重回高增长
内容审计技术
陈宇(Aqua)-安全-&gt;云安全-&gt;多云安全
SAP 智能机器人流程自动化(iRPA)解决方案分享
Asp. NETCORE uses dynamic to simplify database access
ArrayList capacity expansion mechanism and thread safety
进入前六!博云在中国云管理软件市场销量排行持续上升
网络中的listen
MySQL 66 questions, 20000 words + 50 pictures in detail! Necessary for review
10. Page layout, guess you like it
8款最佳实践,保护你的 IaC 安全!
详细讲解面试的 IO多路复用,select,poll,epoll
终端识别技术和管理技术
啟動solr報錯The stack size specified is too small,Specify at least 328k
1.8新特性-List
微机原理与接口技术知识点整理复习–纯手打