当前位置:网站首页>Wechat applet development - Implementation of rotation chart
Wechat applet development - Implementation of rotation chart
2022-06-24 18:23:00 【Yang Yang D_ C】
Applet , The mobile terminal is inseparable from the function of the carousel map , The following is to write a small program to share with you the function of the rotation chart
design sketch :

1. Page code
<!--index.wxml-->
<view class="container">
<!-- Shuffling figure -->
<swiper class="home-swiper" indicator-dots="true" autoplay="{
{autoplay}}" interval="{
{interval}}" duration="{
{duration}}">
<block wx:for-items="{
{lunboData}}">
<swiper-item>
<image src="{
{item.imgurl}}" class="slide-image" />
</swiper-item>
</block>
</swiper>
</view>2. Configuration information
//index.js
Page({
data: {
// Carousel configuration
autoplay: true,
interval: 3000,
duration: 1200
},
onLoad: function () {
var that = this;
var data = {
"datas": [
{
"id": 1,
"imgurl": "../../images/a1.jpg"
},
{
"id": 2,
"imgurl": "../../images/a2.jpg"
}
]
};
that.setData({
lunboData: data.datas
})
}
})3. Configuration style
/**index.wxss**/
/* Carousel control */
.home-swiper {
width: 95%;
height: 360rpx;
}
.slide-image {
width: 100%;
height: 100%;
}边栏推荐
- Mariana Trench, Facebook's open source code analysis tool
- On the principle of cloud streaming multi person interaction technology
- Optimizing bloom filter: challenges, solutions, and comparisons
- Ten software development indicators for project managers
- Nine practical guidelines for improving responsive design testing
- Mengyou Technology: tiktok current limiting? Teach you to create popular copywriting + popular background music selection
- Selection (031) -cool_ How long can secret be accessed?
- Gateway solves cross domain access
- Continue to help enterprises' digital transformation -tce has obtained the certification of the first batch of digital trusted service platforms in China
- Recommend 14 commonly used test development tools
猜你喜欢

Overall planning and construction method of digital transformation

How to decompile APK files
Business based precipitation component = & gt; manage-table

Nacos cluster starts throwing set of SQL_ SELECT_ LIMIT is not support

Get max value of a bit column - get max value of a bit column

Five skills of selecting embedded programming language

Etching process flow for PCB fabrication
![[NLP] 3 papers on how Stanford team builds a better chat AI](/img/f1/1c2ff31a728152395618800600df45.jpg)
[NLP] 3 papers on how Stanford team builds a better chat AI

Ten excellent business process automation tools for small businesses

Several key points for enterprises to pay attention to digital transformation
随机推荐
Considerations for it project demand analysis
Number of occurrences of numbers in the array (medium difficulty)
About pyqt5 to realize paging function (one window implements different interfaces)
EasyNVR使用Onvif探测设备失败,显示“无数据”是什么原因?
On software requirement analysis
Rapidssl getting started SSL certificate
Keep two decimal places
Three years of bug free, tips for improving code quality
Noi Mathematics: solution of quadratic congruence equation
Easygbs video platform TCP active mode streaming exception repair
Several key points for enterprises to pay attention to digital transformation
From file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql The GPG key to retrieve the key source "MySQL 5.7 community server" is installed, but not applicable to
How much does it cost to develop a small adoption program similar to QQ farm?
Constantly changing the emergency dialing of harmonyos ETS during the new year
congratulate! The first dragon lizard community annual outstanding contribution award is announced. Check it now
[North Asia data recovery]_ mdb_ catalog. Mongodb database data recovery case in case of WT file corruption
Application service access configuration parameters
How does the video platform import the old database into the new database?
Business based precipitation component = & gt; manage-table
Tencent cloud won the "trusted cloud technology best practice - virtualization"