From c7cf87a49b1b8ce64fb21249cd05950fabc0e546 Mon Sep 17 00:00:00 2001 From: break-wave <654896146@qq.com> Date: Fri, 4 Dec 2020 18:11:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20jfrefreshgrid=20=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E7=AC=AC=E4=BA=8C=E4=B8=AA=E5=8F=82=E6=95=B0=E5=BA=94=E8=AF=A5?= =?UTF-8?q?=E6=98=AF=E4=B8=AA=E6=95=B0=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/global/api.js | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/global/api.js b/src/global/api.js index ad4ebcee0..cb3728bf1 100644 --- a/src/global/api.js +++ b/src/global/api.js @@ -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); @@ -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); @@ -5424,7 +5421,7 @@ export function getAllSheets() { delete item.load; delete item.freezen; - + }) return data; @@ -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 } } @@ -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];