@unizhen/ui 0.0.61 → 0.0.62

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/lib/ui.js +40 -40
  2. package/package.json +1 -1
package/lib/ui.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent as se, createElementBlock as d, openBlock as a, createStaticVNode as R, createElementVNode as o, ref as $, watch as le, nextTick as Ne, h as Z, reactive as Lt, resolveComponent as y, createBlock as I, withCtx as m, toDisplayString as j, createVNode as _, computed as Be, normalizeStyle as $e, inject as Ve, normalizeClass as ce, createSlots as ze, createTextVNode as H, Fragment as oe, renderList as we, provide as Vt, resolveDirective as jn, withDirectives as Qe, createCommentVNode as q, onMounted as Le, mergeProps as It, withModifiers as st, watchEffect as Rn, onBeforeUnmount as Et, withKeys as Xa, renderSlot as be, markRaw as Ya, defineAsyncComponent as Za, onUnmounted as An, vShow as Ut, resolveDynamicComponent as xn } from "vue";
1
+ import { defineComponent as se, createElementBlock as d, openBlock as a, createStaticVNode as R, createElementVNode as o, ref as $, watch as le, nextTick as Ne, h as Z, reactive as Lt, resolveComponent as y, createBlock as I, withCtx as m, toDisplayString as j, createVNode as _, computed as Be, normalizeStyle as $e, inject as Ve, normalizeClass as ce, createSlots as ze, createTextVNode as H, Fragment as re, renderList as we, provide as Vt, resolveDirective as jn, withDirectives as Qe, createCommentVNode as q, onMounted as Le, mergeProps as It, withModifiers as st, watchEffect as Rn, onBeforeUnmount as Et, withKeys as Xa, renderSlot as be, markRaw as Ya, defineAsyncComponent as Za, onUnmounted as An, vShow as Ut, resolveDynamicComponent as xn } from "vue";
2
2
  import { createDiscreteApi as es, NPopover as Ee, NFlex as Pn, NButton as ve, NPopconfirm as Kt, NTooltip as Hn, NIcon as ge, NDropdown as ts, NCascader as qn, NCheckboxGroup as Wt, NCheckbox as Gt, NColorPicker as ns, NSwitch as os, NTimePicker as rs, NDatePicker as as, NInputNumber as ss, NSelect as ls, NInput as is, NDivider as Qt, NFormItem as Jt, NForm as Xt, NSpin as ut, NInputGroup as Yt, NUploadDragger as cs, NImage as Ln, NUpload as En, useNotification as dt, NImageGroup as us, NModal as ds, NInputGroupLabel as Kn, NGridItem as Wn, NGrid as Gn, NButtonGroup as ps, NDrawerContent as Zt, NDrawer as en, NTag as fs, NEllipsis as hs, NRadioGroup as Qn, NSkeleton as Jn, NDataTable as tn, NPagination as ms, NRadio as ws, NTabPane as gs, NTabs as vs, darkTheme as pe, NConfigProvider as ks, dateZhCN as ys, zhCN as bs } from "naive-ui";
3
3
  import nn from "axios";
4
4
  import { createRouter as $s, createWebHistory as xs, useRouter as _s, useRoute as pt } from "vue-router";
@@ -3741,7 +3741,7 @@ function Oh(e, t, n, c, l, s) {
3741
3741
  }, {
3742
3742
  default: m(() => [
3743
3743
  o("div", Uh, [
3744
- (a(!0), d(oe, null, we(e.item.params.options, (f) => (a(), I(u, {
3744
+ (a(!0), d(re, null, we(e.item.params.options, (f) => (a(), I(u, {
3745
3745
  key: f.value,
3746
3746
  label: f.label,
3747
3747
  value: f.value
@@ -3799,7 +3799,7 @@ function Oh(e, t, n, c, l, s) {
3799
3799
  "onUpdate:value": t[21] || (t[21] = (f) => e.formValue[e.item.key] = f),
3800
3800
  item: e.item,
3801
3801
  status: e.status
3802
- }, null, 8, ["value", "item", "status"])) : (a(), d(oe, { key: 13 }, [], 64));
3802
+ }, null, 8, ["value", "item", "status"])) : (a(), d(re, { key: 13 }, [], 64));
3803
3803
  }
3804
3804
  const We = /* @__PURE__ */ w(Ih, [["render", Oh]]), jh = se({
3805
3805
  name: "UzForm",
@@ -3997,15 +3997,15 @@ const We = /* @__PURE__ */ w(Ih, [["render", Oh]]), jh = se({
3997
3997
  C.value.forEach((K) => {
3998
3998
  V[K] = JSON.stringify(V[K]);
3999
3999
  }), Object.keys(V).forEach((K) => {
4000
- K.includes("sub_") && V[K].forEach((re) => {
4001
- Object.keys(re).forEach((ke) => {
4002
- Array.isArray(re[ke]) && (re[ke] = JSON.stringify(re[ke]));
4000
+ K.includes("sub_") && V[K].forEach((oe) => {
4001
+ Object.keys(oe).forEach((ke) => {
4002
+ Array.isArray(oe[ke]) && (oe[ke] = JSON.stringify(oe[ke]));
4003
4003
  });
4004
4004
  });
4005
4005
  });
4006
4006
  const E = JSON.stringify(
4007
4007
  V,
4008
- (K, re) => re === void 0 ? null : Array.isArray(re) ? re.filter((ke) => ke !== "") : re
4008
+ (K, oe) => oe === void 0 ? null : Array.isArray(oe) ? oe.filter((ke) => ke !== "") : oe
4009
4009
  ), Q = JSON.parse(E);
4010
4010
  F(Q);
4011
4011
  } else
@@ -4069,7 +4069,7 @@ const We = /* @__PURE__ */ w(Ih, [["render", Oh]]), jh = se({
4069
4069
  }), Rh = ["onClick"];
4070
4070
  function Ah(e, t, n, c, l, s) {
4071
4071
  const i = y("Plus"), p = y("NIcon"), C = y("UzTableChild"), N = y("UzTableQuestChild"), T = y("NDivider"), S = y("UzFormItem"), b = y("NFormItem"), u = y("NForm"), r = y("UzTableDrawer"), v = jn("media");
4072
- return a(), d(oe, null, [
4072
+ return a(), d(re, null, [
4073
4073
  _(u, {
4074
4074
  ref: "formRef",
4075
4075
  class: "w-full h-full",
@@ -4083,7 +4083,7 @@ function Ah(e, t, n, c, l, s) {
4083
4083
  Qe((a(), d("div", {
4084
4084
  class: ce(e.isMobile ? "" : "uz-form-grid")
4085
4085
  }, [
4086
- (a(!0), d(oe, null, we(e.formItems, (g, h) => (a(), d(oe, { key: h }, [
4086
+ (a(!0), d(re, null, we(e.formItems, (g, h) => (a(), d(re, { key: h }, [
4087
4087
  e.itemShow(g) ? (a(), I(b, {
4088
4088
  key: 0,
4089
4089
  path: g.key,
@@ -4295,7 +4295,7 @@ const Ph = /* @__PURE__ */ w(jh, [["render", Ah]]), Hh = se({
4295
4295
  }), qh = ["onClick"];
4296
4296
  function Lh(e, t, n, c, l, s) {
4297
4297
  const i = y("Plus"), p = y("NIcon"), C = y("Trash"), N = y("NButton"), T = y("UzTableChild"), S = y("UzFormItem"), b = y("NFormItem"), u = y("Draggable", !0), r = y("NDivider"), v = y("NForm"), g = y("UzTableDrawer");
4298
- return a(), d(oe, null, [
4298
+ return a(), d(re, null, [
4299
4299
  _(v, {
4300
4300
  ref: "formRef",
4301
4301
  class: "w-full h-full",
@@ -4610,7 +4610,7 @@ function Jh(e, t, n, c, l, s) {
4610
4610
  ]),
4611
4611
  _: 1
4612
4612
  }, 8, ["accept", "max", "on-before-upload"])) : q("", !0),
4613
- (a(!0), d(oe, null, we(e.formValue, (f, x) => (a(), d("div", {
4613
+ (a(!0), d(re, null, we(e.formValue, (f, x) => (a(), d("div", {
4614
4614
  key: x,
4615
4615
  class: "uz-form-upload-item w-20 h-20"
4616
4616
  }, [
@@ -4738,7 +4738,7 @@ function e1(e, t, n, c, l, s) {
4738
4738
  return a(), I(S, null, {
4739
4739
  default: m(() => [
4740
4740
  o("div", Zh, [
4741
- (a(!0), d(oe, null, we(e.imgs, (b) => (a(), d(oe, null, [
4741
+ (a(!0), d(re, null, we(e.imgs, (b) => (a(), d(re, null, [
4742
4742
  e.isAssetTypeAnImage(b) ? (a(), I(C, {
4743
4743
  key: 0,
4744
4744
  width: "40",
@@ -4888,7 +4888,7 @@ const va = /* @__PURE__ */ w(Yh, [["render", e1]]), t1 = se({
4888
4888
  };
4889
4889
  function s1(e, t, n, c, l, s) {
4890
4890
  const i = y("NButton"), p = y("NModal");
4891
- return a(), d(oe, null, [
4891
+ return a(), d(re, null, [
4892
4892
  e.mode === "button" ? (a(), I(i, {
4893
4893
  key: 0,
4894
4894
  type: "primary",
@@ -5149,7 +5149,7 @@ function p1(e, t, n, c, l, s) {
5149
5149
  default: m(() => [
5150
5150
  _(p, null, {
5151
5151
  default: m(() => [
5152
- (a(!0), d(oe, null, we(e.tabList, (x) => (a(), I(i, {
5152
+ (a(!0), d(re, null, we(e.tabList, (x) => (a(), I(i, {
5153
5153
  key: x.value,
5154
5154
  type: e.tabButtonType(x),
5155
5155
  secondary: "",
@@ -5170,7 +5170,7 @@ function p1(e, t, n, c, l, s) {
5170
5170
  key: 1,
5171
5171
  offset: e.offset
5172
5172
  }, null, 8, ["offset"])) : q("", !0),
5173
- (a(!0), d(oe, null, we(e.itemData, (x, D) => (a(), I(C, {
5173
+ (a(!0), d(re, null, we(e.itemData, (x, D) => (a(), I(C, {
5174
5174
  key: `${D}_${Date.now()}`,
5175
5175
  span: x.search.show ? e.gridSpan : 0
5176
5176
  }, {
@@ -5368,7 +5368,7 @@ const f1 = /* @__PURE__ */ w(i1, [["render", p1]]), h1 = se({
5368
5368
  }), m1 = { class: "flex items-start justify-between gap-8 pb-2" }, w1 = { class: "flex gap-2" }, g1 = { class: "flex items-center gap-2 w-full" };
5369
5369
  function v1(e, t, n, c, l, s) {
5370
5370
  const i = y("Search"), p = y("NIcon"), C = y("NButton"), N = y("NInputGroupLabel"), T = y("UzFormItem"), S = y("NInputGroup"), b = y("NGridItem"), u = y("NGrid"), r = y("Refresh"), v = y("NDrawerContent"), g = y("NDrawer");
5371
- return a(), d(oe, null, [
5371
+ return a(), d(re, null, [
5372
5372
  o("div", m1, [
5373
5373
  be(e.$slots, "header"),
5374
5374
  o("div", w1, [
@@ -5457,7 +5457,7 @@ function v1(e, t, n, c, l, s) {
5457
5457
  cols: "1"
5458
5458
  }, {
5459
5459
  default: m(() => [
5460
- (a(!0), d(oe, null, we(e.itemData, (h, f) => (a(), I(b, {
5460
+ (a(!0), d(re, null, we(e.itemData, (h, f) => (a(), I(b, {
5461
5461
  key: `${f}_${Date.now()}`,
5462
5462
  span: h.search.show ? 1 : 0
5463
5463
  }, {
@@ -6272,7 +6272,7 @@ function F1(e, t, n, c, l, s) {
6272
6272
  }, 8, ["on-before-upload"]),
6273
6273
  t[0] || (t[0] = o("div", { class: "uz-br" }, null, -1)),
6274
6274
  o("div", T1, [
6275
- (a(!0), d(oe, null, we(e.text, (T) => (a(), d("div", {
6275
+ (a(!0), d(re, null, we(e.text, (T) => (a(), d("div", {
6276
6276
  key: T,
6277
6277
  class: "uz-ocr-text flex items-center"
6278
6278
  }, [
@@ -6453,7 +6453,7 @@ const ba = /* @__PURE__ */ w(z1, [["render", F1], ["__scopeId", "data-v-ec746f00
6453
6453
  fetch: null,
6454
6454
  when_drawer_open: "",
6455
6455
  when_before_save: ""
6456
- }), K = $(qe()), re = $(!1), ke = $(0), _e = $(""), Pe = $(!1), Ce = $([]), fe = $([]), nt = $(!1), wn = $(""), gn = $({}), Fa = Ve("modules"), Ba = (k) => k.id, Va = (k, O) => {
6456
+ }), K = $(qe()), oe = $(!1), ke = $(0), _e = $(""), Pe = $(!1), Ce = $([]), fe = $([]), nt = $(!1), wn = $(""), gn = $({}), Fa = Ve("modules"), Ba = (k) => k.id, Va = (k, O) => {
6457
6457
  t("update:rowKeys", {
6458
6458
  keys: k,
6459
6459
  rows: J(O)
@@ -6855,7 +6855,7 @@ const ba = /* @__PURE__ */ w(z1, [["render", F1], ["__scopeId", "data-v-ec746f00
6855
6855
  });
6856
6856
  }), t("on-update:columns", k);
6857
6857
  }, Ge = () => {
6858
- T.value?.restoreValidation(), M.value = {}, u.value = !1, B.value = !1;
6858
+ T.value?.restoreValidation(), M.value = {}, u.value = !1, oe.value = !1, B.value = !1;
6859
6859
  }, Wa = () => {
6860
6860
  sa.info({
6861
6861
  title: "提示",
@@ -6868,7 +6868,7 @@ const ba = /* @__PURE__ */ w(z1, [["render", F1], ["__scopeId", "data-v-ec746f00
6868
6868
  }
6869
6869
  });
6870
6870
  }, Ga = () => {
6871
- ke.value = 0, re.value = !0, T.value?.validate().then(async (k) => {
6871
+ ke.value = 0, oe.value = !0, T.value?.validate().then(async (k) => {
6872
6872
  if (Q.value.when_before_save) {
6873
6873
  const Y = Q.value.when_before_save, A = new Function("data", "POST", Y);
6874
6874
  try {
@@ -6889,12 +6889,12 @@ const ba = /* @__PURE__ */ w(z1, [["render", F1], ["__scopeId", "data-v-ec746f00
6889
6889
  tableId: W,
6890
6890
  ...k
6891
6891
  }), O.then(() => {
6892
- At(), re.value = !1, he(), Ge();
6892
+ At(), oe.value = !1, he(), Ge();
6893
6893
  }).catch((Y) => {
6894
6894
  ke.value = 1, _e.value = Y;
6895
6895
  });
6896
6896
  }).catch(() => {
6897
- re.value = !1;
6897
+ oe.value = !1;
6898
6898
  });
6899
6899
  }, Qa = () => {
6900
6900
  r.value = "", P.value = [], V.value = [], E.value = [], Q.value = {
@@ -7003,7 +7003,7 @@ const ba = /* @__PURE__ */ w(z1, [["render", F1], ["__scopeId", "data-v-ec746f00
7003
7003
  formData: v,
7004
7004
  title: r,
7005
7005
  dynamicLoading: b,
7006
- spinShow: re,
7006
+ spinShow: oe,
7007
7007
  spinMsg: _e,
7008
7008
  spinStatus: ke,
7009
7009
  tableScrollX: x,
@@ -7542,7 +7542,7 @@ const E1 = /* @__PURE__ */ w(B1, [["render", L1]]), K1 = se({
7542
7542
  show: !0,
7543
7543
  hide: !0,
7544
7544
  width: 60,
7545
- render(re, ke) {
7545
+ render(oe, ke) {
7546
7546
  const _e = [], Pe = {
7547
7547
  type: "normal",
7548
7548
  color: "error",
@@ -7551,18 +7551,18 @@ const E1 = /* @__PURE__ */ w(B1, [["render", L1]]), K1 = se({
7551
7551
  confirmText: "确认删除?",
7552
7552
  onClick: () => {
7553
7553
  const Ce = e.item.params.deleteFn;
7554
- Ce && typeof Ce == "string" ? re = new Function("rowData", "mainFormValue", Ce)(re, s) : re.delete = !0;
7554
+ Ce && typeof Ce == "string" ? oe = new Function("rowData", "mainFormValue", Ce)(oe, s) : oe.delete = !0;
7555
7555
  }
7556
7556
  };
7557
7557
  return e.item.params.childActions && e.item.params.actions && ct(e.item.params.actions).forEach((fe) => {
7558
7558
  if (fe.disabled && typeof fe.disabled == "string") {
7559
7559
  const nt = new Function("rowData", "rowIndex", fe.disabled);
7560
- fe.disabled = nt(re, ke);
7560
+ fe.disabled = nt(oe, ke);
7561
7561
  }
7562
7562
  _e.push(fe);
7563
7563
  }), e.item.params.showDelete && (e.status !== 2 && (u.value.child.length > 1 && e.item.form.edit ? !e.item.form.edit.readonly : !e.item.form.readonly)) && _e.push(Pe), tt({
7564
7564
  buttons: _e,
7565
- rowData: re
7565
+ rowData: oe
7566
7566
  });
7567
7567
  }
7568
7568
  };
@@ -7644,9 +7644,9 @@ const E1 = /* @__PURE__ */ w(B1, [["render", L1]]), K1 = se({
7644
7644
  C.value?.destroy(), C.value = null, S.value = !1;
7645
7645
  let E = J(u.value.child);
7646
7646
  const Q = E.splice(P, 1)[0];
7647
- E.splice(V, 0, Q), E = E.map((K, re) => ({
7647
+ E.splice(V, 0, Q), E = E.map((K, oe) => ({
7648
7648
  ...K,
7649
- sort_index: re
7649
+ sort_index: oe
7650
7650
  })), u.value.child = E, Ne(() => {
7651
7651
  S.value = !0, setTimeout(() => {
7652
7652
  M();
@@ -8022,7 +8022,7 @@ const s0 = /* @__PURE__ */ w(t0, [["render", a0]]), l0 = se({
8022
8022
  when_drawer_open: "",
8023
8023
  when_before_save: ""
8024
8024
  }), r = $(!1), v = () => {
8025
- c.value?.restoreValidation(), l.value = {}, p.value = !1, s.value = !1, t("update:show", !1);
8025
+ c.value?.restoreValidation(), l.value = {}, C.value = !1, p.value = !1, s.value = !1, t("update:show", !1);
8026
8026
  }, g = () => {
8027
8027
  e.status !== 2 ? sa.info({
8028
8028
  title: "提示",
@@ -8177,7 +8177,7 @@ function p0(e, t, n, c, l, s) {
8177
8177
  }, {
8178
8178
  default: m(() => [
8179
8179
  e.skeletonShow ? (a(), d("div", c0, [
8180
- (a(), d(oe, null, we(10, (r) => _(p, {
8180
+ (a(), d(re, null, we(10, (r) => _(p, {
8181
8181
  size: "large",
8182
8182
  style: { height: "156px" }
8183
8183
  })), 64))
@@ -8263,12 +8263,12 @@ const f0 = /* @__PURE__ */ w(l0, [["render", p0]]), h0 = se({
8263
8263
  };
8264
8264
  function g0(e, t, n, c, l, s) {
8265
8265
  return a(), d("div", m0, [
8266
- (a(!0), d(oe, null, we(e.tableColumns, (i) => (a(), d("div", {
8266
+ (a(!0), d(re, null, we(e.tableColumns, (i) => (a(), d("div", {
8267
8267
  key: i.key,
8268
8268
  class: ce(["flex overflow-hidden", i.lineBreak ? "flex-col" : ""]),
8269
8269
  style: $e(`grid-column: span ${i.lineCol || 2} / span ${i.lineCol || 2}`)
8270
8270
  }, [
8271
- i.key === "action" ? (a(), d(oe, { key: 0 }, [
8271
+ i.key === "action" ? (a(), d(re, { key: 0 }, [
8272
8272
  i.render ? (a(), I(xn(
8273
8273
  () => {
8274
8274
  if (e.tableData)
@@ -8278,7 +8278,7 @@ function g0(e, t, n, c, l, s) {
8278
8278
  key: 0,
8279
8279
  class: "mobile"
8280
8280
  })) : q("", !0)
8281
- ], 64)) : (a(), d(oe, { key: 1 }, [
8281
+ ], 64)) : (a(), d(re, { key: 1 }, [
8282
8282
  o("div", {
8283
8283
  class: ce(["uz-table-mobile-group-title", i.lineBreak ? "line-break" : ""])
8284
8284
  }, [
@@ -8360,7 +8360,7 @@ function x0(e, t, n, c, l, s) {
8360
8360
  })
8361
8361
  }, {
8362
8362
  default: m(() => [
8363
- (a(!0), d(oe, null, we(e.tableData, (b, u) => (a(), I(p, {
8363
+ (a(!0), d(re, null, we(e.tableData, (b, u) => (a(), I(p, {
8364
8364
  key: b.id,
8365
8365
  class: "uz-com-card flex gap-2",
8366
8366
  value: b.id
@@ -8402,7 +8402,7 @@ function x0(e, t, n, c, l, s) {
8402
8402
  })
8403
8403
  }, {
8404
8404
  default: m(() => [
8405
- (a(!0), d(oe, null, we(e.tableData, (b, u) => (a(), I(T, {
8405
+ (a(!0), d(re, null, we(e.tableData, (b, u) => (a(), I(T, {
8406
8406
  key: b.id,
8407
8407
  class: "uz-com-card flex gap-2",
8408
8408
  value: b.id
@@ -8438,7 +8438,7 @@ function x0(e, t, n, c, l, s) {
8438
8438
  maxHeight: e.maxH
8439
8439
  })
8440
8440
  }, [
8441
- (a(!0), d(oe, null, we(e.tableData, (b, u) => (a(), d("div", {
8441
+ (a(!0), d(re, null, we(e.tableData, (b, u) => (a(), d("div", {
8442
8442
  key: b.id,
8443
8443
  class: "uz-com-card flex flex-col gap-2"
8444
8444
  }, [
@@ -8607,7 +8607,7 @@ function N0(e, t, n, c, l, s) {
8607
8607
  })
8608
8608
  ]),
8609
8609
  default: m(() => [
8610
- (a(!0), d(oe, null, we(e.thumbnailStore.thumbnail, (u) => (a(), I(i, {
8610
+ (a(!0), d(re, null, we(e.thumbnailStore.thumbnail, (u) => (a(), I(i, {
8611
8611
  key: u.key,
8612
8612
  name: u.key,
8613
8613
  tab: u.label,
@@ -9020,7 +9020,7 @@ function gm(e, t, n) {
9020
9020
  refetch: f
9021
9021
  };
9022
9022
  }
9023
- const U0 = "0.0.61";
9023
+ const U0 = "0.0.62";
9024
9024
  let Da;
9025
9025
  async function Ta() {
9026
9026
  const e = await fetch(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unizhen/ui",
3
- "version": "0.0.61",
3
+ "version": "0.0.62",
4
4
  "author": {
5
5
  "name": "Donovan"
6
6
  },