幽灵资源网 Design By www.bzswh.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.bzswh.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
幽灵资源网 Design By www.bzswh.com
暂无评论...