@airpower/web 1.7.0 → 1.7.1

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.
Files changed (2) hide show
  1. package/dist/main.js +26 -25
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -17594,7 +17594,7 @@ const _hoisted_5$1 = {
17594
17594
  style: { "color": "#aaa", "margin-right": "3px" }
17595
17595
  };
17596
17596
  const _hoisted_6 = {
17597
- key: 11,
17597
+ key: 10,
17598
17598
  style: { "color": "#aaa" }
17599
17599
  };
17600
17600
  const _hoisted_7 = { class: "ctrlRow" };
@@ -18231,11 +18231,15 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
18231
18231
  function getRowEntity(scope) {
18232
18232
  return scope.row;
18233
18233
  }
18234
- function getValue(scope, key) {
18234
+ function getValue(scope, config) {
18235
+ const key = config.key;
18236
+ if (config.formatter) {
18237
+ return config.formatter(getRowEntity(scope));
18238
+ }
18235
18239
  return getRowEntity(scope)[key];
18236
18240
  }
18237
- function getPayloadArray(scope, key) {
18238
- const value = getValue(scope, key);
18241
+ function getPayloadArray(scope, config) {
18242
+ const value = getValue(scope, config);
18239
18243
  return value;
18240
18244
  }
18241
18245
  function tableRowClassName({ row }) {
@@ -18560,49 +18564,46 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
18560
18564
  data: getRowEntity(scope),
18561
18565
  index: scope.$index
18562
18566
  }, () => [
18563
- item.prefixText ? (openBlock(), createElementBlock("span", _hoisted_5$1, toDisplayString(item.prefixText), 1)) : createCommentVNode("", true),
18564
- item.formatter ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
18565
- createTextVNode(toDisplayString(item.formatter(getRowEntity(scope))), 1)
18566
- ], 64)) : unref(getDictionary)(unref(EntityClass), item.key) ? (openBlock(), createBlock(unref(EnumColumn), {
18567
- key: 2,
18567
+ item.prefixText ? (openBlock(), createElementBlock("span", _hoisted_5$1, toDisplayString(item.prefixText), 1)) : unref(getDictionary)(unref(EntityClass), item.key) ? (openBlock(), createBlock(unref(EnumColumn), {
18568
+ key: 1,
18568
18569
  column: item,
18569
18570
  data: scope.row,
18570
18571
  dictionary: unref(getDictionary)(unref(EntityClass), item.key)
18571
18572
  }, null, 8, ["column", "data", "dictionary"])) : item.image ? (openBlock(), createBlock(unref(_sfc_main$k), {
18572
- key: 3,
18573
+ key: 2,
18573
18574
  height: item.imageHeight || 40,
18574
- src: getValue(scope, item.key),
18575
+ src: getValue(scope, item),
18575
18576
  width: item.imageWidth || 40
18576
18577
  }, null, 8, ["height", "src", "width"])) : item.phone ? (openBlock(), createBlock(unref(APhone), {
18577
- key: 4,
18578
+ key: 3,
18578
18579
  desensitize: item.desensitize,
18579
- phone: getValue(scope, item.key)
18580
+ phone: getValue(scope, item)
18580
18581
  }, null, 8, ["desensitize", "phone"])) : item.datetime ? (openBlock(), createBlock(unref(ADateTime), {
18581
- key: 5,
18582
+ key: 4,
18582
18583
  formatter: item.datetime === true ? unref(DateTimeFormatter).FULL_DATE_TIME : item.datetime,
18583
- "milli-second": getValue(scope, item.key)
18584
+ "milli-second": getValue(scope, item)
18584
18585
  }, null, 8, ["formatter", "milli-second"])) : item.money ? (openBlock(), createBlock(unref(AMoney), {
18585
- key: 6,
18586
- money: getValue(scope, item.key)
18587
- }, null, 8, ["money"])) : item.payload ? (openBlock(), createElementBlock(Fragment, { key: 7 }, [
18586
+ key: 5,
18587
+ money: getValue(scope, item)
18588
+ }, null, 8, ["money"])) : item.payload ? (openBlock(), createElementBlock(Fragment, { key: 6 }, [
18588
18589
  item.array ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
18589
- createTextVNode(toDisplayString(getPayloadArray(scope, item.key).map((payload) => payload.getPayloadLabel()).join(",")), 1)
18590
+ createTextVNode(toDisplayString(getPayloadArray(scope, item).map((payload) => payload.getPayloadLabel()).join(",")), 1)
18590
18591
  ], 64)) : (openBlock(), createBlock(unref(APayload), {
18591
18592
  key: 1,
18592
- payload: getValue(scope, item.key)
18593
+ payload: getValue(scope, item)
18593
18594
  }, null, 8, ["payload"]))
18594
18595
  ], 64)) : item.desensitize ? (openBlock(), createBlock(unref(ADesensitize), {
18595
- key: 8,
18596
- content: getValue(scope, item.key),
18596
+ key: 7,
18597
+ content: getValue(scope, item),
18597
18598
  type: item.desensitize
18598
18599
  }, null, 8, ["content", "type"])) : item.copy ? (openBlock(), createBlock(unref(_sfc_main$4), {
18599
- key: 9,
18600
+ key: 8,
18600
18601
  column: item,
18601
18602
  data: scope.row
18602
18603
  }, null, 8, ["column", "data"])) : (openBlock(), createElementBlock("div", {
18603
- key: 10,
18604
+ key: 9,
18604
18605
  class: normalizeClass([item.wrap ? "" : "nowrap", "a-table-column"])
18605
- }, toDisplayString(getStringValue(getValue(scope, item.key)) ?? item.emptyValue), 3)),
18606
+ }, toDisplayString(getStringValue(getValue(scope, item)) ?? item.emptyValue), 3)),
18606
18607
  item.suffixText ? (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(item.suffixText), 1)) : createCommentVNode("", true)
18607
18608
  ]) : createCommentVNode("", true)
18608
18609
  ]),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@airpower/web",
3
3
  "type": "module",
4
- "version": "1.7.0",
4
+ "version": "1.7.1",
5
5
  "description": "AirPower-Web",
6
6
  "author": {
7
7
  "name": "Hamm",