wx.getSystemInfo({success: function (res) {thisWidth = res.windowWidth;}});        
        that.setData({view_Width: thisWidth / ColIndex})//设置列宽  
        console.log('----------------------');
        console.log('列数' + ColIndex + ' ; ' + '屏幕宽度:' + thisWidth 
        + ';单元格宽度:' + thisWidth / ColIndex);  
        console.log(requestarray[0].ArraylistData);
        that.setData({ array: requestarray[0].ArraylistData})//设置列宽

 

 

 

 

 

    var thisWidth;//屏幕宽度
    //创建节点选择器
    var query = wx.createSelectorQuery();
    //选择id
    query.select('#AutoTableItem').boundingClientRect()
    query.exec(function (res) {
      //res就是 所有标签为mjltest的元素的信息 的数组
      console.log(res); 
      thisWidth = res[0].width; 
    });

 

相关文章:

  • 2022-02-11
  • 2022-02-07
  • 2021-06-15
  • 2022-12-23
  • 2022-01-07
  • 2022-01-07
  • 2022-01-08
  • 2021-08-24
猜你喜欢
  • 2022-01-07
  • 2022-01-16
  • 2021-11-18
  • 2022-01-07
相关资源
相似解决方案