From 6fc353d1ff7bdc532f24f29789c81b1a5de97799 Mon Sep 17 00:00:00 2001 From: flowerField Date: Wed, 27 Jan 2021 15:10:37 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=8D=95=E5=85=83=E6=A0=BC=E5=87=BD?= =?UTF-8?q?=E6=95=B0=E8=AE=A1=E7=AE=97=E5=BC=95=E7=94=A8=E8=87=AA=E5=B7=B1?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/menuButton.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/controllers/menuButton.js b/src/controllers/menuButton.js index f6c50f6..820bb10 100644 --- a/src/controllers/menuButton.js +++ b/src/controllers/menuButton.js @@ -4226,23 +4226,25 @@ const menuButton = { let cell = null; if(type == "c"){ - cell = d[ed_m][fix]; + cell = d[ed_m + 1][fix]; } else{ - cell = d[fix][ed_m]; + cell = d[fix][ed_m + 1]; } + /* 备注:在搜寻的时候排除自己以解决单元格函数引用自己的问题 */ if(cell != null && cell.v != null && cell.v.toString().length > 0){ - let c = ed_m; + let c = ed_m + 1; if(type == "c"){ - cell = d[ed_m][fix]; + cell = d[ed_m + 1][fix]; } else{ - cell = d[fix][ed_m]; + cell = d[fix][ed_m + 1]; } while ( cell != null && cell.v != null && cell.v.toString().length > 0) { + c++; let len = null; @@ -4274,10 +4276,10 @@ const menuButton = { } else{ if(type == "c"){ - _this.backFormulaInput(d, ed_m, fix, [st_m, ed_m], [fix ,fix], formula); + _this.backFormulaInput(d, ed_m + 1, fix, [st_m, ed_m], [fix ,fix], formula); } else{ - _this.backFormulaInput(d, fix, ed_m, [fix ,fix], [st_m, ed_m], formula); + _this.backFormulaInput(d, fix, ed_m + 1, [fix ,fix], [st_m, ed_m], formula); } } }