@unizhen/ui 0.0.12 → 0.0.13
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/ui.js +45 -39
- package/package.json +1 -1
package/lib/ui.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Fc = Object.defineProperty;
|
|
2
2
|
var Vc = (e, t, r) => t in e ? Fc(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
3
|
var qt = (e, t, r) => Vc(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
-
import { defineComponent as le, createElementBlock as w, openBlock as c, createStaticVNode as E, createElementVNode as i, ref as S, watch as
|
|
4
|
+
import { defineComponent as le, createElementBlock as w, openBlock as c, createStaticVNode as E, createElementVNode as i, ref as S, watch as de, nextTick as Le, h as Y, reactive as ja, resolveComponent as $, createBlock as A, withCtx as y, toDisplayString as L, createVNode as T, normalizeStyle as $e, inject as Ke, computed as _t, Fragment as se, createCommentVNode as W, normalizeClass as ue, createSlots as Re, createTextVNode as K, renderList as ke, provide as ba, onMounted as Be, resolveDirective as Bl, withDirectives as gt, mergeProps as _a, withModifiers as At, watchEffect as Fl, onBeforeUnmount as za, withKeys as Uc, renderSlot as xe, markRaw as Pc, defineAsyncComponent as Ec, onUnmounted as Vl, vShow as xa, resolveDynamicComponent as go } from "vue";
|
|
5
5
|
import { createDiscreteApi as Lc, NPopover as ct, NFlex as Ul, NButton as ge, NPopconfirm as qa, NTooltip as Pl, NIcon as ve, NDropdown as Hc, NCascader as El, NCheckboxGroup as Aa, NCheckbox as Ra, NColorPicker as Kc, NSwitch as Gc, NTimePicker as Wc, NDatePicker as Jc, NInputNumber as Qc, NSelect as Ll, NInput as Xc, NDivider as Oa, NFormItem as Ba, NForm as Fa, NInputGroup as Va, NUploadDragger as Yc, NImage as Hl, NUpload as Kl, useNotification as Ft, NImageGroup as Zc, NModal as ed, NInputGroupLabel as Gl, NGridItem as Wl, NGrid as Jl, NButtonGroup as td, NDrawerContent as Ua, NDrawer as Pa, NTag as rd, NEllipsis as nd, NSpin as Ea, NRadioGroup as Ql, NSkeleton as Xl, NDataTable as La, NPagination as ad, NRadio as od, NTabPane as sd, NTabs as ld, darkTheme as We, NConfigProvider as id, dateZhCN as ud, zhCN as cd } from "naive-ui";
|
|
6
6
|
import Ha from "axios";
|
|
7
7
|
import { createRouter as dd, createWebHistory as fd, useRouter as pd, useRoute as Vt } from "vue-router";
|
|
@@ -2330,7 +2330,7 @@ const rc = /* @__PURE__ */ _(gm, [["render", km]]), nc = /* @__PURE__ */ Object.
|
|
|
2330
2330
|
}
|
|
2331
2331
|
r.value = a;
|
|
2332
2332
|
};
|
|
2333
|
-
return n(e.icon),
|
|
2333
|
+
return n(e.icon), de(
|
|
2334
2334
|
() => e.icon,
|
|
2335
2335
|
(a) => {
|
|
2336
2336
|
n(a);
|
|
@@ -5203,7 +5203,7 @@ const pt = /* @__PURE__ */ _(gg, [["render", kg]]), bg = le({
|
|
|
5203
5203
|
}, z = () => o.value;
|
|
5204
5204
|
return Be(() => {
|
|
5205
5205
|
e.status !== 0 && (o.value = e.value, m());
|
|
5206
|
-
}), t({ validate: x, restoreValidation: I, getValues: z }),
|
|
5206
|
+
}), t({ validate: x, restoreValidation: I, getValues: z }), de(
|
|
5207
5207
|
() => e.items,
|
|
5208
5208
|
(j) => {
|
|
5209
5209
|
m(j);
|
|
@@ -5211,7 +5211,7 @@ const pt = /* @__PURE__ */ _(gg, [["render", kg]]), bg = le({
|
|
|
5211
5211
|
{
|
|
5212
5212
|
deep: !0
|
|
5213
5213
|
}
|
|
5214
|
-
),
|
|
5214
|
+
), de(
|
|
5215
5215
|
() => e.value,
|
|
5216
5216
|
(j) => {
|
|
5217
5217
|
o.value = j, m();
|
|
@@ -5437,7 +5437,7 @@ const Cg = /* @__PURE__ */ _(bg, [["render", xg]]), $g = le({
|
|
|
5437
5437
|
};
|
|
5438
5438
|
return Be(() => {
|
|
5439
5439
|
o.value = e.value, m();
|
|
5440
|
-
}), t({ changeItem: k }),
|
|
5440
|
+
}), t({ changeItem: k }), de(
|
|
5441
5441
|
() => e.items,
|
|
5442
5442
|
() => {
|
|
5443
5443
|
m();
|
|
@@ -5445,7 +5445,7 @@ const Cg = /* @__PURE__ */ _(bg, [["render", xg]]), $g = le({
|
|
|
5445
5445
|
{
|
|
5446
5446
|
deep: !0
|
|
5447
5447
|
}
|
|
5448
|
-
),
|
|
5448
|
+
), de(
|
|
5449
5449
|
() => e.value,
|
|
5450
5450
|
(F) => {
|
|
5451
5451
|
o.value = F;
|
|
@@ -5746,7 +5746,7 @@ const Tg = /* @__PURE__ */ _($g, [["render", Sg]]), Ng = le({
|
|
|
5746
5746
|
};
|
|
5747
5747
|
return Be(() => {
|
|
5748
5748
|
p();
|
|
5749
|
-
}),
|
|
5749
|
+
}), de(
|
|
5750
5750
|
() => e.value,
|
|
5751
5751
|
() => {
|
|
5752
5752
|
p();
|
|
@@ -6000,7 +6000,7 @@ const Nc = /* @__PURE__ */ _(Rg, [["render", Bg]]), Fg = le({
|
|
|
6000
6000
|
const s = (u = 0, p = e.value) => {
|
|
6001
6001
|
t.value = !0, r.value = a(u), String(u) !== String(p) && o(u, Number(p));
|
|
6002
6002
|
};
|
|
6003
|
-
return
|
|
6003
|
+
return de(
|
|
6004
6004
|
() => e.value,
|
|
6005
6005
|
(u, p) => {
|
|
6006
6006
|
s(Number(p) || 0, Number(u));
|
|
@@ -6103,7 +6103,7 @@ const Ug = /* @__PURE__ */ _(Fg, [["render", Vg]]), Pg = le({
|
|
|
6103
6103
|
e.mode === "video" && k();
|
|
6104
6104
|
}), za(() => {
|
|
6105
6105
|
D();
|
|
6106
|
-
}),
|
|
6106
|
+
}), de([() => e.width, () => e.width], () => {
|
|
6107
6107
|
e.mode === "video" && (D(), k());
|
|
6108
6108
|
}), {
|
|
6109
6109
|
videoRef: r,
|
|
@@ -6293,7 +6293,7 @@ const Wg = /* @__PURE__ */ _(Pg, [["render", Gg]]), Jg = le({
|
|
|
6293
6293
|
n.value[d.value] = z;
|
|
6294
6294
|
m(!0);
|
|
6295
6295
|
};
|
|
6296
|
-
return
|
|
6296
|
+
return de(
|
|
6297
6297
|
() => e.data,
|
|
6298
6298
|
(z) => {
|
|
6299
6299
|
U(z);
|
|
@@ -6546,7 +6546,7 @@ const e2 = /* @__PURE__ */ _(Jg, [["render", Zg]]), t2 = le({
|
|
|
6546
6546
|
}
|
|
6547
6547
|
p(!0);
|
|
6548
6548
|
};
|
|
6549
|
-
return
|
|
6549
|
+
return de(
|
|
6550
6550
|
() => e.data,
|
|
6551
6551
|
(g) => {
|
|
6552
6552
|
D(g);
|
|
@@ -7333,7 +7333,7 @@ const h2 = le({
|
|
|
7333
7333
|
};
|
|
7334
7334
|
return Vl(() => {
|
|
7335
7335
|
clearInterval(r.value);
|
|
7336
|
-
}),
|
|
7336
|
+
}), de(
|
|
7337
7337
|
() => e.status,
|
|
7338
7338
|
(u) => {
|
|
7339
7339
|
u === 1 && s();
|
|
@@ -7853,7 +7853,7 @@ const Dc = /* @__PURE__ */ _(m2, [["render", y2], ["__scopeId", "data-v-e91e9583
|
|
|
7853
7853
|
const P = Q(M.onClick);
|
|
7854
7854
|
M.onClick = (J) => {
|
|
7855
7855
|
z.value = !0, j.value = 2, Pe(J).then(async (ae) => {
|
|
7856
|
-
const be = await Ue(ae),
|
|
7856
|
+
const be = await Ue(ae), fe = { ...ae, ...be };
|
|
7857
7857
|
if (P && typeof P == "string")
|
|
7858
7858
|
try {
|
|
7859
7859
|
new Function(
|
|
@@ -7861,13 +7861,13 @@ const Dc = /* @__PURE__ */ _(m2, [["render", y2], ["__scopeId", "data-v-e91e9583
|
|
|
7861
7861
|
"POST",
|
|
7862
7862
|
"fnNotification",
|
|
7863
7863
|
P
|
|
7864
|
-
)(
|
|
7864
|
+
)(fe, we, s).then((lt) => {
|
|
7865
7865
|
C.value = lt;
|
|
7866
7866
|
}).catch(() => null);
|
|
7867
7867
|
} catch {
|
|
7868
7868
|
}
|
|
7869
7869
|
else
|
|
7870
|
-
C.value =
|
|
7870
|
+
C.value = fe;
|
|
7871
7871
|
}).catch(() => {
|
|
7872
7872
|
st();
|
|
7873
7873
|
});
|
|
@@ -7876,7 +7876,7 @@ const Dc = /* @__PURE__ */ _(m2, [["render", y2], ["__scopeId", "data-v-e91e9583
|
|
|
7876
7876
|
const P = Q(M.onClick);
|
|
7877
7877
|
M.onClick = (J) => {
|
|
7878
7878
|
z.value = !0, j.value = 1, Pe(J).then(async (ae) => {
|
|
7879
|
-
const be = await Ue(ae),
|
|
7879
|
+
const be = await Ue(ae), fe = { ...ae, ...be };
|
|
7880
7880
|
if (P && typeof P == "string")
|
|
7881
7881
|
try {
|
|
7882
7882
|
new Function(
|
|
@@ -7884,13 +7884,13 @@ const Dc = /* @__PURE__ */ _(m2, [["render", y2], ["__scopeId", "data-v-e91e9583
|
|
|
7884
7884
|
"POST",
|
|
7885
7885
|
"fnNotification",
|
|
7886
7886
|
P
|
|
7887
|
-
)(
|
|
7887
|
+
)(fe, we, s).then((lt) => {
|
|
7888
7888
|
C.value = lt;
|
|
7889
7889
|
}).catch(() => null);
|
|
7890
7890
|
} catch {
|
|
7891
7891
|
}
|
|
7892
7892
|
else
|
|
7893
|
-
C.value =
|
|
7893
|
+
C.value = fe;
|
|
7894
7894
|
}).catch(() => {
|
|
7895
7895
|
st();
|
|
7896
7896
|
});
|
|
@@ -7925,15 +7925,15 @@ const Dc = /* @__PURE__ */ _(m2, [["render", y2], ["__scopeId", "data-v-e91e9583
|
|
|
7925
7925
|
id: J.id,
|
|
7926
7926
|
tableId: ne
|
|
7927
7927
|
}), ae.then((be) => {
|
|
7928
|
-
const
|
|
7928
|
+
const fe = be && be[0];
|
|
7929
7929
|
Ee(
|
|
7930
7930
|
[M.action],
|
|
7931
|
-
|
|
7932
|
-
|
|
7931
|
+
fe.id,
|
|
7932
|
+
fe
|
|
7933
7933
|
).then((ze) => {
|
|
7934
7934
|
if (P && typeof P == "string") {
|
|
7935
7935
|
try {
|
|
7936
|
-
new Function("rowData", "res", P)(
|
|
7936
|
+
new Function("rowData", "res", P)(fe, ze).then((ir) => {
|
|
7937
7937
|
s.success({
|
|
7938
7938
|
content: ir,
|
|
7939
7939
|
duration: 3e3
|
|
@@ -7950,7 +7950,7 @@ const Dc = /* @__PURE__ */ _(m2, [["render", y2], ["__scopeId", "data-v-e91e9583
|
|
|
7950
7950
|
return;
|
|
7951
7951
|
}
|
|
7952
7952
|
if (P && typeof P == "function") {
|
|
7953
|
-
P(
|
|
7953
|
+
P(fe, ze, () => {
|
|
7954
7954
|
s.success({
|
|
7955
7955
|
content: () => o("Notice.success"),
|
|
7956
7956
|
duration: 3e3
|
|
@@ -7997,8 +7997,8 @@ const Dc = /* @__PURE__ */ _(m2, [["render", y2], ["__scopeId", "data-v-e91e9583
|
|
|
7997
7997
|
{},
|
|
7998
7998
|
{
|
|
7999
7999
|
default: () => {
|
|
8000
|
-
const
|
|
8001
|
-
return (
|
|
8000
|
+
const fe = I.value.query.page || 1, ze = I.value.query.pageSize || 30;
|
|
8001
|
+
return (fe - 1) * ze + (be + 1);
|
|
8002
8002
|
}
|
|
8003
8003
|
}
|
|
8004
8004
|
);
|
|
@@ -8015,10 +8015,10 @@ const Dc = /* @__PURE__ */ _(m2, [["render", y2], ["__scopeId", "data-v-e91e9583
|
|
|
8015
8015
|
const J = e.id || a.params.id;
|
|
8016
8016
|
if (!u.value && Z.value.commonTime && M.push(...Ie()), e.enableAction === !0 && R.value && R.value.length > 0) {
|
|
8017
8017
|
const ae = Q(R.value);
|
|
8018
|
-
for (const
|
|
8019
|
-
|
|
8018
|
+
for (const fe of ae)
|
|
8019
|
+
fe.type === "group" ? fe.children.forEach((ze) => {
|
|
8020
8020
|
It(ze, G);
|
|
8021
|
-
}) : It(
|
|
8021
|
+
}) : It(fe, G);
|
|
8022
8022
|
const be = {
|
|
8023
8023
|
title: () => o("Common.action"),
|
|
8024
8024
|
key: "action",
|
|
@@ -8029,10 +8029,10 @@ const Dc = /* @__PURE__ */ _(m2, [["render", y2], ["__scopeId", "data-v-e91e9583
|
|
|
8029
8029
|
checked: !0,
|
|
8030
8030
|
show: !0,
|
|
8031
8031
|
hide: !0,
|
|
8032
|
-
render(
|
|
8032
|
+
render(fe) {
|
|
8033
8033
|
return $t({
|
|
8034
8034
|
buttons: ae,
|
|
8035
|
-
rowData:
|
|
8035
|
+
rowData: fe,
|
|
8036
8036
|
callback: me,
|
|
8037
8037
|
tableId: J
|
|
8038
8038
|
});
|
|
@@ -8179,13 +8179,13 @@ const Dc = /* @__PURE__ */ _(m2, [["render", y2], ["__scopeId", "data-v-e91e9583
|
|
|
8179
8179
|
};
|
|
8180
8180
|
return r({ rebuild: zt, init: me }), Be(async () => {
|
|
8181
8181
|
await zt();
|
|
8182
|
-
}),
|
|
8182
|
+
}), de(
|
|
8183
8183
|
() => m.value,
|
|
8184
8184
|
() => {
|
|
8185
8185
|
lr();
|
|
8186
8186
|
},
|
|
8187
8187
|
{ deep: !0 }
|
|
8188
|
-
),
|
|
8188
|
+
), de([() => a.params.id, () => e.id], async () => {
|
|
8189
8189
|
cr(), await zt();
|
|
8190
8190
|
}), {
|
|
8191
8191
|
loading: D,
|
|
@@ -8681,7 +8681,7 @@ const z2 = /* @__PURE__ */ _(k2, [["render", j2]]), q2 = le({
|
|
|
8681
8681
|
}, x = (N) => N.delete ? "uz-table-child-delete" : "", I = async (N) => {
|
|
8682
8682
|
await m(N);
|
|
8683
8683
|
const { tableColumns: O, tableWidth: R } = await er(
|
|
8684
|
-
Q(e.item.params.columns),
|
|
8684
|
+
Q(N ?? e.item.params.columns),
|
|
8685
8685
|
!0,
|
|
8686
8686
|
e.status,
|
|
8687
8687
|
() => d.value.child,
|
|
@@ -8851,13 +8851,19 @@ const z2 = /* @__PURE__ */ _(k2, [["render", j2]]), q2 = le({
|
|
|
8851
8851
|
}), za(() => {
|
|
8852
8852
|
var N;
|
|
8853
8853
|
(N = p.value) == null || N.destroy(), p.value = null;
|
|
8854
|
-
}), r({ validate: j, restoreValidation: z }),
|
|
8854
|
+
}), r({ validate: j, restoreValidation: z }), de(
|
|
8855
|
+
() => e.item.params.columns,
|
|
8856
|
+
(N) => {
|
|
8857
|
+
I(N);
|
|
8858
|
+
},
|
|
8859
|
+
{ deep: !0 }
|
|
8860
|
+
), de(
|
|
8855
8861
|
() => e.value,
|
|
8856
8862
|
(N, O) => {
|
|
8857
8863
|
JSON.stringify(N) !== JSON.stringify(O) && f(N);
|
|
8858
8864
|
},
|
|
8859
8865
|
{ deep: !0 }
|
|
8860
|
-
),
|
|
8866
|
+
), de(
|
|
8861
8867
|
() => d.value.child,
|
|
8862
8868
|
(N) => {
|
|
8863
8869
|
t("update:value", N);
|
|
@@ -9281,7 +9287,7 @@ const W2 = /* @__PURE__ */ _(E2, [["render", G2]]), J2 = le({
|
|
|
9281
9287
|
p.value = !1;
|
|
9282
9288
|
});
|
|
9283
9289
|
};
|
|
9284
|
-
return
|
|
9290
|
+
return de(
|
|
9285
9291
|
() => e.show,
|
|
9286
9292
|
(f) => {
|
|
9287
9293
|
f && l();
|
|
@@ -9702,7 +9708,7 @@ const py = le({
|
|
|
9702
9708
|
};
|
|
9703
9709
|
return Be(() => {
|
|
9704
9710
|
Ml(e.option), X.active !== n.path && Sl(n.path, n.fullPath);
|
|
9705
|
-
}),
|
|
9711
|
+
}), de(
|
|
9706
9712
|
() => n,
|
|
9707
9713
|
(u) => {
|
|
9708
9714
|
X.active === n.path && Sl(u.path, u.fullPath);
|
|
@@ -9710,7 +9716,7 @@ const py = le({
|
|
|
9710
9716
|
{
|
|
9711
9717
|
deep: !0
|
|
9712
9718
|
}
|
|
9713
|
-
),
|
|
9719
|
+
), de(
|
|
9714
9720
|
() => e.option,
|
|
9715
9721
|
(u) => {
|
|
9716
9722
|
Ml(u);
|
|
@@ -10311,7 +10317,7 @@ function gk(e, t, r) {
|
|
|
10311
10317
|
refetch: f
|
|
10312
10318
|
};
|
|
10313
10319
|
}
|
|
10314
|
-
const Oy = "0.0.
|
|
10320
|
+
const Oy = "0.0.13";
|
|
10315
10321
|
let Oc;
|
|
10316
10322
|
async function Bc() {
|
|
10317
10323
|
const e = await fetch(
|