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

Commit

Permalink
fix(formula): function
Browse files Browse the repository at this point in the history
fix :add row,formula errer
  • Loading branch information
mengshukeji committed Nov 24, 2020
1 parent 5e8f71f commit dad6e2b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gitee-mirror.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
# 填写地址:https://github.com/ly525/luban-h5/settings/secrets
dst_token: ${{ secrets.GITEE_TOKEN }}
# 项目同步白名单,可以选择填写多个,以英文逗号分割
static_list: "Luckyexcel,Luckysheet,LuckysheetDemo,LuckyexcelDemo,LuckysheetDocs,chartMix"
static_list: "Luckyexcel,Luckysheet,LuckysheetDemo,LuckyexcelDemo,LuckysheetDocs,chartMix,LuckysheetServer"
# 是否强制同步
force_update: true
# 账号类型:对 luban-h5 而言是 user,因为是个人项目;如果是企业项目,请填写 org,因为是组织下的项目
Expand Down
6 changes: 3 additions & 3 deletions README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
## 在线案例

- [协同编辑Demo](http://luckysheet.lashuju.com/demo/)
- [Java后台Luckysheet Server](https://github.com/mengshukeji/LuckysheetServer)
- [Java后台Luckysheet Server](https://gitee.com/mengshukeji/LuckysheetServer)

## 插件
- excel导入导出库: [Luckyexcel](https://github.com/mengshukeji/Luckyexcel)
- 图表插件: [chartMix](https://github.com/mengshukeji/chartMix)
- excel导入导出库: [Luckyexcel](https://gitee.com/mengshukeji/Luckyexcel)
- 图表插件: [chartMix](https://gitee.com/mengshukeji/chartMix)

## 特性

Expand Down
7 changes: 4 additions & 3 deletions src/function/func.js
Original file line number Diff line number Diff line change
Expand Up @@ -1632,9 +1632,10 @@ function luckysheet_getcelldata(txt) {
sheetdata = luckysheetfile[index].data;
rangetxt = val[0];

// if (formula.execFunctionGroupData != null) {
// sheetdata = formula.execFunctionGroupData;
// }
// 开放execFunctionGroupData,luckysheetfile[index].data是旧值,故取得新值用来计算
if (formula.execFunctionGroupData != null) {
sheetdata = formula.execFunctionGroupData;
}
}

if (rangetxt.indexOf(":") == -1) {
Expand Down
4 changes: 3 additions & 1 deletion src/global/refresh.js
Original file line number Diff line number Diff line change
Expand Up @@ -405,11 +405,13 @@ function jfrefreshgrid_adRC(data, cfg, ctrlType, ctrlValue, calc, filterObj, cf,
//公式链中公式范围改变对应单元格值的改变
let funcData = [];
if(calc.length > 0){
// formula.execFunctionGroupData = data;
// 开放execFunctionGroupData,execfunction中执行到取得单元格内容的时候会取得旧值,故在此将新的值存入formula.execFunctionGroupData
formula.execFunctionGroupData = data;

for(let i = 0; i < calc.length; i++){
let clc = calc[i];
let clc_r = clc.r, clc_c = clc.c, clc_i = clc.index, clc_funcStr = getcellFormula(clc_r, clc_c, clc_i, data);

let clc_result = formula.execfunction(clc_funcStr, clc_r, clc_c, clc_i,null, true);
clc.func = clc_result;

Expand Down
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
// console.info(index, isPivotInitial, isNewSheet)
},
rangeSelect:function(index, sheet){
console.info(index, sheet)
// console.info(index, sheet)
}


Expand Down

0 comments on commit dad6e2b

Please sign in to comment.