@indfnd/common 1.1.2 → 1.1.3

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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.1.3](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v1.1.2...v1.1.3) (2025-09-04)
6
+
7
+
8
+ ### Features
9
+
10
+ * 增加percent的支持 ([ea15150](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/ea1515017342832f5c9b852b6d59f0aae5f44350))
11
+
5
12
  ### [1.1.2](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v1.1.1...v1.1.2) (2025-09-02)
6
13
 
7
14
  ### [1.1.1](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v1.1.0...v1.1.1) (2025-08-30)
@@ -5460,7 +5460,7 @@ var lodash = { exports: {} };
5460
5460
  })(lodash, lodash.exports);
5461
5461
  var _ = lodash.exports;
5462
5462
  const name$1 = "@indfnd/common";
5463
- const version = "1.1.1";
5463
+ const version = "1.1.2";
5464
5464
  const author = "huxuetong";
5465
5465
  const publishConfig = {
5466
5466
  registry: "https://registry.npmjs.org/"
@@ -43836,7 +43836,7 @@ function exportJsonToExcel(excelData) {
43836
43836
  if (columnType[j] === "p" && lineData[j]) {
43837
43837
  const numericValue = typeof lineData[j].value === "string" ? parseFloat(lineData[j].value.replace(/,/g, "")) : lineData[j].value;
43838
43838
  worksheet.getCell(rowsNow + i, j + 1).value = isNaN(numericValue) ? 0 : parseFloat(numericValue / 100);
43839
- dataCellStyle2.numFmt = numberFormat[j];
43839
+ worksheet.getCell(rowsNow + i, j + 1).numFmt = numberFormat[j];
43840
43840
  } else if (columnType[j] === "s") {
43841
43841
  if (lineData[j] === "0") {
43842
43842
  worksheet.getCell(rowsNow + i, j + 1).value = 0;
@@ -43846,11 +43846,11 @@ function exportJsonToExcel(excelData) {
43846
43846
  } else {
43847
43847
  worksheet.getCell(rowsNow + i, j + 1).value = "";
43848
43848
  }
43849
- dataCellStyle2.numFmt = "";
43849
+ worksheet.getCell(rowsNow + i, j + 1).numFmt = "";
43850
43850
  } else if (columnType[j] === "n" && lineData[j]) {
43851
43851
  const numericValue = typeof lineData[j].value === "string" ? parseFloat(lineData[j].value.replace(/,/g, "")) : lineData[j].value;
43852
43852
  worksheet.getCell(rowsNow + i, j + 1).value = isNaN(numericValue) ? 0 : numericValue;
43853
- dataCellStyle2.numFmt = numberFormat[j];
43853
+ worksheet.getCell(rowsNow + i, j + 1).numFmt = numberFormat[j];
43854
43854
  } else {
43855
43855
  worksheet.getCell(rowsNow + i, j + 1).value = "";
43856
43856
  }
@@ -43890,7 +43890,7 @@ function exportJsonToExcel(excelData) {
43890
43890
  if (columnType[j] === "p" && lineData[j]) {
43891
43891
  const numericValue = typeof lineData[j].value === "string" ? parseFloat(lineData[j].value.replace(/,/g, "")) : lineData[j].value;
43892
43892
  worksheet.getCell(rowsNow + i, j + 1).value = isNaN(numericValue) ? 0 : parseFloat(numericValue / 100);
43893
- dataCellStyle2.numFmt = numberFormat[j];
43893
+ worksheet.getCell(rowsNow + i, j + 1).numFmt = numberFormat[j];
43894
43894
  } else if (columnType[j] === "s") {
43895
43895
  if (lineData[j] === "0") {
43896
43896
  worksheet.getCell(rowsNow + i, j + 1).value = 0;
@@ -43900,11 +43900,11 @@ function exportJsonToExcel(excelData) {
43900
43900
  } else {
43901
43901
  worksheet.getCell(rowsNow + i, j + 1).value = "";
43902
43902
  }
43903
- dataCellStyle2.numFmt = "";
43903
+ worksheet.getCell(rowsNow + i, j + 1).numFmt = "";
43904
43904
  } else if (columnType[j] === "n" && lineData[j]) {
43905
43905
  const numericValue = typeof lineData[j].value === "string" ? parseFloat(lineData[j].value.replace(/,/g, "")) : lineData[j].value;
43906
43906
  worksheet.getCell(rowsNow + i, j + 1).value = isNaN(numericValue) ? 0 : numericValue;
43907
- dataCellStyle2.numFmt = numberFormat[j];
43907
+ worksheet.getCell(rowsNow + i, j + 1).numFmt = numberFormat[j];
43908
43908
  } else {
43909
43909
  worksheet.getCell(rowsNow + i, j + 1).value = "";
43910
43910
  }
@@ -43923,7 +43923,9 @@ function exportJsonToExcel(excelData) {
43923
43923
  worksheet.getCell(rowsNow + i, j + 1).value = "#ERROR!";
43924
43924
  }
43925
43925
  }
43926
- worksheet.getCell(rowsNow + i, j + 1).border = dataCellStyle2.border;
43926
+ _.forEach(dataCellStyle2, (v, k) => {
43927
+ worksheet.getCell(rowsNow + i, j + 1)[k] = v;
43928
+ });
43927
43929
  }
43928
43930
  } catch (cellError) {
43929
43931
  console.error(`\u5904\u7406\u5355\u5143\u683C\u6570\u636E\u65F6\u51FA\u9519 (\u884C: ${i + 1}, \u5217: ${j + 1}):`, cellError);