iv-npm 1.6.5 → 1.6.7

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iv-npm",
3
- "version": "1.6.5",
3
+ "version": "1.6.7",
4
4
  "description": "公共通用包",
5
5
  "author": "Mr.Cong",
6
6
  "license": "ISC",
@@ -350,6 +350,7 @@ var LineIDEnum = /* @__PURE__ */ ((LineIDEnum2) => {
350
350
 
351
351
  // utils/printUI/index.ts
352
352
  function getAmountByUnit(amount) {
353
+ const plusOrMinusFlag = amount < 0 || (amount + "").includes("-");
353
354
  const integersUnits = ["\u4EBF", "\u4EDF", "\u4F70", "\u62FE", "\u4E07", "\u4EDF", "\u4F70", "\u62FE", "\u5143"];
354
355
  const capitalUnits = {
355
356
  0: "\u96F6",
@@ -382,7 +383,7 @@ function getAmountByUnit(amount) {
382
383
  for (const key in capitalUnits) {
383
384
  resultStr = resultStr.replaceAll(key, capitalUnits[key]);
384
385
  }
385
- return resultStr;
386
+ return (plusOrMinusFlag ? "\u8D1F " : "") + resultStr;
386
387
  }
387
388
  var amountToFixed = (_v) => {
388
389
  if (!_v)