@skyfox2000/webui 1.2.4 → 1.2.5
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/lib/webui.es.js
CHANGED
|
@@ -4,7 +4,7 @@ import { A as rr, U as sr, a as or, g as nr, c as ir, d as cr, m as ur, p as dr,
|
|
|
4
4
|
import { EnvConfig as we } from "@skyfox2000/microbase";
|
|
5
5
|
import { FrontCache as le, httpPost as Ae, ResStatus as ze, SERVER_HOST as pt, fieldMapping as re } from "@skyfox2000/fapi";
|
|
6
6
|
import ne from "vue-m-message";
|
|
7
|
-
import { defineComponent as w, createBlock as _, openBlock as m, withModifiers as Z, unref as l, useAttrs as J, withCtx as h, createElementVNode as T, createVNode as y, mergeProps as F, renderSlot as E, normalizeStyle as me, toDisplayString as
|
|
7
|
+
import { defineComponent as w, createBlock as _, openBlock as m, withModifiers as Z, unref as l, useAttrs as J, withCtx as h, createElementVNode as T, createVNode as y, mergeProps as F, renderSlot as E, normalizeStyle as me, toDisplayString as P, createCommentVNode as k, ref as b, provide as Le, watch as $, onMounted as z, createTextVNode as N, inject as he, resolveDirective as ae, withDirectives as j, computed as G, createElementBlock as C, normalizeClass as M, createSlots as Ue, useSlots as ft, Fragment as O, renderList as L, resolveDynamicComponent as vt, onUnmounted as Ye, onActivated as mt, withKeys as Ce } from "vue";
|
|
8
8
|
import "async-validator";
|
|
9
9
|
import de from "dayjs";
|
|
10
10
|
import { Popover as ht, theme as Ve, Drawer as gt, Space as ee, Form as Ke, message as _t, FormItem as He, ConfigProvider as Se, Popconfirm as bt, Button as je, DropdownButton as xt, Menu as ge, MenuItem as _e, Dropdown as pe, Checkbox as yt, Switch as kt, Table as Qe, Tree as wt, Cascader as Ct, DatePicker as St, Input as fe, InputPassword as $t, InputNumber as Tt, RangePicker as It, Textarea as Dt, Transfer as Pt, TreeSelect as Et, LayoutContent as Ft } from "ant-design-vue";
|
|
@@ -333,11 +333,11 @@ const Ha = async (r, a, t) => {
|
|
|
333
333
|
let c = t.page, d = t.gridQuery;
|
|
334
334
|
return e.api || (e.api = c.api), e.authorize === void 0 && (e.authorize = c.authorize), t.isGridLoading.value = !0, Ae(e, d).then((s) => {
|
|
335
335
|
if (t.isGridLoading.value = !1, (s == null ? void 0 : s.status) === ze.SUCCESS && s.data) {
|
|
336
|
-
const f = s.data.map((
|
|
337
|
-
const x = { ...
|
|
336
|
+
const f = s.data.map((D) => {
|
|
337
|
+
const x = { ...D };
|
|
338
338
|
return u.forEach((R) => {
|
|
339
339
|
const q = R.dataIndex || R.key;
|
|
340
|
-
q && R.customRender && (x[q] = R.customRender(
|
|
340
|
+
q && R.customRender && (x[q] = R.customRender(D[q], D));
|
|
341
341
|
}), x;
|
|
342
342
|
}), S = new n({ fields: i }).parse(f), I = new Blob([`\uFEFF${S}`], { type: "text/csv" });
|
|
343
343
|
qe(I, p);
|
|
@@ -371,7 +371,7 @@ const Ha = async (r, a, t) => {
|
|
|
371
371
|
T("div", {
|
|
372
372
|
class: "text-[14px]",
|
|
373
373
|
style: me({ maxWidth: t.maxWidth })
|
|
374
|
-
},
|
|
374
|
+
}, P(t.text), 5)
|
|
375
375
|
])
|
|
376
376
|
]),
|
|
377
377
|
default: h(() => [
|
|
@@ -478,7 +478,7 @@ const Ha = async (r, a, t) => {
|
|
|
478
478
|
onClick: i[1] || (i[1] = () => l(ie)(l(n)))
|
|
479
479
|
}, {
|
|
480
480
|
default: h(() => [
|
|
481
|
-
N(
|
|
481
|
+
N(P(u.cancelText ?? "取消"), 1)
|
|
482
482
|
]),
|
|
483
483
|
_: 1
|
|
484
484
|
})) : k("", !0),
|
|
@@ -489,7 +489,7 @@ const Ha = async (r, a, t) => {
|
|
|
489
489
|
loading: l(n).isFormSaving.value
|
|
490
490
|
}, {
|
|
491
491
|
default: h(() => [
|
|
492
|
-
N(
|
|
492
|
+
N(P(u.saveAsText ?? "另存为"), 1)
|
|
493
493
|
]),
|
|
494
494
|
_: 1
|
|
495
495
|
}, 8, ["loading"])) : k("", !0),
|
|
@@ -500,7 +500,7 @@ const Ha = async (r, a, t) => {
|
|
|
500
500
|
loading: l(n).isFormSaving.value
|
|
501
501
|
}, {
|
|
502
502
|
default: h(() => [
|
|
503
|
-
N(
|
|
503
|
+
N(P(u.saveText ?? "保存"), 1)
|
|
504
504
|
]),
|
|
505
505
|
_: 1
|
|
506
506
|
}, 8, ["loading"])) : k("", !0)
|
|
@@ -588,7 +588,7 @@ const Ha = async (r, a, t) => {
|
|
|
588
588
|
label: h(() => [
|
|
589
589
|
T("span", {
|
|
590
590
|
class: M([l(o).errClass ? "text-[#ff4d4f]" : "", "w-full"])
|
|
591
|
-
},
|
|
591
|
+
}, P(i.label), 3)
|
|
592
592
|
]),
|
|
593
593
|
default: h(() => [
|
|
594
594
|
T("div", Wt, [
|
|
@@ -607,7 +607,7 @@ const Ha = async (r, a, t) => {
|
|
|
607
607
|
]),
|
|
608
608
|
_: 3
|
|
609
609
|
}, 16, ["required", "class"])) : k("", !0),
|
|
610
|
-
l(o).errClass ? (m(), C("span", Xt,
|
|
610
|
+
l(o).errClass ? (m(), C("span", Xt, P(l(o).msg), 1)) : k("", !0)
|
|
611
611
|
], 2));
|
|
612
612
|
}
|
|
613
613
|
}), Zt = { class: "w-1/3 relative mb-1" }, ea = { class: "flex items-center" }, ta = { class: "flex-grow pl-1" }, aa = {
|
|
@@ -645,12 +645,12 @@ const Ha = async (r, a, t) => {
|
|
|
645
645
|
fn: h(() => [
|
|
646
646
|
T("span", {
|
|
647
647
|
class: M([l(o).errClass ? "text-[#ff4d4f]" : "", "w-full"])
|
|
648
|
-
},
|
|
648
|
+
}, P(n.label), 3)
|
|
649
649
|
]),
|
|
650
650
|
key: "0"
|
|
651
651
|
} : void 0
|
|
652
652
|
]), 1040, ["required", "class"]),
|
|
653
|
-
l(o).msg ? (m(), C("span", aa,
|
|
653
|
+
l(o).msg ? (m(), C("span", aa, P(l(o).msg), 1)) : k("", !0)
|
|
654
654
|
]));
|
|
655
655
|
}
|
|
656
656
|
}), Xa = /* @__PURE__ */ w({
|
|
@@ -851,7 +851,7 @@ const Ha = async (r, a, t) => {
|
|
|
851
851
|
})
|
|
852
852
|
}, {
|
|
853
853
|
default: h(() => [
|
|
854
|
-
N(
|
|
854
|
+
N(P(s.label), 1)
|
|
855
855
|
]),
|
|
856
856
|
_: 2
|
|
857
857
|
}, 1032, ["type", "danger", "disabled", "onClick", "style"])), [
|
|
@@ -882,7 +882,7 @@ const Ha = async (r, a, t) => {
|
|
|
882
882
|
onClick: (v) => l(Y)(s, l(t).page, l(t), a.record)
|
|
883
883
|
}, {
|
|
884
884
|
default: h(() => [
|
|
885
|
-
N(
|
|
885
|
+
N(P(s.label), 1)
|
|
886
886
|
]),
|
|
887
887
|
_: 2
|
|
888
888
|
}, 1032, ["disabled", "onClick"])), [
|
|
@@ -974,7 +974,7 @@ const Ha = async (r, a, t) => {
|
|
|
974
974
|
class: "text-gray-700 hover:text-gray-900 select-none"
|
|
975
975
|
}, {
|
|
976
976
|
default: h(() => [
|
|
977
|
-
N(
|
|
977
|
+
N(P(s.title), 1)
|
|
978
978
|
]),
|
|
979
979
|
_: 2
|
|
980
980
|
}, 1032, ["checked", "onChange"])
|
|
@@ -1038,7 +1038,7 @@ const Ha = async (r, a, t) => {
|
|
|
1038
1038
|
disabled: l(H)(s)
|
|
1039
1039
|
}, {
|
|
1040
1040
|
default: h(() => [
|
|
1041
|
-
N(
|
|
1041
|
+
N(P(s.label), 1)
|
|
1042
1042
|
]),
|
|
1043
1043
|
_: 2
|
|
1044
1044
|
}, 1032, ["disabled"]))), 128))
|
|
@@ -1115,7 +1115,6 @@ const Ha = async (r, a, t) => {
|
|
|
1115
1115
|
return m(), C("div", oa, [
|
|
1116
1116
|
y(l(ee), null, {
|
|
1117
1117
|
default: h(() => [
|
|
1118
|
-
N(D(n.value) + " ", 1),
|
|
1119
1118
|
(m(!0), C(O, null, L(u.value, (v) => j((m(), _(l(B), {
|
|
1120
1119
|
key: v.key,
|
|
1121
1120
|
type: v.type,
|
|
@@ -1125,7 +1124,7 @@ const Ha = async (r, a, t) => {
|
|
|
1125
1124
|
onClick: (f) => l(Y)(v, l(e), l(t))
|
|
1126
1125
|
}, {
|
|
1127
1126
|
default: h(() => [
|
|
1128
|
-
N(
|
|
1127
|
+
N(P(v.label), 1)
|
|
1129
1128
|
]),
|
|
1130
1129
|
_: 2
|
|
1131
1130
|
}, 1032, ["type", "danger", "disabled", "icon", "onClick"])), [
|
|
@@ -1141,7 +1140,7 @@ const Ha = async (r, a, t) => {
|
|
|
1141
1140
|
onClick: (f) => l(Y)(v, l(e), l(t))
|
|
1142
1141
|
}, {
|
|
1143
1142
|
default: h(() => [
|
|
1144
|
-
N(
|
|
1143
|
+
N(P(v.label), 1)
|
|
1145
1144
|
]),
|
|
1146
1145
|
_: 2
|
|
1147
1146
|
}, 1032, ["disabled", "onClick"])), [
|
|
@@ -1285,10 +1284,10 @@ const Ha = async (r, a, t) => {
|
|
|
1285
1284
|
v.value = !0;
|
|
1286
1285
|
}, 50);
|
|
1287
1286
|
}), (f, g) => {
|
|
1288
|
-
var I,
|
|
1287
|
+
var I, D;
|
|
1289
1288
|
const S = ae("auth");
|
|
1290
1289
|
return m(), C(O, null, [
|
|
1291
|
-
(I = l(e).buttons) != null && I.value.length || (
|
|
1290
|
+
(I = l(e).buttons) != null && I.value.length || (D = l(e).tools) != null && D.length ? (m(), _(ca, {
|
|
1292
1291
|
key: 0,
|
|
1293
1292
|
"grid-ctrl": l(e),
|
|
1294
1293
|
"editor-ctrl": l(e).editor
|
|
@@ -1404,7 +1403,7 @@ const Ha = async (r, a, t) => {
|
|
|
1404
1403
|
}, () => [
|
|
1405
1404
|
T("div", da, [
|
|
1406
1405
|
y(l(U), { icon: g }, null, 8, ["icon"]),
|
|
1407
|
-
T("span", pa,
|
|
1406
|
+
T("span", pa, P(f), 1)
|
|
1408
1407
|
])
|
|
1409
1408
|
])
|
|
1410
1409
|
]),
|
|
@@ -1437,15 +1436,15 @@ const Ha = async (r, a, t) => {
|
|
|
1437
1436
|
);
|
|
1438
1437
|
const d = a;
|
|
1439
1438
|
n.inputEmit = d;
|
|
1440
|
-
const s = b([]), v = (I,
|
|
1441
|
-
if (!
|
|
1439
|
+
const s = b([]), v = (I, D) => {
|
|
1440
|
+
if (!D || D.length === 0) {
|
|
1442
1441
|
d("update:labels", []), d("update:value", []);
|
|
1443
1442
|
return;
|
|
1444
1443
|
}
|
|
1445
|
-
const x =
|
|
1444
|
+
const x = D.map((R) => R.label);
|
|
1446
1445
|
d("update:labels", x), d(
|
|
1447
1446
|
"update:value",
|
|
1448
|
-
|
|
1447
|
+
D.map((R) => R.value)
|
|
1449
1448
|
), u != null && u.value.errClass && p && V(p);
|
|
1450
1449
|
};
|
|
1451
1450
|
return z(() => {
|
|
@@ -1457,12 +1456,12 @@ const Ha = async (r, a, t) => {
|
|
|
1457
1456
|
}), Ne(t.autoload, t, s, n, o.value, o.value.params);
|
|
1458
1457
|
}), Ye(() => {
|
|
1459
1458
|
Re(t, n);
|
|
1460
|
-
}), (I,
|
|
1459
|
+
}), (I, D) => {
|
|
1461
1460
|
var x;
|
|
1462
1461
|
return m(), C("div", null, [
|
|
1463
1462
|
s.value.length ? k("", !0) : (m(), C("div", fa, [
|
|
1464
1463
|
y(l(it), { class: "text-[#555] mx-[5px] !ml-[10px] !w-4 !h-4" }),
|
|
1465
|
-
|
|
1464
|
+
D[0] || (D[0] = T("span", null, "数据加载中...", -1))
|
|
1466
1465
|
])),
|
|
1467
1466
|
y(l(Ct), F({
|
|
1468
1467
|
options: s.value,
|
|
@@ -1883,12 +1882,12 @@ const rl = /* @__PURE__ */ w({
|
|
|
1883
1882
|
targetKeys: c.value,
|
|
1884
1883
|
onChange: d
|
|
1885
1884
|
}, s.$attrs), {
|
|
1886
|
-
children: h(({ direction: g, disabled: S, filteredItems: I, onItemSelectAll:
|
|
1885
|
+
children: h(({ direction: g, disabled: S, filteredItems: I, onItemSelectAll: D, onItemSelect: x, selectedKeys: R }) => [
|
|
1887
1886
|
E(s.$slots, "children", {
|
|
1888
1887
|
direction: g,
|
|
1889
1888
|
disabled: S,
|
|
1890
1889
|
filteredItems: I,
|
|
1891
|
-
onItemSelectAll:
|
|
1890
|
+
onItemSelectAll: D,
|
|
1892
1891
|
onItemSelect: x,
|
|
1893
1892
|
selectedKeys: R
|
|
1894
1893
|
})
|
|
@@ -2102,7 +2101,7 @@ const rl = /* @__PURE__ */ w({
|
|
|
2102
2101
|
const t = /* @__PURE__ */ new Date(), e = { month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit" }, o = t.toLocaleString(void 0, e).replace(/\//g, "-").replace(",", "");
|
|
2103
2102
|
a.value = t.getFullYear() + "-" + o;
|
|
2104
2103
|
}, 1e3);
|
|
2105
|
-
}), (t, e) => (m(), C("div", Da,
|
|
2104
|
+
}), (t, e) => (m(), C("div", Da, P(a.value), 1));
|
|
2106
2105
|
}
|
|
2107
2106
|
});
|
|
2108
2107
|
export {
|
package/package.json
CHANGED