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