|
@@ -205,7 +205,26 @@ export default {
|
|
rangeArr = [this.splitFormula(range)]
|
|
rangeArr = [this.splitFormula(range)]
|
|
}
|
|
}
|
|
order!==null && luckysheet.setSheetActive(order)
|
|
order!==null && luckysheet.setSheetActive(order)
|
|
- luckysheet.setRangeShow(rangeArr)
|
|
|
|
|
|
+ console.log(rangeArr)
|
|
|
|
+
|
|
|
|
+ let rowLen = luckysheet.getSheet().data.length;
|
|
|
|
+ let filterRangeArr = []
|
|
|
|
+ rangeArr.forEach(item =>{
|
|
|
|
+ filterRangeArr.push(this.filterFormula(item,rowLen))
|
|
|
|
+ })
|
|
|
|
+ console.log(filterRangeArr)
|
|
|
|
+ luckysheet.setRangeShow(filterRangeArr)
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ /* 处理超过表格行无法显示选区的问题 超过后截止到最后一行 */
|
|
|
|
+ filterFormula(item,rowLen) {
|
|
|
|
+ let celArr = item.split(':');
|
|
|
|
+ let numStr = celArr[1].replace(/[^0-9]/ig,"");
|
|
|
|
+ let letterStr = celArr[1].replace(/[^a-z]+/ig,"");
|
|
|
|
+
|
|
|
|
+ let lastNum = Number(numStr) > rowLen ? rowLen : Number(numStr);
|
|
|
|
+
|
|
|
|
+ return `${celArr[0]}:${letterStr}${lastNum}`
|
|
},
|
|
},
|
|
|
|
|
|
/* 解析公式 */
|
|
/* 解析公式 */
|