Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Commit

Permalink
fix: jfrefreshgrid 函数第二个参数应该是个数组
Browse files Browse the repository at this point in the history
  • Loading branch information
jerry-f committed Dec 4, 2020
1 parent d5830d7 commit c7cf87a
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions src/global/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,12 +348,9 @@ export function setCellFormat(row, column, attr, value, options = {}) {
} else {
cellData[attr] = value;
}

// refresh
jfrefreshgrid(targetSheetData, {
row: [row],
column: [column]
})
jfrefreshgrid(data, [{ "row": [row, row], "column": [column, column] }]);

if (success && typeof success === 'function') {
success(cellData);
Expand Down Expand Up @@ -1480,7 +1477,7 @@ export function getRangeAxis() {
let result = [];
let rangeArr = Store.luckysheet_select_save;
let sheetIndex = Store.currentSheetIndex;

rangeArr.forEach(ele=>{
let axisText = getRangetxt(sheetIndex, {column:ele.column,row:ele.row});
result.push(axisText);
Expand Down Expand Up @@ -5424,7 +5421,7 @@ export function getAllSheets() {

delete item.load;
delete item.freezen;

})

return data;
Expand Down Expand Up @@ -5926,12 +5923,12 @@ export function toJson(){
* @param {String} txt 范围字符串
*/
export function getRangeByTxt(txt){

// 默认取当前第一个范围
if(txt == null){
return {
return {
column:Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1].column,
row:Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1].row
row:Store.luckysheet_select_save[Store.luckysheet_select_save.length - 1].row
}
}

Expand All @@ -5949,7 +5946,7 @@ export function getRangeByTxt(txt){
* @param {Object | Array} range 范围数组
*/
export function getTxtByRange(range=Store.luckysheet_select_save){

// 单个范围
if(getObjType(range) === 'object'){
range = [range];
Expand Down

0 comments on commit c7cf87a

Please sign in to comment.