@indfnd/common 0.1.1 → 0.1.2

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
+ ### [0.1.2](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.1...v0.1.2) (2024-03-19)
6
+
7
+
8
+ ### Features
9
+
10
+ * 表格合计行支持传函数 ([d898b6b](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/d898b6bd6c12ba67f2ffb03da8656d7fd69214c1))
11
+
5
12
  ### [0.1.1](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v0.1.0...v0.1.1) (2024-03-18)
6
13
 
7
14
 
@@ -2,7 +2,7 @@ import { Button as Button$1, ButtonGroup as ButtonGroup$1, Input, Drawer as Draw
2
2
  import { isNil, formatDate as formatDate$1, useConfig, getLocalStorage, getQuarterNum, formatQuarter, str2Date, isDate, isArray, checkIdCard, checkVehicleNo, checkPhone, getDictMapApi, axios, isFunction, isString, exportJsonToExcel as exportJsonToExcel$1, importJsonFromExcel, on as on$1, off as off$1, deleteMenuHistoryApi, deleteMenuCollectApi, getMenuHistoryApi, getMenuCollectApi, listItemTreeApi, getPriceInfo, MIME_TYPE, base64ToBlob, putOssFileApi, isEqual, getCaptchaURL, guid, setLocalStorage, removeLocalStorage, clearSessionStorage, cryptor, getToken, putOssFileUrl, getOssFileUrl, responseInterceptors, config as config$1, setToken, loginApi, clearUserInfoCache, clearPermissionCache, logoutApi, getUserInfoCache, getUserInfoApi, setUserInfoCache, getSessionStorage, setSessionStorage, getAppListApi, getPermissionCache, getPermissionApi, setPermissionCache, menuHistoryApi, addMenuCollectApi, removeMenuCollectApi, getIndexDescCache, listIndexDescApi, setIndexDescCache } from "@indfnd/utils";
3
3
  import Vue$1 from "vue";
4
4
  const name$1 = "@indfnd/common";
5
- const version$1 = "0.1.0";
5
+ const version$1 = "0.1.1";
6
6
  const author = "huxuetong";
7
7
  const publishConfig = {
8
8
  registry: "https://registry.npmjs.org/"
@@ -48881,11 +48881,15 @@ var FormImpl = {
48881
48881
  if (d.dateFormat) {
48882
48882
  text = formatDate$1(text);
48883
48883
  }
48884
- itemInner = h("span", {
48885
- domProps: {
48886
- innerHTML: text || " "
48887
- }
48888
- });
48884
+ if (text) {
48885
+ itemInner = h("span", {}, [text]);
48886
+ } else {
48887
+ itemInner = h("span", {
48888
+ domProps: {
48889
+ innerHTML: " "
48890
+ }
48891
+ });
48892
+ }
48889
48893
  }
48890
48894
  }
48891
48895
  }
@@ -57436,7 +57440,9 @@ const __vue2_script$U = {
57436
57440
  let hasSumRow = _.some(this.flatColumns, (item2) => item2.isSum);
57437
57441
  if (hasSumRow) {
57438
57442
  let sumCols = _.filter(this.flatColumns, (item2) => item2.isSum);
57439
- let sumCalcCols = _.filter(sumCols, (item2) => isString(item2.isSum));
57443
+ let sumCalcCols = _.remove(sumCols, (item2) => isString(item2.isSum));
57444
+ let sumFuncCols = _.remove(sumCols, (item2) => item2.isSum instanceof Function);
57445
+ console.log("sumCols", sumCols, "sumFuncCols", sumFuncCols);
57440
57446
  const sumCalcRuleMap = {};
57441
57447
  _.forEach(sumCalcCols, (col) => {
57442
57448
  addCalcRuleMap(sumCalcRuleMap, col.isSum, col.field || col.key);
@@ -57474,6 +57480,9 @@ const __vue2_script$U = {
57474
57480
  },
57475
57481
  sumData
57476
57482
  );
57483
+ _.forEach(sumFuncCols, (d) => {
57484
+ sumData[d.field || d.key] = d.isSum(this.tableData);
57485
+ });
57477
57486
  let sumRows = [sumData];
57478
57487
  let calcRules = {};
57479
57488
  _.forEach(sumCalcRuleMap, (v, k) => {