Refactor: UI & Feature updates (Calculator, UnitConverter, Privacy, Cleanup)

This commit is contained in:
2026-02-09 01:15:19 +08:00
parent fa1a8e083e
commit 2c5d5b7505
52 changed files with 1351 additions and 2702 deletions

View File

@@ -162,6 +162,15 @@ Page({
});
},
swapUnits() {
const { fromIndex, toIndex } = this.data;
this.setData({
fromIndex: toIndex,
toIndex: fromIndex
});
this.calculate();
},
formatResult(val: number): string {
if (Math.abs(val) < 0.000001 || Math.abs(val) > 10000000) {
return val.toExponential(4);