
AI
swiper组件的常用属性 属性 类型 默认值 说明 indicator-dots boolean false 是否显示面板指示点 indicator-color color rgba(0,0,0,.3) 指示点颜色 indicator-active-color color #O000oo 当前选中的指示点颜色 autoplay boolean false 是否自动切换 interval number 5000 自动切换时间间隔 circular boolean false 是否采用衔接滑动 二、按钮 通过type属性指定按钮颜色类型 button普通按钮/button button type=primary主色调按钮/button button type=warn警告按钮/button size=mini 小尺寸按钮同一行 button size=mini普通按钮/button button type=primary size=mini主色调按钮/button button type=warn size=mini警告按钮/button pl
AIn 镂空按钮 button pl
AIn普通按钮/button button type=primary pl
AIn主色调按钮/button button type=warn pl
AIn警告按钮/button data:{ inputVal:'', storageVal:'' }, bindkeyInput:function(e){ let{det
AIl:{ value } }=e; this.setData({ inputVal:value }) }, cun:function(){ letarr=['name','age','sex']; leti=Math.floor(Math.random()*(2-0+1)+0); /*异步取缓存的值必须在回调函数里面取同的直接=即可*/ wx.setStorage({ key:'myname', data:'我是小超人', success:function(){ console.log('我成功了'); } }) /*同步的存起来*/ /*相同的key会把值覆盖*/ /*wx.setStorageSync('username',this.data.inputVal)*/ wx.setStorageSync(arr[i],this.data.inputVal) }, qu:function(){ this.setData({ /*同步的取缓存的值*/ /*浏览器中的缓存存进去的都是字符串,小程序里的缓存可以存字符串,数组和对象*/ /*undefined存进去是字符串null存进去是null类型Symbol存进去是Symbol类型*/ /*storageVal:wx.getStorageSync('username')*/ storageVal:wx.getStorageSync('sex') }) }, delSex:function(){ /*同步删除指定的某一个缓存*/ wx.removeStorageSync('sex') }, delAll:function(){ wx.clearStorageSync() },