当前位置:网站首页>微信小程序轮播图的代码错误写法
微信小程序轮播图的代码错误写法
2022-06-09 14:05:00 【hamimelon2020】
<view class="tupian">
<swiper>
<swiper-item>
<image src="{
{}}"></image>
</swiper-item>
</swiper>
</view>
<view class="tupian">
<swiper indicator-dots="{
{indicatorDots}}"
autoplay="{
{autoplay}}"
interval="{
{interval}}"
duration="{
{duration}}">
<block wx:for="{
{background}}" wx:key="*this">
<swiper-item>
<image src="{
{}}"></image>
</swiper-item>
</block>
</swiper>
</view>
view class="tupian">
<swiper indicator-dots="true"
autoplay="true"
interval="2000">
<block wx:for="{
{coverList}}" wx:key="id" bindtap="goodsbug">
<swiper-item>
<image class="photo" src="{
{item.url}}"></image>
</swiper-item>
</block>
</swiper>
</view>
.tupian {
width: 100%;
height: 100%;
line-height: 10px;
}
// pages/index_hio/index_hio.js
Page({
/** * 页面的初始数据 */
data: {
centerItem: 0,
coverList: [
{
id: 0,
url: "../image/photo/1.jpeg"
},
{
id: 1,
url: "../image/photo/2.jpeg"
},
{
id: 2,
url: "../image/photo/3.jpeg"
},
{
id: 3,
url: "../image/photo/4.jpeg"
}
]
},
/** * 生命周期函数--监听页面加载 */
onLoad(options) {
},
/** * 生命周期函数--监听页面初次渲染完成 */
onReady() {
},
/** * 生命周期函数--监听页面显示 */
onShow() {
},
/** * 生命周期函数--监听页面隐藏 */
onHide() {
},
/** * 生命周期函数--监听页面卸载 */
onUnload() {
},
/** * 页面相关事件处理函数--监听用户下拉动作 */
onPullDownRefresh() {
},
/** * 页面上拉触底事件的处理函数 */
onReachBottom() {
},
/** * 用户点击右上角分享 */
onShareAppMessage() {
}
})
边栏推荐
- C language -- greedy method
- UniswapV2周边合约学习(七)-- ExampleSlidingWindowOracle.sol
- C listbox usage
- unity Dots的IComponent使用的列表踩的坑
- I haven't published a thesis for 5 years, and I want to give up my doctoral degree? Ten thousand words self narration of the doctoral director of the University of science and technology of China: he
- Graphpad prism 9 for Mac
- 电容电感阻抗模型分析和电源解耦电容选取经验
- 执行测试
- 【专题介绍】圆桌论坛——AI与音视频技术的融合之路
- 软件配置项变更与基线变更
猜你喜欢

Google installs the impression note clipping plug-in

苏涛:对抗样本技术在互联网安全领域的应用
![[Ji Wang] review of Cisco final multiple choice questions](/img/80/e84d8b2a5873b2d215463a503bebf7.png)
[Ji Wang] review of Cisco final multiple choice questions

Multivariate time series analysis -- causal test

验证回文串

LeetCode最长序列

Graphpad prism 9 for Mac

Import word document picture VM virtual machine network settings

高速缓冲存储器Cache地址映像与变换及相联目录表的设计

The golden band is the fourth largest operator's mace, and farmers will get low-cost 5g services
随机推荐
使用 KubeKey 搭建 Kubernetes/KubeSphere 环境的“心路(累)历程“
ACL2022 | 引入对比学习给生成的过程中加入负样本的模式使得模型能够有效地学习不同层级上的知识
大道至简 | 设计 ViT 到底怎么配置Self-Attention才是最合理的?
WSL 安装的最佳实践
苏涛:对抗样本技术在互联网安全领域的应用
QUIC会成为互联网传输的颠覆者吗?
[database] final review: SQL statement, definition and judgment of normal form, ER diagram to relational mode
电容电感阻抗模型分析和电源解耦电容选取经验
鸿蒙移植i.mx6ull(十二) 根文件系统
From just entering the testing industry to doubling my salary: talk about my advanced testing experience, which is worth learning from
面试了一位7年软件测试工作者:成也“7”年,败也“7”年
详解工厂方法
Is it safe to open an account in an external market or an internal market??
FCPX插件:动态物体运动模糊视觉特效Motion Blur FX by MA
华为,这也太强了吧..
执行测试
[Ji Wang] review of Cisco final multiple choice questions
Critical area, event, mutex, semaphore -- four methods to control multithread synchronization and mutex
Uniswap contract learning -- uniswap uni token
软件配置项变更与基线变更