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

Commit

Permalink
fix(add button bug): fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tubiaoge committed Sep 1, 2020
1 parent 2eb85a7 commit 3250ef6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/function/func.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ function luckysheet_compareWith() {
else if(sp == "-" && fp == null){
fp = 0;
}
else if(sp == "/" && (tp == 0 || tp == null)){
return error.d;
}

//计算result
function booleanOperation(a, operator, b){
Expand Down
6 changes: 3 additions & 3 deletions src/function/functionImplementation.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import formula from '../global/formula';
import func_methods from '../global/func_methods';
import editor from '../global/editor';
import { isdatetime, diff, isdatatype } from '../global/datecontroll';
import { isRealNum, isRealNull, valueIsError } from '../global/validate';
import { isRealNum, isRealNull, valueIsError,error } from '../global/validate';
import { jfrefreshgrid } from '../global/refresh';
import { genarate, update } from '../global/format';
import { orderbydata } from '../global/sort';
Expand Down Expand Up @@ -19496,15 +19496,15 @@ const functionImplementation = {

//结果为 TRUE
var value_if_true = func_methods.getFirstValue(arguments[1], "text");
if(valueIsError(value_if_true)){
if(valueIsError(value_if_true) && value_if_false!=error.d){
return value_if_true;
}

//结果为 FALSE
var value_if_false = "";
if(arguments.length == 3){
value_if_false = func_methods.getFirstValue(arguments[2], "text");
if(valueIsError(value_if_false)){
if(valueIsError(value_if_false) && value_if_false!=error.d){
return value_if_false;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/global/extend.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import editor from './editor';
import formula from './formula';
import { jfrefreshgrid_adRC, jfrefreshgrid_deleteCell, jfrefreshgrid_rhcw } from './refresh';
import { datagridgrowth } from './getdata';
import { datagridgrowth, getcellFormula } from './getdata';
import { setcellvalue } from './setdata';
import conditionformat from '../controllers/conditionformat';
import luckysheetFreezen from '../controllers/freezen';
Expand Down
1 change: 1 addition & 0 deletions src/global/refresh.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import rhchInit from './rhchInit';
import formula from './formula';
import editor from './editor';
import { setcellvalue } from './setdata';
import { getcellFormula } from './getdata';
import { computeRowlenArr } from './getRowlen';
import {
luckysheetDrawMain,
Expand Down

0 comments on commit 3250ef6

Please sign in to comment.