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

Commit

Permalink
fix(bug): bug
Browse files Browse the repository at this point in the history
bug

fix #184, fix #337
  • Loading branch information
wpxp123456 committed Dec 14, 2020
1 parent 8dbe3e0 commit c003f8a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/controllers/sheetBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ let luckysheetsheetrightclick = function ($t, $cur, e) {
}, 1);
}
else {
//保存正在编辑的单元格内容
if (parseInt($("#luckysheet-input-box").css("top")) > 0) {
formula.updatecell(Store.luckysheetCellUpdate[0], Store.luckysheetCellUpdate[1]);
}
$("#luckysheet-input-box").removeAttr("style");
$("#luckysheet-formula-functionrange .luckysheet-formula-functionrange-highlight").remove();
}
Expand Down
2 changes: 1 addition & 1 deletion src/global/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -4519,7 +4519,7 @@ export function setSheetAdd(options = {}) {

let index = sheetmanage.generateRandomSheetIndex();
// calcChain公式链里的index也要跟着变化
if (sheetObject.calcChain.length > 0) {
if (sheetObject.calcChain && sheetObject.calcChain.length > 0) {
sheetObject.calcChain.forEach((item) => {
item.index = index
})
Expand Down

0 comments on commit c003f8a

Please sign in to comment.