有如下幾種數據格式:
sort_condition: { curIndex: '0', curArrow: '0' } ,//排序界面 date_condition: [ { curIndex: '0', curArrow: '0' } ], screen_type: 0,//0 排序 1 條件 2 更多
設置格式的時候可以分別采用下面的方法:
this.setData({ 'sort_condition.curIndex': 1 }); this.setData({ 'date_condition[0].curIndex': 1 }); this.setData({ screen_tyle:1 });
如此,可以達到根據數據影響界面綁定數據的功能