富贵资源网 Design By www.hznty.com
最近在学习小程序,正好发现一个问题,微信小程序多列表渲染数据开关怎么互不影响,记录一下,分享给大家
<!--pages/list/list.wxml--> <wxs src="/UploadFiles/2021-04-02/filter.wxs">// pages/list/list.js const app = getApp() var time ='' Page({ data: { id:0, list: [], date:'', tr:'', s:'' }, //事件处理函数 // bindcancel:function (e) { // var that = this // console.log(e.target.dataset.id) // that.setData({ // tr: 1, // }) // }, bindDateChange:function (e) { console.log('picker发送选择改变,携带值为', e.detail.value) time = e.detail.value var that = this var arr = that.data.list var index = e.target.dataset.index var index1 = e.target.dataset.fid arr[index1][index].seleced = 1 arr[index1][index].time = e.detail.value that.setData({ id: e.target.dataset.id, date: time, list: arr }) }, cancle:function (e) { var that = this var arr = that.data.list var index = e.target.dataset.index var index1 = e.target.dataset.fid arr[index1][index].seleced = '' that.setData({ id: e.target.dataset.id, list: arr }) }, wait:function () { wx.navigateTo({ url: '../wait/wait' }) }, lis: function () { wx.navigateTo({ url: '../archives/archives' }) }, onLoad: function () { var that = this wx.request({ url: 'https://m.renyiwenzhen.com/xcx_ajax.php"{{item.seleced==1}}"标记点击效果,给数据自定义属性arr[index1][index].seleced = 1
富贵资源网 Design By www.hznty.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
富贵资源网 Design By www.hznty.com
暂无评论...