微信小程序
fishpppoe
这个作者很懒,什么都没留下…
展开
-
微信小程序-轮播图渲染
首先先获取轮播图 <view class="index_swiper"> <swiper autoplay indicator-dots="true" circular="true"> <swiper-item wx:for="{{swiperList}}" wx:key="goods_id" > <navigator> <image mode="width原创 2021-02-17 13:52:08 · 721 阅读 · 0 评论 -
微信小程序-生命周期
应用生命周期onLaunch(){}再应用第一次启动的时候 获取用户个人信息onShow(){}应用被用户看到 对应用的数据重置onHide(){}应用被隐藏 暂停或者清楚定时器onError(){}应用的代码发生了报错的时候 触发错误onPageNotFound页面找不到的时候就启动 应用第一次启动的时候 如果找不到第一个入口页面 才会触动如果页面不存在 可以通过js方式来重新跳转页面 调到第二个页面wx.navigateTo({url:’’,})页面生命周期原创 2021-02-05 12:28:44 · 69 阅读 · 0 评论 -
微信小程序-checkedbox复选框应用
需求存在三个复选框水果系列 选择之后会在下面打印出选择的value值实现在wxml中<view> <checkbox-group bindchange="handlechange"> <checkbox value="{{item.value}}" wx:for="{{list}}" wx:key="id"> {{item.name}} </checkbox> </checkbox-group></view>原创 2021-02-03 20:06:22 · 402 阅读 · 0 评论 -
微信小程序-swiper图片实现轮播图
语法:<swiper> <swiper-item><image src="..."/></swiper-item> <swiper-item><image src="..."/></swiper-item></swiper>swiper存在默认样式1.width:100%2.height:150px3.高度无法实现由内容撑开4.图片image的默认样式 320*240px5.swiper合适原创 2021-02-03 14:55:21 · 200 阅读 · 0 评论 -
微信小程序事件绑定-数字加一减一简单执行
需要实现的基本功能是:可以输入数字并在下端显示出来存在加减button 按一下加一或减一首先是分为两部分 demo.wxml 与 demo.js在demo.wxml中输入 //将input 与handleinput绑定 同时在demo.js中 handleinput(e){ this.setData ({num:e原创 2021-02-02 09:35:36 · 3967 阅读 · 2 评论