@univerjs/engine-formula 0.8.1-nightly.202506181607 → 0.8.1
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/LICENSE +176 -0
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +5 -8
- package/lib/index.js +5 -8
- package/lib/umd/index.js +1 -1
- package/package.json +4 -4
package/lib/es/index.js
CHANGED
|
@@ -8434,19 +8434,16 @@ class Mi extends Qe {
|
|
|
8434
8434
|
return ie.SUFFIX;
|
|
8435
8435
|
}
|
|
8436
8436
|
execute() {
|
|
8437
|
-
|
|
8438
|
-
|
|
8439
|
-
|
|
8440
|
-
this.setValue(g.create(m.ERROR));
|
|
8441
|
-
return;
|
|
8442
|
-
}
|
|
8437
|
+
let e = this.getChildren()[0].getValue(), t;
|
|
8438
|
+
if (e == null)
|
|
8439
|
+
throw new Error("object is null");
|
|
8443
8440
|
if (this._operatorString === tt.PERCENTAGE) {
|
|
8444
8441
|
if (e.isReferenceObject() && (e = e.toArrayValueObject()), t = this._functionExecutor.calculate(
|
|
8445
8442
|
e,
|
|
8446
8443
|
y.create(100)
|
|
8447
8444
|
), t.isNumber()) {
|
|
8448
|
-
const
|
|
8449
|
-
t = y.create(
|
|
8445
|
+
const r = Number(t.getValue());
|
|
8446
|
+
t = y.create(r, "0.00%");
|
|
8450
8447
|
}
|
|
8451
8448
|
} else this._operatorString === tt.POUND ? t = this._handlerPound(e) : t = g.create(m.VALUE);
|
|
8452
8449
|
this.setValue(t);
|
package/lib/index.js
CHANGED
|
@@ -8434,19 +8434,16 @@ class Mi extends Qe {
|
|
|
8434
8434
|
return ie.SUFFIX;
|
|
8435
8435
|
}
|
|
8436
8436
|
execute() {
|
|
8437
|
-
|
|
8438
|
-
|
|
8439
|
-
|
|
8440
|
-
this.setValue(g.create(m.ERROR));
|
|
8441
|
-
return;
|
|
8442
|
-
}
|
|
8437
|
+
let e = this.getChildren()[0].getValue(), t;
|
|
8438
|
+
if (e == null)
|
|
8439
|
+
throw new Error("object is null");
|
|
8443
8440
|
if (this._operatorString === tt.PERCENTAGE) {
|
|
8444
8441
|
if (e.isReferenceObject() && (e = e.toArrayValueObject()), t = this._functionExecutor.calculate(
|
|
8445
8442
|
e,
|
|
8446
8443
|
y.create(100)
|
|
8447
8444
|
), t.isNumber()) {
|
|
8448
|
-
const
|
|
8449
|
-
t = y.create(
|
|
8445
|
+
const r = Number(t.getValue());
|
|
8446
|
+
t = y.create(r, "0.00%");
|
|
8450
8447
|
}
|
|
8451
8448
|
} else this._operatorString === tt.POUND ? t = this._handlerPound(e) : t = g.create(m.VALUE);
|
|
8452
8449
|
this.setValue(t);
|