cloud-web-corejs 1.0.54-dev.415 → 1.0.54-dev.417
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -478,7 +478,13 @@ export default {
|
|
|
478
478
|
const val = opt.substring(0, opt.length - 1);
|
|
479
479
|
this.updateCodeMirror(val, val, "func");
|
|
480
480
|
},
|
|
481
|
-
|
|
481
|
+
getFunStr(funcName) {
|
|
482
|
+
let map = {
|
|
483
|
+
SUMIF: `([],"",[])`,
|
|
484
|
+
SUMIFS: `([],[],"")`,
|
|
485
|
+
};
|
|
486
|
+
return map[funcName] || "()";
|
|
487
|
+
},
|
|
482
488
|
updateCodeMirror(field, text, type = null) {
|
|
483
489
|
if (type) {
|
|
484
490
|
let obj = {
|
|
@@ -489,8 +495,12 @@ export default {
|
|
|
489
495
|
let selectionLet = obj.field.length + obj.text.length + obj.type.length; //光标位置;
|
|
490
496
|
let code = `{{${obj.field}.${obj.text}.${obj.type}}}`;
|
|
491
497
|
if (type === "func") {
|
|
492
|
-
code += "()";
|
|
493
|
-
selectionLet = selectionLet + 7;
|
|
498
|
+
// code += "()";
|
|
499
|
+
// selectionLet = selectionLet + 7;
|
|
500
|
+
let funStr = this.getFunStr(text);
|
|
501
|
+
code += funStr;
|
|
502
|
+
let num = "()" === funStr ? 7 : 7 - 1 + funStr.length;
|
|
503
|
+
selectionLet = selectionLet + num;
|
|
494
504
|
} else {
|
|
495
505
|
selectionLet = selectionLet + 6;
|
|
496
506
|
}
|
|
@@ -150,6 +150,10 @@ export default {
|
|
|
150
150
|
"将数值去掉小数,举例:INT(-8.9)=-9",
|
|
151
151
|
formulaSUM:
|
|
152
152
|
"返回一组数据的和,举例:SUM(1,2,3,...)=6",
|
|
153
|
+
formulaSUMIF:
|
|
154
|
+
`根据单个条件对指定区域内的数值求和,举例:SUMIF([10, 20, 30], ">10", [80, 120, 90])=210`,
|
|
155
|
+
formulaSUMIFS:
|
|
156
|
+
`根据多个条件对指定区域内的数值求和(条件需同时满足),举例:SUMIFS([1000, 2000, 1500, 3000], [400, 600, 700, 800], '>500', [2022, 2023, 2023, 2024], 2023)=3500`,
|
|
153
157
|
formulaAVERAGE:
|
|
154
158
|
"返回一组数据的平均数,举例:AVERAGE(1,2,3,...)=2",
|
|
155
159
|
formulaMAX:
|
|
@@ -657,6 +657,16 @@ export const formulas = [
|
|
|
657
657
|
fType: "designer.hint.formulaNumber",
|
|
658
658
|
fIntro: "designer.hint.formulaSUM",
|
|
659
659
|
},
|
|
660
|
+
{
|
|
661
|
+
fName: "SUMIF",
|
|
662
|
+
fType: "designer.hint.formulaNumber",
|
|
663
|
+
fIntro: "designer.hint.formulaSUMIF",
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
fName: "SUMIFS",
|
|
667
|
+
fType: "designer.hint.formulaNumber",
|
|
668
|
+
fIntro: "designer.hint.formulaSUMIFS",
|
|
669
|
+
},
|
|
660
670
|
{
|
|
661
671
|
fName: "AVERAGE",
|
|
662
672
|
fType: "designer.hint.formulaNumber",
|