yc-vep-ui 0.3.8 → 0.3.10

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.
@@ -1,4 +1,4 @@
1
- import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createPropsRestProxy as o, createSlots as s, createTextVNode as c, createVNode as l, defineComponent as u, getCurrentInstance as d, h as f, isRef as p, isVNode as m, mergeModels as h, mergeProps as g, nextTick as _, normalizeClass as v, normalizeStyle as y, onMounted as b, onUnmounted as x, openBlock as S, reactive as C, readonly as w, ref as T, renderList as E, renderSlot as D, resolveComponent as O, resolveDirective as ee, resolveDynamicComponent as k, setBlockTracking as A, shallowRef as j, toDisplayString as M, toRaw as te, toValue as N, unref as P, useAttrs as ne, useCssVars as re, useModel as ie, watch as F, watchEffect as ae, withCtx as I, withDirectives as oe, withKeys as se, withModifiers as ce } from "vue";
1
+ import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createPropsRestProxy as o, createSlots as s, createTextVNode as c, createVNode as l, defineComponent as u, getCurrentInstance as d, h as f, isRef as p, isVNode as m, mergeModels as h, mergeProps as g, nextTick as _, normalizeClass as v, normalizeStyle as y, onMounted as b, onUnmounted as x, openBlock as S, reactive as C, readonly as w, ref as T, renderList as E, renderSlot as D, resolveComponent as O, resolveDirective as ee, resolveDynamicComponent as k, setBlockTracking as A, shallowRef as te, toDisplayString as j, toRaw as M, toValue as N, unref as P, useAttrs as ne, useCssVars as re, useModel as ie, watch as F, watchEffect as ae, withCtx as I, withDirectives as oe, withKeys as se, withModifiers as ce } from "vue";
2
2
  import { AiEditor as le } from "aieditor";
3
3
  //#region \0rolldown/runtime.js
4
4
  var ue = Object.defineProperty, L = (e, t) => {
@@ -36,7 +36,7 @@ var ue = Object.defineProperty, L = (e, t) => {
36
36
  fn: I(() => [a("div", { style: y(i.value) }, [e.icon ? (S(), n(l, { key: 0 }, {
37
37
  default: I(() => [(S(), n(k(e.icon), { color: "#2563eb" }))]),
38
38
  _: 1
39
- })) : r("", !0), o[0] || (A(-1, !0), (o[0] = a("h4", null, [c(M(e.title), 1)])).cacheIndex = 0, A(1), o[0])], 4)]),
39
+ })) : r("", !0), o[0] || (A(-1, !0), (o[0] = a("h4", null, [c(j(e.title), 1)])).cacheIndex = 0, A(1), o[0])], 4)]),
40
40
  key: "0"
41
41
  } : void 0]), 1040, ["class"]);
42
42
  };
@@ -385,7 +385,7 @@ var je = {
385
385
  key: 1,
386
386
  "line-clamp": t.column?.lineClamp || 2
387
387
  }, {
388
- default: I(() => [c(M(e[t.column.prop]), 1)]),
388
+ default: I(() => [c(j(e[t.column.prop]), 1)]),
389
389
  _: 2
390
390
  }, 1032, ["line-clamp"]))]),
391
391
  _: 1
@@ -957,7 +957,7 @@ var Ot = { style: {
957
957
  icon: p.expand ? P($e) : P(Ye),
958
958
  onClick: o[0] ||= (e) => p.expand = !p.expand
959
959
  }, {
960
- default: I(() => [c(M(p.expand ? "收起" : "展开"), 1)]),
960
+ default: I(() => [c(j(p.expand ? "收起" : "展开"), 1)]),
961
961
  _: 1
962
962
  }, 8, ["icon"])) : r("", !0),
963
963
  l(b, {
@@ -1023,7 +1023,7 @@ var Ot = { style: {
1023
1023
  ],
1024
1024
  setup(a, { expose: o, emit: s }) {
1025
1025
  re((e) => ({ v57cec5bb: P(ee) / 2 }));
1026
- let u = s, d = a, { fields: f, labelWidth: p = "100px", valueWidth: h = "auto", omitFields: _ = [], rules: b = C({}), labelPosition: x = "top", valueModel: w = "default", column: ee = 24 } = d, A = T(0), j = T(), N = t(() => d.modelValue !== void 0), ne = C({}), ie = t(() => N.value ? d.modelValue : d.model || ne), F = t({
1026
+ let u = s, d = a, { fields: f, labelWidth: p = "100px", valueWidth: h = "auto", omitFields: _ = [], rules: b = C({}), labelPosition: x = "top", valueModel: w = "default", column: ee = 24 } = d, A = T(0), te = T(), N = t(() => d.modelValue !== void 0), ne = C({}), ie = t(() => N.value ? d.modelValue : d.model || ne), F = t({
1027
1027
  get: () => ie.value,
1028
1028
  set: (e) => {
1029
1029
  N.value && u("update:modelValue", e);
@@ -1040,26 +1040,26 @@ var Ot = { style: {
1040
1040
  }), e;
1041
1041
  });
1042
1042
  async function se() {
1043
- await j.value?.validate().catch(() => !1) && u("submit", te(ie.value));
1043
+ await te.value?.validate().catch(() => !1) && u("submit", M(ie.value));
1044
1044
  }
1045
1045
  function ce() {
1046
1046
  let e = {};
1047
1047
  Object.keys(ie.value).forEach((t) => {
1048
1048
  _.includes(t) || (e[t] = void 0);
1049
- }), Object.assign(ie.value, e), A.value += 1, u("reset", te(ie.value));
1049
+ }), Object.assign(ie.value, e), A.value += 1, u("reset", M(ie.value));
1050
1050
  }
1051
1051
  function le() {
1052
- return te(ie.value);
1052
+ return M(ie.value);
1053
1053
  }
1054
1054
  function ue(e) {
1055
1055
  Object.assign(ie.value, e);
1056
1056
  }
1057
1057
  function L() {
1058
- j.value?.clearValidate();
1058
+ te.value?.clearValidate();
1059
1059
  }
1060
1060
  async function de() {
1061
1061
  return new Promise((e) => {
1062
- j.value?.validate((t, n) => e(n));
1062
+ te.value?.validate((t, n) => e(n));
1063
1063
  });
1064
1064
  }
1065
1065
  return o({
@@ -1072,7 +1072,7 @@ var Ot = { style: {
1072
1072
  let o = O("el-input"), s = O("el-form-item"), u = O("el-form"), d = O("el-button");
1073
1073
  return S(), i(e, null, [l(u, g({
1074
1074
  ref_key: "uiFormRef",
1075
- ref: j,
1075
+ ref: te,
1076
1076
  model: F.value
1077
1077
  }, t.$attrs, {
1078
1078
  rules: oe.value,
@@ -1111,7 +1111,7 @@ var Ot = { style: {
1111
1111
  "modelValue",
1112
1112
  "onUpdate:modelValue",
1113
1113
  "class"
1114
- ])) : (S(), i("span", Mt, M(P(V)(r, F.value) || "-"), 1)), (S(!0), i(e, null, E(r.slots, (e) => D(t.$slots, "default", { form: F.value }, () => [m(P(V)(e, F.value)) ? (S(), n(k(P(V)(e, F.value)), {
1114
+ ])) : (S(), i("span", Mt, j(P(V)(r, F.value) || "-"), 1)), (S(!0), i(e, null, E(r.slots, (e) => D(t.$slots, "default", { form: F.value }, () => [m(P(V)(e, F.value)) ? (S(), n(k(P(V)(e, F.value)), {
1115
1115
  key: 0,
1116
1116
  style: { display: "inline-block" }
1117
1117
  })) : P(V)(e, F.value).component ? (S(), n(k(P(V)(e, F.value).component), g({
@@ -1136,7 +1136,7 @@ var Ot = { style: {
1136
1136
  "placeholder",
1137
1137
  "style",
1138
1138
  "class"
1139
- ])) : (S(), i("span", Nt, M(P(V)(e, F.value) || "-"), 1))], !0)), 256))], 64)) : (S(), n(o, {
1139
+ ])) : (S(), i("span", Nt, j(P(V)(e, F.value) || "-"), 1))], !0)), 256))], 64)) : (S(), n(o, {
1140
1140
  key: 1,
1141
1141
  modelValue: F.value[r.prop],
1142
1142
  "onUpdate:modelValue": (e) => F.value[r.prop] = e,
@@ -1338,7 +1338,7 @@ var Ot = { style: {
1338
1338
  "highlight-current": !0,
1339
1339
  "filter-method": b
1340
1340
  }), {
1341
- default: I((s) => [s?.data ? (S(), i("div", Wt, [a("div", Gt, [s.data?.children?.length ? (S(), i("span", Kt, "📁")) : r("", !0), c(" " + M(s.data?.[e.props?.label || "label"]) + " " + M(y.value && s.data?.children?.length ? `(${s.data.children.length})` : ""), 1)]), p.hideNodeHandle ? r("", !0) : (S(), n(h, {
1341
+ default: I((s) => [s?.data ? (S(), i("div", Wt, [a("div", Gt, [s.data?.children?.length ? (S(), i("span", Kt, "📁")) : r("", !0), c(" " + j(s.data?.[e.props?.label || "label"]) + " " + j(y.value && s.data?.children?.length ? `(${s.data.children.length})` : ""), 1)]), p.hideNodeHandle ? r("", !0) : (S(), n(h, {
1342
1342
  key: 0,
1343
1343
  trigger: "click"
1344
1344
  }, {
@@ -1428,7 +1428,7 @@ var Ot = { style: {
1428
1428
  active: e === u.value
1429
1429
  }),
1430
1430
  onClick: (t) => f(e)
1431
- }, [a("span", null, M(e[o.props?.label || "label"]), 1), D(t.$slots, "itemHandle", { data: e }, void 0, !0)], 10, en))), 128))], 16)), [[P(o.vInfiniteScroll), o.vInfiniteScroll]]),
1431
+ }, [a("span", null, j(e[o.props?.label || "label"]), 1), D(t.$slots, "itemHandle", { data: e }, void 0, !0)], 10, en))), 128))], 16)), [[P(o.vInfiniteScroll), o.vInfiniteScroll]]),
1432
1432
  o.loading.value ? (S(), i("p", tn, "loading...")) : r("", !0)
1433
1433
  ]);
1434
1434
  };
@@ -1458,7 +1458,7 @@ var Ot = { style: {
1458
1458
  return (o, s) => {
1459
1459
  let c = O("el-descriptions-item"), u = O("el-descriptions");
1460
1460
  return S(), i(e, null, [
1461
- t.title ? (S(), i("h4", on, M(t.title), 1)) : r("", !0),
1461
+ t.title ? (S(), i("h4", on, j(t.title), 1)) : r("", !0),
1462
1462
  D(o.$slots, "title", {}, void 0, !0),
1463
1463
  l(u, g({ column: t.column }, a, { class: "ui-descriptions" }), {
1464
1464
  default: I(() => [(S(!0), i(e, null, E(t.fields, (e) => (S(), n(c, {
@@ -1474,7 +1474,7 @@ var Ot = { style: {
1474
1474
  clearable: !0,
1475
1475
  key: e.prop,
1476
1476
  style: { display: "inline-block" }
1477
- }), null, 16, ["modelValue", "onUpdate:modelValue"])) : (S(), i("span", sn, M(t.data[e.prop] || "-"), 1))]),
1477
+ }), null, 16, ["modelValue", "onUpdate:modelValue"])) : (S(), i("span", sn, j(t.data[e.prop] || "-"), 1))]),
1478
1478
  _: 2
1479
1479
  }, 1032, ["label", "span"]))), 128))]),
1480
1480
  _: 1
@@ -1705,14 +1705,14 @@ var vn = /* @__PURE__ */ u({
1705
1705
  n ? e.data.children = _n([...r, ...e.data.children || []], "code") : e.children = _n([...r, ...e.children || []], "code"), y.loading = !1;
1706
1706
  }), t?.(e?.children || []));
1707
1707
  }
1708
- function j(e, { data: t }) {
1708
+ function te(e, { data: t }) {
1709
1709
  let n = y.searchData?.length > 0;
1710
1710
  return t?.account ? e("div", { style: { display: "flex" } }, [e("el-icon", { style: {
1711
1711
  width: "14px",
1712
1712
  height: "14px"
1713
1713
  } }, e(Ue)), n ? t.fullName : t.name]) : n ? t.fullName : t.name;
1714
1714
  }
1715
- function te(e) {
1715
+ function M(e) {
1716
1716
  if (x.value = x.value.filter((t) => t !== e), m.value) {
1717
1717
  let t = e.match(/\((.*?)\)/)?.[1];
1718
1718
  _(() => {
@@ -1803,7 +1803,7 @@ var vn = /* @__PURE__ */ u({
1803
1803
  data: w.value,
1804
1804
  props: { label: "fullName" },
1805
1805
  "highlight-current": !0,
1806
- "render-content": j,
1806
+ "render-content": te,
1807
1807
  load: A,
1808
1808
  onCheck: re,
1809
1809
  "show-checkbox": "",
@@ -1813,12 +1813,12 @@ var vn = /* @__PURE__ */ u({
1813
1813
  ref_key: "staffDialogRef",
1814
1814
  ref: m,
1815
1815
  "node-key": "code"
1816
- }, null, 8, ["loading", "data"])]), a("div", xn, [a("div", Sn, [n[4] ||= a("h3", null, "已选择", -1), x.value.length ? (S(), i("span", Cn, "已选择" + M(x.value.length) + "个用户", 1)) : r("", !0)]), a("div", wn, [(S(!0), i(e, null, E(x.value, (e) => (S(), i("li", {
1816
+ }, null, 8, ["loading", "data"])]), a("div", xn, [a("div", Sn, [n[4] ||= a("h3", null, "已选择", -1), x.value.length ? (S(), i("span", Cn, "已选择" + j(x.value.length) + "个用户", 1)) : r("", !0)]), a("div", wn, [(S(!0), i(e, null, E(x.value, (e) => (S(), i("li", {
1817
1817
  key: e,
1818
1818
  class: "staff-item"
1819
- }, [a("span", null, M(e), 1), l(d, {
1819
+ }, [a("span", null, j(e), 1), l(d, {
1820
1820
  color: "red",
1821
- onClick: ce((t) => te(e), ["stop"])
1821
+ onClick: ce((t) => M(e), ["stop"])
1822
1822
  }, {
1823
1823
  default: I(() => [l(P(Ve))]),
1824
1824
  _: 1
@@ -1902,7 +1902,7 @@ var vn = /* @__PURE__ */ u({
1902
1902
  size: P(o),
1903
1903
  disabled: P(d)
1904
1904
  }, {
1905
- default: I(() => [c(M(P(i)), 1)]),
1905
+ default: I(() => [c(j(P(i)), 1)]),
1906
1906
  _: 1
1907
1907
  }, 8, [
1908
1908
  "icon",
@@ -2096,14 +2096,15 @@ function Vn(e, t = {}) {
2096
2096
  if (g) return Promise.reject(/* @__PURE__ */ Error("请求正在进行中,请勿重复触发"));
2097
2097
  g = !0, d.value = !0, m.value = null;
2098
2098
  try {
2099
- let t = hn + e;
2099
+ b = JSON.stringify(M(h)), x = p(t.ready) ? t.ready.value : t.ready ?? !0;
2100
+ let n = hn + e;
2100
2101
  if (i?.(u) === !1) return Promise.reject(/* @__PURE__ */ Error("请求被 onBefore 钩子取消"));
2101
2102
  if (r === "GET") {
2102
- let e = new URLSearchParams(te(h)).toString();
2103
- e && (t = `${t}?${e}`);
2104
- } else u.body = JSON.stringify(te(h));
2105
- let n = await (await fetch(t, u)).json();
2106
- return n.code ? ["return.optSuccess", "ok"].includes(n.code) || z.Message.error(n.message || "未知错误!") : n.data?.success || z.Message.error(n.message || "未知错误!"), f.value = n, a?.(n), n;
2103
+ let e = new URLSearchParams(M(h)).toString();
2104
+ e && (n = `${n}?${e}`);
2105
+ } else u.body = JSON.stringify(M(h));
2106
+ let o = await (await fetch(n, u)).json();
2107
+ return o.code ? ["return.optSuccess", "ok"].includes(o.code) || z.Message.error(o.message || "未知错误!") : o.data?.success || z.Message.error(o.message || "未知错误!"), f.value = o, a?.(o), o;
2107
2108
  } catch (e) {
2108
2109
  let t = e instanceof Error ? e : Error(String(e));
2109
2110
  throw m.value = t, console.error("请求发生错误:", t), o?.(t), t;
@@ -2115,7 +2116,7 @@ function Vn(e, t = {}) {
2115
2116
  ae(() => {
2116
2117
  let e = N(c.defaultParams);
2117
2118
  Object.keys(h).forEach((e) => delete h[e]), Object.assign(h, e || {}), y && clearTimeout(y), y = setTimeout(() => {
2118
- let e = p(t.ready) ? t.ready.value : t.ready ?? !0, r = JSON.stringify(te(h));
2119
+ let e = p(t.ready) ? t.ready.value : t.ready ?? !0, r = JSON.stringify(M(h));
2119
2120
  n && e && !g && (r !== b || e !== x) && (b = r, x = e, _(() => v()));
2120
2121
  }, 10);
2121
2122
  });
@@ -2145,7 +2146,7 @@ function Hn(e, t) {
2145
2146
  table: "table",
2146
2147
  total: "total"
2147
2148
  }
2148
- }), r = j([]), i = C({
2149
+ }), r = te([]), i = C({
2149
2150
  total: 0,
2150
2151
  page: 1,
2151
2152
  pageSize: 10
@@ -2318,7 +2319,7 @@ function Zn(e) {
2318
2319
  return Bn.post("/dictionary/mergeDictionaryValue", e);
2319
2320
  }
2320
2321
  function Qn(e) {
2321
- let { page: t = 1, pageSize: n = 10 } = e || {}, r = j([]), i = j([]), { loading: a, execute: o } = Vn("/dictionary/pageQueryDictionaryValue", {
2322
+ let { page: t = 1, pageSize: n = 10 } = e || {}, r = te([]), i = te([]), { loading: a, execute: o } = Vn("/dictionary/pageQueryDictionaryValue", {
2322
2323
  method: "POST",
2323
2324
  defaultParams: {
2324
2325
  dictionaryCode: e.code,
@@ -4265,7 +4266,7 @@ function Ti(e) {
4265
4266
  nextActivityVisible: !1,
4266
4267
  buttonList: [],
4267
4268
  currentHandlers: "",
4268
- current: r.account,
4269
+ current: r?.account || "",
4269
4270
  activityName: ""
4270
4271
  }), l = C({
4271
4272
  processInfo: {
@@ -4532,7 +4533,7 @@ var Di = { key: 0 }, Oi = /* @__PURE__ */ u({
4532
4533
  }),
4533
4534
  l(r, { prop: "assigneeName" }, {
4534
4535
  header: I(() => [...t[0] ||= [c("处理人 ", -1), a("span", { style: { color: "red" } }, "*", -1)]]),
4535
- default: I(({ row: e, $index: t }) => [t === 0 ? (S(), i("span", Di, M(e.assigneeName), 1)) : (S(), n(o, {
4536
+ default: I(({ row: e, $index: t }) => [t === 0 ? (S(), i("span", Di, j(e.assigneeName), 1)) : (S(), n(o, {
4536
4537
  key: 1,
4537
4538
  ref: (e) => f.value[t] = e,
4538
4539
  modelValue: e.assigneeName,
@@ -4654,7 +4655,7 @@ var Di = { key: 0 }, Oi = /* @__PURE__ */ u({
4654
4655
  SoftwareReleaseProcess: "软件释放流程"
4655
4656
  }, { btnActiveMaps: d, toFlowchart: f } = Ei({ processCode: s }), { processInfoRef: p, readScopeRef: m, remindRef: h, disabled: g, formData: _, states: v, confirmFields: y, baseFields: b, buttonClick: x, onConfirmSubmit: C } = Ti(o);
4656
4657
  return (t, o) => {
4657
- let w = O("el-button"), T = O("yc-form"), k = O("yc-card"), A = O("el-card"), j = O("el-dialog"), te = ee("sticky");
4658
+ let w = O("el-button"), T = O("yc-form"), k = O("yc-card"), A = O("el-card"), te = O("el-dialog"), M = ee("sticky");
4658
4659
  return S(), i(e, null, [l(A, { class: "ml-30 mr-30" }, {
4659
4660
  default: I(() => [
4660
4661
  oe((S(), i("div", ji, [P(v).buttonList.length ? (S(), i("div", Mi, [(S(!0), i(e, null, E(P(v).buttonList, (e) => (S(), n(w, {
@@ -4662,7 +4663,7 @@ var Di = { key: 0 }, Oi = /* @__PURE__ */ u({
4662
4663
  type: P(d)?.get(e.code)?.[1] || "default",
4663
4664
  onClick: (t) => P(x)(e.code)
4664
4665
  }, {
4665
- default: I(() => [c(M(e.name), 1)]),
4666
+ default: I(() => [c(j(e.name), 1)]),
4666
4667
  _: 2
4667
4668
  }, 1032, ["type", "onClick"]))), 128)), l(w, {
4668
4669
  icon: P(ht),
@@ -4670,7 +4671,7 @@ var Di = { key: 0 }, Oi = /* @__PURE__ */ u({
4670
4671
  }, {
4671
4672
  default: I(() => [...o[1] ||= [c("流程图", -1)]]),
4672
4673
  _: 1
4673
- }, 8, ["icon", "onClick"])])) : r("", !0), a("h3", null, M(u[P(s)]), 1)])), [[te]]),
4674
+ }, 8, ["icon", "onClick"])])) : r("", !0), a("h3", null, j(u[P(s)]), 1)])), [[M]]),
4674
4675
  l(k, {
4675
4676
  icon: P(dt),
4676
4677
  title: "基本信息",
@@ -4707,7 +4708,7 @@ var Di = { key: 0 }, Oi = /* @__PURE__ */ u({
4707
4708
  }, null, 8, ["form-data", "disabled"])
4708
4709
  ]),
4709
4710
  _: 3
4710
- }), l(j, {
4711
+ }), l(te, {
4711
4712
  modelValue: P(v).confirmVisible,
4712
4713
  "onUpdate:modelValue": o[0] ||= (e) => P(v).confirmVisible = e,
4713
4714
  "destroy-on-close": "",
@@ -1,2 +1,2 @@
1
- import { c as e, d as t, l as n, o as r, s as i, u as a } from "../entry-D3QkTN2N.js";
1
+ import { c as e, d as t, l as n, o as r, s as i, u as a } from "../entry-D4Whf0ic.js";
2
2
  export { i as useDictionary, t as useFetch, e as useRoute, n as useRouter, a as useTable, r as useUser };
package/dist/vep-ui.js CHANGED
@@ -1,2 +1,2 @@
1
- import { S as e, _ as t, a as n, b as r, f as i, g as a, h as o, i as s, m as c, n as l, p as u, r as d, t as f, v as p, x as m, y as h } from "./entry-D3QkTN2N.js";
1
+ import { S as e, _ as t, a as n, b as r, f as i, g as a, h as o, i as s, m as c, n as l, p as u, r as d, t as f, v as p, x as m, y as h } from "./entry-D4Whf0ic.js";
2
2
  export { e as UiCard, o as UiDescriptions, c as UiDialog, p as UiEditor, r as UiFilter, h as UiForm, a as UiInfiniteScroll, u as UiStaffSelect, m as UiTable, t as UiTree, i as UiUpload, s as YcApproval, d as default, d as ycPlugin, f as getHostVue, n as hooks, l as setHostVue };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yc-vep-ui",
3
- "version": "0.3.8",
3
+ "version": "0.3.10",
4
4
  "type": "module",
5
5
  "description": "基于 Vue 3 + Element Plus 的企业级 UI 组件库",
6
6
  "keywords": [