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

Commit

Permalink
fix(updatecell bug fix): fix undo redo
Browse files Browse the repository at this point in the history
  • Loading branch information
tubiaoge committed Sep 29, 2020
1 parent d8dfe50 commit d8b76ce
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions src/global/formula.js
Original file line number Diff line number Diff line change
Expand Up @@ -1303,8 +1303,8 @@ const luckysheetformula = {
if(getObjType(value) == "string" && value.slice(0, 1) == "=" && value.length > 1){
let v = _this.execfunction(value, r, c, undefined, true);
isRunExecFunction = false;
// curv = _this.execFunctionGroupData[r][c];
curv.v = _this.execFunctionGlobalData[r+"_"+c+"_"+Store.currentSheetIndex].v;
curv = d[r][c];
curv.v = v[1];
curv.f = v[2];

//打进单元格的sparklines的配置串, 报错需要单独处理。
Expand Down Expand Up @@ -1334,8 +1334,8 @@ const luckysheetformula = {
isRunExecFunction = false;
// get v/m/ct

// curv = _this.execFunctionGroupData[r][c];
curv.v = _this.execFunctionGlobalData[r+"_"+c+"_"+Store.currentSheetIndex].v;
curv = d[r][c];
curv.v = v[1];
curv.f = v[2];

//打进单元格的sparklines的配置串, 报错需要单独处理。
Expand Down Expand Up @@ -1364,9 +1364,8 @@ const luckysheetformula = {
let v = _this.execfunction(valueFunction, r, c, undefined, true);
isRunExecFunction = false;
// get v/m/ct
// curv = _this.execFunctionGroupData[r][c];
curv.v = _this.execFunctionGlobalData[r+"_"+c+"_"+Store.currentSheetIndex].v;

curv = d[r][c];
curv.v = v[1];
// get f
curv.f = v[2];

Expand Down Expand Up @@ -1399,9 +1398,13 @@ const luckysheetformula = {
_this.delFunctionGroup(r, c);
_this.execFunctionGroup(r, c, value);
isRunExecFunction = false;
// curv = _this.execFunctionGroupData[r][c];

curv.v = _this.execFunctionGlobalData[r+"_"+c+"_"+Store.currentSheetIndex].v;
curv = d[r][c];
// let gd = _this.execFunctionGlobalData[r+"_"+c+"_"+Store.currentSheetIndex];
// if(gd!=null){
// curv.v = gd.v;
// }
curv.v = value;

delete curv.f;
delete curv.spl;
Expand All @@ -1426,6 +1429,7 @@ const luckysheetformula = {
"f": v[2]
};


//打进单元格的sparklines的配置串, 报错需要单独处理。
if(v.length == 4 && v[3].type == "sparklines"){
let curCalv = v[3].data;
Expand Down

0 comments on commit d8b76ce

Please sign in to comment.