setHotAttr(hotObj,rowHeader,colHeader){// 给handsongtable绑定行列属性 console.log(hotObj); console.log(colHeader); console.log(rowHeader); let count_col = Number(hotObj.countCols());//获取列数 let count_row = Number(hotObj.countRows());//获取行数 for (let i=0;i<count_row;i++){ for (let j=0;j<count_col;j++){ hotObj.setCellMeta(i,j,'rowId',rowHeader[i]); hotObj.setCellMeta(i,j,'colId',colHeader[j]); // console.log(hotObj.getCellMeta(i,j)['rowId']); // console.log(hotObj.getCellMeta(i,j)['colId']); } } } self.setHotAttr(htobj.HtObj,self.testData[i].hotSettings.rowHeaders,self.testData[i].hotSettings.colHeaders);