@airpower/web 1.7.0 → 1.7.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/dist/main.js +34 -28
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -17429,7 +17429,12 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
17429
17429
|
setup(__props) {
|
|
17430
17430
|
const props = __props;
|
|
17431
17431
|
const key = props.column.key;
|
|
17432
|
-
const value = computed(() =>
|
|
17432
|
+
const value = computed(() => {
|
|
17433
|
+
if (props.column.formatter) {
|
|
17434
|
+
return props.column.formatter(props.data);
|
|
17435
|
+
}
|
|
17436
|
+
return (props.data[key] || "").toString() || props.column.emptyValue || "-";
|
|
17437
|
+
});
|
|
17433
17438
|
return (_ctx, _cache) => {
|
|
17434
17439
|
return openBlock(), createBlock(unref(ACopy), { content: value.value }, {
|
|
17435
17440
|
default: withCtx(() => [
|
|
@@ -17594,7 +17599,7 @@ const _hoisted_5$1 = {
|
|
|
17594
17599
|
style: { "color": "#aaa", "margin-right": "3px" }
|
|
17595
17600
|
};
|
|
17596
17601
|
const _hoisted_6 = {
|
|
17597
|
-
key:
|
|
17602
|
+
key: 10,
|
|
17598
17603
|
style: { "color": "#aaa" }
|
|
17599
17604
|
};
|
|
17600
17605
|
const _hoisted_7 = { class: "ctrlRow" };
|
|
@@ -18231,11 +18236,15 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
18231
18236
|
function getRowEntity(scope) {
|
|
18232
18237
|
return scope.row;
|
|
18233
18238
|
}
|
|
18234
|
-
function getValue(scope,
|
|
18239
|
+
function getValue(scope, config) {
|
|
18240
|
+
const key = config.key;
|
|
18241
|
+
if (config.formatter) {
|
|
18242
|
+
return config.formatter(getRowEntity(scope));
|
|
18243
|
+
}
|
|
18235
18244
|
return getRowEntity(scope)[key];
|
|
18236
18245
|
}
|
|
18237
|
-
function getPayloadArray(scope,
|
|
18238
|
-
const value = getValue(scope,
|
|
18246
|
+
function getPayloadArray(scope, config) {
|
|
18247
|
+
const value = getValue(scope, config);
|
|
18239
18248
|
return value;
|
|
18240
18249
|
}
|
|
18241
18250
|
function tableRowClassName({ row }) {
|
|
@@ -18560,49 +18569,46 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
18560
18569
|
data: getRowEntity(scope),
|
|
18561
18570
|
index: scope.$index
|
|
18562
18571
|
}, () => [
|
|
18563
|
-
item.prefixText ? (openBlock(), createElementBlock("span", _hoisted_5$1, toDisplayString(item.prefixText), 1)) :
|
|
18564
|
-
|
|
18565
|
-
createTextVNode(toDisplayString(item.formatter(getRowEntity(scope))), 1)
|
|
18566
|
-
], 64)) : unref(getDictionary)(unref(EntityClass), item.key) ? (openBlock(), createBlock(unref(EnumColumn), {
|
|
18567
|
-
key: 2,
|
|
18572
|
+
item.prefixText ? (openBlock(), createElementBlock("span", _hoisted_5$1, toDisplayString(item.prefixText), 1)) : unref(getDictionary)(unref(EntityClass), item.key) ? (openBlock(), createBlock(unref(EnumColumn), {
|
|
18573
|
+
key: 1,
|
|
18568
18574
|
column: item,
|
|
18569
|
-
data: scope
|
|
18575
|
+
data: getRowEntity(scope),
|
|
18570
18576
|
dictionary: unref(getDictionary)(unref(EntityClass), item.key)
|
|
18571
18577
|
}, null, 8, ["column", "data", "dictionary"])) : item.image ? (openBlock(), createBlock(unref(_sfc_main$k), {
|
|
18572
|
-
key:
|
|
18578
|
+
key: 2,
|
|
18573
18579
|
height: item.imageHeight || 40,
|
|
18574
|
-
src: getValue(scope, item
|
|
18580
|
+
src: getValue(scope, item),
|
|
18575
18581
|
width: item.imageWidth || 40
|
|
18576
18582
|
}, null, 8, ["height", "src", "width"])) : item.phone ? (openBlock(), createBlock(unref(APhone), {
|
|
18577
|
-
key:
|
|
18583
|
+
key: 3,
|
|
18578
18584
|
desensitize: item.desensitize,
|
|
18579
|
-
phone: getValue(scope, item
|
|
18585
|
+
phone: getValue(scope, item)
|
|
18580
18586
|
}, null, 8, ["desensitize", "phone"])) : item.datetime ? (openBlock(), createBlock(unref(ADateTime), {
|
|
18581
|
-
key:
|
|
18587
|
+
key: 4,
|
|
18582
18588
|
formatter: item.datetime === true ? unref(DateTimeFormatter).FULL_DATE_TIME : item.datetime,
|
|
18583
|
-
"milli-second": getValue(scope, item
|
|
18589
|
+
"milli-second": getValue(scope, item)
|
|
18584
18590
|
}, null, 8, ["formatter", "milli-second"])) : item.money ? (openBlock(), createBlock(unref(AMoney), {
|
|
18585
|
-
key:
|
|
18586
|
-
money: getValue(scope, item
|
|
18587
|
-
}, null, 8, ["money"])) : item.payload ? (openBlock(), createElementBlock(Fragment, { key:
|
|
18591
|
+
key: 5,
|
|
18592
|
+
money: getValue(scope, item)
|
|
18593
|
+
}, null, 8, ["money"])) : item.payload ? (openBlock(), createElementBlock(Fragment, { key: 6 }, [
|
|
18588
18594
|
item.array ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
18589
|
-
createTextVNode(toDisplayString(getPayloadArray(scope, item
|
|
18595
|
+
createTextVNode(toDisplayString(getPayloadArray(scope, item).map((payload) => payload.getPayloadLabel()).join(",")), 1)
|
|
18590
18596
|
], 64)) : (openBlock(), createBlock(unref(APayload), {
|
|
18591
18597
|
key: 1,
|
|
18592
|
-
payload: getValue(scope, item
|
|
18598
|
+
payload: getValue(scope, item)
|
|
18593
18599
|
}, null, 8, ["payload"]))
|
|
18594
18600
|
], 64)) : item.desensitize ? (openBlock(), createBlock(unref(ADesensitize), {
|
|
18595
|
-
key:
|
|
18596
|
-
content: getValue(scope, item
|
|
18601
|
+
key: 7,
|
|
18602
|
+
content: getValue(scope, item),
|
|
18597
18603
|
type: item.desensitize
|
|
18598
18604
|
}, null, 8, ["content", "type"])) : item.copy ? (openBlock(), createBlock(unref(_sfc_main$4), {
|
|
18599
|
-
key:
|
|
18605
|
+
key: 8,
|
|
18600
18606
|
column: item,
|
|
18601
|
-
data: scope
|
|
18607
|
+
data: getRowEntity(scope)
|
|
18602
18608
|
}, null, 8, ["column", "data"])) : (openBlock(), createElementBlock("div", {
|
|
18603
|
-
key:
|
|
18609
|
+
key: 9,
|
|
18604
18610
|
class: normalizeClass([item.wrap ? "" : "nowrap", "a-table-column"])
|
|
18605
|
-
}, toDisplayString(getStringValue(getValue(scope, item
|
|
18611
|
+
}, toDisplayString(getStringValue(getValue(scope, item)) ?? item.emptyValue), 3)),
|
|
18606
18612
|
item.suffixText ? (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(item.suffixText), 1)) : createCommentVNode("", true)
|
|
18607
18613
|
]) : createCommentVNode("", true)
|
|
18608
18614
|
]),
|