asiaint-lowcode 3.1.135 → 3.1.138

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 (43) hide show
  1. package/README.md +31 -31
  2. package/dist/asiaint-lowcode.d.ts +26 -13
  3. package/dist/asiaint-lowcode.js +1 -1
  4. package/dist/asiaint-lowcode.umd.cjs +158 -157
  5. package/dist/lazy/{Card-DmKgpNex.js → Card-CWosU-Z3.js} +8 -8
  6. package/dist/lazy/{Cascader-Al6GEjA7.js → Cascader-3RiO1ZT8.js} +5 -4
  7. package/dist/lazy/{Checkbox-Bqg1dmRj.js → Checkbox-BOLDm0rt.js} +3 -2
  8. package/dist/lazy/{Collapse-kKlBdDd5.js → Collapse-DYAJYpI0.js} +1 -1
  9. package/dist/lazy/{Component-pX61QaNQ.js → Component-BFFdXsmS.js} +1 -1
  10. package/dist/lazy/{Component-Cj5oeerh.js → Component-DMLcCPNA.js} +1 -1
  11. package/dist/lazy/{Component-DdO5QLCn.js → Component-DPqFlzgV.js} +2 -2
  12. package/dist/lazy/{Component-CvMJNJkO.js → Component-DdxtZm90.js} +2 -2
  13. package/dist/lazy/{Component-B-_VNzhG.js → Component-Den9lHoB.js} +2 -2
  14. package/dist/lazy/{CurdCard-BxOBw_5N.js → CurdCard-S7-E8b8h.js} +2 -2
  15. package/dist/lazy/Custom-DsAzpCGF.js +26 -0
  16. package/dist/lazy/{DatePicker-Bbxi8xJo.js → DatePicker-eM_f4-Az.js} +1 -1
  17. package/dist/lazy/{DragList-D_4EWIob.js → DragList-CPRwmi2l.js} +13 -13
  18. package/dist/lazy/{FilterSearch-DkZ1y8w7.js → FilterSearch-D0HRJoPi.js} +2 -2
  19. package/dist/lazy/{FloatCurd-CEAz35PY.js → FloatCurd-Cv75dqpC.js} +2 -2
  20. package/dist/lazy/{FormList-Cg1sWJ5D.js → FormList-C4ro7qFu.js} +1 -1
  21. package/dist/lazy/{Grid-Dpl7hLeO.js → Grid-_drN9YjU.js} +1 -1
  22. package/dist/lazy/{InfiniteScroll-BW02Dit3.js → InfiniteScroll-DxbAPWf0.js} +4 -4
  23. package/dist/lazy/{Inline-BR7J-2OP.js → Inline-Djl7NxVR.js} +3 -3
  24. package/dist/lazy/{JsonEdit-DLefRyoB.js → JsonEdit-BOVzO61P.js} +3 -3
  25. package/dist/lazy/{LogList-Db3N-IxQ.js → LogList-CtfYZaek.js} +7 -7
  26. package/dist/lazy/{ObjGroup-DxGGDMia.js → ObjGroup-LPgvdJXq.js} +1 -1
  27. package/dist/lazy/{OfferDetails-B4Yft-7E.js → OfferDetails-DGClz_eT.js} +14 -13
  28. package/dist/lazy/{Pagination-B1H4a-9B.js → Pagination-G8Hf9rwP.js} +2 -2
  29. package/dist/lazy/{Progress-BpuFjEGz.js → Progress-B4HIprrl.js} +15 -15
  30. package/dist/lazy/{Radio-BcfiAy5A.js → Radio-hzjhNYJQ.js} +4 -3
  31. package/dist/lazy/{SearchSelect-D-9Mqfnw.js → SearchSelect-Co4-W0wr.js} +10 -9
  32. package/dist/lazy/{Select-Bq_7MUqp.js → Select-DmYRJX_P.js} +33 -23
  33. package/dist/lazy/{Table-CLikJxSG.js → Table-B1htBmIb.js} +4 -3
  34. package/dist/lazy/Tabs-B7gmaw5y.js +150 -0
  35. package/dist/lazy/{TextArea-DhP1AkkI.js → TextArea-_DQHgiiN.js} +3 -3
  36. package/dist/lazy/{Wrapper-Bzv3WF7N.js → Wrapper-gxFTNbyd.js} +4 -4
  37. package/dist/lazy/{index-BmDPMRiQ.js → index-DWGVoK0b.js} +1176 -1167
  38. package/dist/lazy/{useSelect-Ds4rYvFj.js → useSelect-C-QCeZTS.js} +1 -1
  39. package/dist/style.css +2 -2
  40. package/global.d.ts +10 -10
  41. package/package.json +1 -1
  42. package/dist/lazy/Custom-0UZprobJ.js +0 -26
  43. package/dist/lazy/Tabs-DXGTwfaA.js +0 -144
@@ -1,9 +1,9 @@
1
- import { defineComponent as p, resolveComponent as m, openBlock as n, createElementBlock as s, createVNode as a, withCtx as l, Fragment as u, renderList as f, createBlock as g, createElementVNode as e, toDisplayString as r, createTextVNode as h, unref as k, createCommentVNode as N } from "vue";
2
- import { I as v, a as C, _ as V } from "./index-BmDPMRiQ.js";
3
- const y = { class: "progress" }, B = { class: "timeline-content" }, E = { class: "timeline-content__title" }, I = {
1
+ import { defineComponent as p, resolveComponent as m, openBlock as n, createElementBlock as s, createVNode as l, withCtx as a, Fragment as u, renderList as f, createBlock as g, createElementVNode as e, toDisplayString as r, createTextVNode as h, unref as k, createCommentVNode as N } from "vue";
2
+ import { I as v, a as C, _ as V } from "./index-DWGVoK0b.js";
3
+ const b = { class: "progress" }, y = { class: "timeline-content" }, B = { class: "timeline-content__title" }, E = {
4
4
  key: 0,
5
5
  class: "empty-content"
6
- }, b = /* @__PURE__ */ p({
6
+ }, I = /* @__PURE__ */ p({
7
7
  __name: "Progress",
8
8
  props: {
9
9
  data: {}
@@ -11,22 +11,22 @@ const y = { class: "progress" }, B = { class: "timeline-content" }, E = { class:
11
11
  setup(w) {
12
12
  return (o, i) => {
13
13
  const _ = m("el-timeline-item"), c = m("el-timeline");
14
- return n(), s("div", y, [
15
- a(c, null, {
16
- default: l(() => [
14
+ return n(), s("div", b, [
15
+ l(c, null, {
16
+ default: a(() => [
17
17
  (n(!0), s(u, null, f(o.data, (t, d) => (n(), g(_, {
18
18
  key: d,
19
19
  size: "large"
20
20
  }, {
21
- dot: l(() => [
22
- a(v, {
21
+ dot: a(() => [
22
+ l(v, {
23
23
  name: t.iconName,
24
24
  size: "large"
25
25
  }, null, 8, ["name"])
26
26
  ]),
27
- default: l(() => [
28
- e("div", B, [
29
- e("div", E, [
27
+ default: a(() => [
28
+ e("div", y, [
29
+ e("div", B, [
30
30
  e("span", null, r(t.title), 1),
31
31
  e("span", null, r(t.timestamp), 1)
32
32
  ]),
@@ -38,8 +38,8 @@ const y = { class: "progress" }, B = { class: "timeline-content" }, E = { class:
38
38
  ]),
39
39
  _: 1
40
40
  }),
41
- !o.data || o.data.length === 0 ? (n(), s("div", I, [
42
- a(k(C), {
41
+ !o.data || o.data.length === 0 ? (n(), s("div", E, [
42
+ l(k(C), {
43
43
  name: "tableEmpty",
44
44
  style: { width: 56, height: 56 }
45
45
  }),
@@ -48,7 +48,7 @@ const y = { class: "progress" }, B = { class: "timeline-content" }, E = { class:
48
48
  ]);
49
49
  };
50
50
  }
51
- }), F = /* @__PURE__ */ V(b, [["__scopeId", "data-v-088a0692"]]);
51
+ }), F = /* @__PURE__ */ V(I, [["__scopeId", "data-v-6b11ed96"]]);
52
52
  export {
53
53
  F as default
54
54
  };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as T, mergeModels as w, useModel as F, inject as g, resolveComponent as i, resolveDirective as S, openBlock as o, createElementBlock as c, toDisplayString as z, unref as u, withDirectives as I, createBlock as f, mergeProps as h, withCtx as K, createVNode as $, Fragment as C, renderList as k } from "vue";
2
- import { u as N, _ as O } from "./index-BmDPMRiQ.js";
3
- import { u as P } from "./useSelect-Ds4rYvFj.js";
2
+ import { u as N, _ as O } from "./index-DWGVoK0b.js";
3
+ import { u as P } from "./useSelect-C-QCeZTS.js";
4
4
  const R = { key: 0 }, j = /* @__PURE__ */ T({
5
5
  __name: "Radio",
6
6
  props: /* @__PURE__ */ w({
@@ -15,6 +15,7 @@ const R = { key: 0 }, j = /* @__PURE__ */ T({
15
15
  dependentFields: {},
16
16
  name: { default: "" },
17
17
  onChange: {},
18
+ onClear: {},
18
19
  read: { type: Boolean },
19
20
  readTextColor: {},
20
21
  filters: {},
@@ -82,7 +83,7 @@ onChange: ${l.onChange}`);
82
83
  ]);
83
84
  };
84
85
  }
85
- }), q = /* @__PURE__ */ O(j, [["__scopeId", "data-v-1e24870a"]]);
86
+ }), q = /* @__PURE__ */ O(j, [["__scopeId", "data-v-08ecef32"]]);
86
87
  export {
87
88
  q as default
88
89
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as w, mergeModels as F, useModel as $, inject as K, resolveComponent as f, resolveDirective as A, openBlock as t, createElementBlock as i, toDisplayString as h, unref as u, withDirectives as I, createBlock as C, mergeProps as N, withCtx as y, Fragment as j, renderList as O, createTextVNode as P, createVNode as k } from "vue";
2
- import { u as T, a as E, _ as L } from "./index-BmDPMRiQ.js";
3
- import { u as U } from "./useSelect-Ds4rYvFj.js";
1
+ import { defineComponent as w, mergeModels as F, useModel as $, inject as C, resolveComponent as f, resolveDirective as A, openBlock as t, createElementBlock as i, toDisplayString as h, unref as u, withDirectives as I, createBlock as K, mergeProps as N, withCtx as y, Fragment as j, renderList as O, createTextVNode as P, createVNode as k } from "vue";
2
+ import { u as T, a as E, _ as L } from "./index-DWGVoK0b.js";
3
+ import { u as U } from "./useSelect-C-QCeZTS.js";
4
4
  const q = { key: 0 }, z = { key: 0 }, G = { key: 1 }, H = {
5
5
  key: 1,
6
6
  class: "search-select-wrapper"
@@ -22,6 +22,7 @@ const q = { key: 0 }, z = { key: 0 }, G = { key: 1 }, H = {
22
22
  dependentFields: {},
23
23
  name: { default: "" },
24
24
  onChange: {},
25
+ onClear: {},
25
26
  readTextColor: {},
26
27
  filters: {},
27
28
  refreshFlag: { type: Boolean },
@@ -32,11 +33,11 @@ const q = { key: 0 }, z = { key: 0 }, G = { key: 1 }, H = {
32
33
  modelModifiers: {}
33
34
  }),
34
35
  emits: ["update:modelValue"],
35
- setup(b) {
36
- const l = b, r = $(b, "modelValue"), v = T(), c = K("ruleModule", void 0), g = K("pageMethodMap", {}), B = (e) => {
36
+ setup(v) {
37
+ const l = v, r = $(v, "modelValue"), b = T(), c = C("ruleModule", void 0), g = C("pageMethodMap", {}), B = (e) => {
37
38
  const { valueKey: s = "value", multiple: m, name: p } = l;
38
39
  let n = {};
39
- if (m && Array.isArray(e) ? n = d.value.filter((o) => e.includes(o[s])) : n = d.value.find((o) => o[s] === e) || {}, v.selectData && p && v.updateSelectData(p, n), l.onChange && c)
40
+ if (m && Array.isArray(e) ? n = d.value.filter((o) => e.includes(o[s])) : n = d.value.find((o) => o[s] === e) || {}, b.selectData && p && b.updateSelectData(p, n), l.onChange && c)
40
41
  try {
41
42
  c[l.onChange](g, e, n);
42
43
  } catch (o) {
@@ -61,7 +62,7 @@ onSearch: ${l.onSearch}`);
61
62
  return (S = u(d).find((D) => D[e.valueKey] === a)) == null ? void 0 : S[e.labelKey];
62
63
  }).join("、")), 1)) : (t(), i("div", G, h(((_ = u(d).find((a) => a[e.valueKey] === r.value)) == null ? void 0 : _[e.labelKey]) || "--"), 1))
63
64
  ])) : (t(), i("div", H, [
64
- I((t(), C(p, N({
65
+ I((t(), K(p, N({
65
66
  modelValue: r.value,
66
67
  "onUpdate:modelValue": s[0] || (s[0] = (a) => r.value = a)
67
68
  }, e.$attrs, {
@@ -72,7 +73,7 @@ onSearch: ${l.onSearch}`);
72
73
  disabled: e.disabled
73
74
  }), {
74
75
  default: y(() => [
75
- (t(!0), i(j, null, O(u(d), (a) => (t(), C(m, {
76
+ (t(!0), i(j, null, O(u(d), (a) => (t(), K(m, {
76
77
  key: a[e.valueKey],
77
78
  label: a[e.labelKey],
78
79
  value: a[e.valueKey],
@@ -101,7 +102,7 @@ onSearch: ${l.onSearch}`);
101
102
  ]));
102
103
  };
103
104
  }
104
- }), X = /* @__PURE__ */ L(J, [["__scopeId", "data-v-b14d9207"]]);
105
+ }), X = /* @__PURE__ */ L(J, [["__scopeId", "data-v-884281f5"]]);
105
106
  export {
106
107
  X as default
107
108
  };
@@ -1,9 +1,9 @@
1
- import { defineComponent as D, mergeModels as F, computed as f, useModel as J, inject as h, ref as x, watch as b, resolveComponent as V, openBlock as c, createElementBlock as C, normalizeStyle as A, toDisplayString as K, createBlock as M, mergeProps as E, unref as T, withCtx as m, createElementVNode as u, Fragment as $, renderList as j, createTextVNode as I } from "vue";
2
- import { u as P } from "./index-BmDPMRiQ.js";
3
- import { u as R } from "./useSelect-Ds4rYvFj.js";
4
- const z = { style: { "min-height": "32px" } }, q = /* @__PURE__ */ D({
1
+ import { defineComponent as F, mergeModels as J, computed as m, useModel as $, inject as b, ref as x, watch as C, resolveComponent as V, openBlock as p, createElementBlock as K, normalizeStyle as A, toDisplayString as M, createBlock as S, mergeProps as E, unref as T, withCtx as y, createElementVNode as u, Fragment as j, renderList as I, createTextVNode as P } from "vue";
2
+ import { u as R } from "./index-DWGVoK0b.js";
3
+ import { u as z } from "./useSelect-C-QCeZTS.js";
4
+ const L = { style: { "min-height": "32px" } }, G = /* @__PURE__ */ F({
5
5
  __name: "Select",
6
- props: /* @__PURE__ */ F({
6
+ props: /* @__PURE__ */ J({
7
7
  options: { default: () => [] },
8
8
  defaultOptions: {},
9
9
  multiple: { type: Boolean, default: !1 },
@@ -16,6 +16,7 @@ const z = { style: { "min-height": "32px" } }, q = /* @__PURE__ */ D({
16
16
  dependentFields: {},
17
17
  name: { default: "" },
18
18
  onChange: {},
19
+ onClear: {},
19
20
  read: { type: Boolean },
20
21
  readTextColor: {},
21
22
  filters: {},
@@ -27,18 +28,26 @@ const z = { style: { "min-height": "32px" } }, q = /* @__PURE__ */ D({
27
28
  modelModifiers: {}
28
29
  }),
29
30
  emits: ["update:modelValue"],
30
- setup(y) {
31
- const l = y, S = f(() => l.clearable === null || l.clearable === void 0 ? !0 : !!l.clearable), a = J(y, "modelValue"), p = P(), k = f(() => l.read || p.schema.read), v = h("ruleModule", void 0), w = h("pageMethodMap", {}), B = (e) => {
31
+ setup(v) {
32
+ const l = v, k = m(() => l.clearable === null || l.clearable === void 0 ? !0 : !!l.clearable), a = $(v, "modelValue"), f = R(), w = m(() => l.read || f.schema.read), c = b("ruleModule", void 0), h = b("pageMethodMap", {}), B = (e) => {
32
33
  const { valueKey: t = "value", multiple: r, name: n } = l;
33
34
  let o = {};
34
- if (r && Array.isArray(e) ? o = s.value.filter((i) => e.includes(i[t])) : o = s.value.find((i) => i[t] === e) || {}, p.selectData && n && p.updateSelectData(n, o), l.onChange && v)
35
+ if (r && Array.isArray(e) ? o = s.value.filter((i) => e.includes(i[t])) : o = s.value.find((i) => i[t] === e) || {}, f.selectData && n && f.updateSelectData(n, o), l.onChange && c)
35
36
  try {
36
- v[l.onChange](w, e, o);
37
+ c[l.onChange](h, e, o);
37
38
  } catch (i) {
38
39
  console.error(i + `
39
40
  onChange: ${l.onChange}`);
40
41
  }
41
- }, { currentOptions: d, loading: N } = R(l), s = x(JSON.parse(JSON.stringify(d.value))), O = f(() => {
42
+ }, N = () => {
43
+ if (l.onClear && c)
44
+ try {
45
+ c[l.onClear](h);
46
+ } catch (e) {
47
+ console.error(e + `
48
+ onClear: ${l.onClear}`);
49
+ }
50
+ }, { currentOptions: d, loading: O } = z(l), s = x(JSON.parse(JSON.stringify(d.value))), D = m(() => {
42
51
  var t;
43
52
  if (l.multiple)
44
53
  return s.value.filter(
@@ -47,12 +56,12 @@ onChange: ${l.onChange}`);
47
56
  const e = (t = s.value.find((r) => r[l.valueKey] === a.value)) == null ? void 0 : t[l.labelKey];
48
57
  return !e || `${e}`.trim().length === 0 ? "--" : e;
49
58
  });
50
- b(
59
+ C(
51
60
  () => a,
52
61
  (e) => {
53
62
  g();
54
63
  }
55
- ), b(
64
+ ), C(
56
65
  () => d.value,
57
66
  (e) => {
58
67
  g();
@@ -71,24 +80,25 @@ onChange: ${l.onChange}`);
71
80
  };
72
81
  return (e, t) => {
73
82
  const r = V("el-option"), n = V("el-select");
74
- return k.value ? (c(), C("span", {
83
+ return w.value ? (p(), K("span", {
75
84
  key: 0,
76
85
  style: A({ color: e.readTextColor })
77
- }, K(O.value), 5)) : (c(), M(n, E({
86
+ }, M(D.value), 5)) : (p(), S(n, E({
78
87
  key: 1,
79
88
  modelValue: a.value,
80
89
  "onUpdate:modelValue": t[0] || (t[0] = (o) => a.value = o)
81
90
  }, e.$attrs, {
82
91
  onChange: B,
92
+ onClear: N,
83
93
  multiple: e.multiple,
84
- clearable: S.value,
94
+ clearable: k.value,
85
95
  filterable: "",
86
96
  "fallback-placements": ["bottom"],
87
- loading: T(N),
97
+ loading: T(O),
88
98
  placeholder: "",
89
99
  style: { width: e.width }
90
100
  }), {
91
- loading: m(() => t[1] || (t[1] = [
101
+ loading: y(() => t[1] || (t[1] = [
92
102
  u("svg", {
93
103
  class: "circular",
94
104
  viewBox: "0 0 20 20"
@@ -125,16 +135,16 @@ onChange: ${l.onChange}`);
125
135
  ])
126
136
  ], -1)
127
137
  ])),
128
- default: m(() => [
129
- u("div", z, [
130
- (c(!0), C($, null, j(s.value, (o) => (c(), M(r, {
138
+ default: y(() => [
139
+ u("div", L, [
140
+ (p(!0), K(j, null, I(s.value, (o) => (p(), S(r, {
131
141
  key: o[e.valueKey],
132
142
  label: o[e.labelKey],
133
143
  value: o[e.valueKey],
134
144
  disabled: o[e.disabledKey]
135
145
  }, {
136
- default: m(() => [
137
- I(K(o[e.labelKey]), 1)
146
+ default: y(() => [
147
+ P(M(o[e.labelKey]), 1)
138
148
  ]),
139
149
  _: 2
140
150
  }, 1032, ["label", "value", "disabled"]))), 128))
@@ -146,5 +156,5 @@ onChange: ${l.onChange}`);
146
156
  }
147
157
  });
148
158
  export {
149
- q as default
159
+ G as default
150
160
  };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as it, computed as J, inject as U, ref as C, useTemplateRef as st, onMounted as ut, onActivated as ct, onBeforeUnmount as pt, readonly as gt, toRefs as dt, onUnmounted as ht, resolveComponent as T, resolveDirective as vt, openBlock as r, createElementBlock as g, normalizeClass as D, createVNode as y, withCtx as d, createElementVNode as k, toDisplayString as P, unref as h, createCommentVNode as m, createTextVNode as Q, withDirectives as X, createBlock as w, Fragment as _, renderList as we, normalizeStyle as Y, withModifiers as Se, vShow as Pe, mergeProps as mt, nextTick as yt } from "vue";
2
- import { $ as ft, h as F, j as Ct, i as kt, a as wt, I as M, b as W, C as St, _ as Pt } from "./index-BmDPMRiQ.js";
2
+ import { $ as ft, h as F, j as Ct, i as kt, a as wt, I as M, b as W, C as St, _ as Pt } from "./index-DWGVoK0b.js";
3
3
  import { ElTable as bt, ElLoading as be, ElMessage as zt } from "element-plus";
4
4
  const Bt = ["id"], Nt = { class: "custom-slot" }, Rt = {
5
5
  key: 0,
@@ -50,6 +50,7 @@ const Bt = ["id"], Nt = { class: "custom-slot" }, Rt = {
50
50
  onPollChange: {},
51
51
  showPollCheckbox: { type: Boolean },
52
52
  cardStyle: { type: [Boolean, null, String, Object, Array] },
53
+ smallPagination: { type: Boolean },
53
54
  name: {},
54
55
  gridColumns: {},
55
56
  heightDifference: {}
@@ -115,7 +116,7 @@ handleRowClick: ${o.rowClick}
115
116
  }, Ve = () => p.value, le = C(), re = (e) => {
116
117
  if (le.value = e, !!o.handleCurrentChange)
117
118
  try {
118
- c.value[o.handleCurrentChange](v, e);
119
+ c.value[o.handleCurrentChange](v, e || {});
119
120
  } catch (t) {
120
121
  console.error(t);
121
122
  }
@@ -656,7 +657,7 @@ handleRowClick: ${o.rowClick}
656
657
  ], 10, Bt));
657
658
  };
658
659
  }
659
- }), jt = /* @__PURE__ */ Pt(Ut, [["__scopeId", "data-v-48e4a393"]]);
660
+ }), jt = /* @__PURE__ */ Pt(Ut, [["__scopeId", "data-v-ba4549cd"]]);
660
661
  export {
661
662
  jt as default
662
663
  };
@@ -0,0 +1,150 @@
1
+ import { defineComponent as N, ref as z, computed as M, watch as _, onMounted as R, onUnmounted as W, resolveComponent as C, openBlock as o, createBlock as m, mergeProps as T, withCtx as d, createElementVNode as p, createElementBlock as u, createVNode as y, createCommentVNode as f, Fragment as A, renderList as S, toDisplayString as $, normalizeClass as D, unref as F } from "vue";
2
+ import { c as U, i as P, B as k, I as X, b as Y, _ as j } from "./index-DWGVoK0b.js";
3
+ import "element-plus";
4
+ const q = { class: "right-icon-wrapper" }, G = {
5
+ key: 0,
6
+ class: "dynamic-icon-wrapper"
7
+ }, H = {
8
+ key: 1,
9
+ class: "static-icon-wrapper"
10
+ }, J = { class: "tab-label-text" }, O = /* @__PURE__ */ N({
11
+ __name: "Tabs",
12
+ props: {
13
+ id: {},
14
+ children: {},
15
+ defaultKey: {},
16
+ tabChange: {},
17
+ onBeforeLeave: {},
18
+ styleType: { default: "normal" },
19
+ staticBtns: {},
20
+ dynamicBtns: {},
21
+ name: {}
22
+ },
23
+ setup(K, { expose: V }) {
24
+ const n = K, s = z(""), w = M(() => {
25
+ const e = n.children.findIndex((t) => t.name === s.value);
26
+ return e - 1 >= 0 ? e - 1 : null;
27
+ }), { ruleModule: h, pageMethodMap: b } = U();
28
+ function I(e) {
29
+ if (n.tabChange)
30
+ try {
31
+ h[n.tabChange](b, e);
32
+ } catch (t) {
33
+ console.error(t);
34
+ }
35
+ }
36
+ async function E(e, t) {
37
+ if (n.onBeforeLeave)
38
+ try {
39
+ return await h[n.onBeforeLeave](b, e, t);
40
+ } catch (r) {
41
+ console.error(r);
42
+ }
43
+ return !0;
44
+ }
45
+ const L = (e) => {
46
+ if (n.id) {
47
+ const t = document.getElementById(n.id);
48
+ if (t) {
49
+ const r = t.getElementsByClassName("el-tabs__nav-scroll")[0], i = t.getElementsByClassName("el-tabs__nav")[0], c = i.style.transform.split("(")[1].split(")")[0].split("px")[0], B = r.offsetWidth - i.offsetWidth, g = 0;
50
+ let l = parseInt(c);
51
+ l = l - e.deltaY, l < B && (l = B), l > g && (l = g), i.style.transform = `translateX(${l}px)`;
52
+ }
53
+ e.preventDefault();
54
+ }
55
+ };
56
+ _(
57
+ () => n.children,
58
+ () => {
59
+ n.children.forEach((e) => {
60
+ e.children || (e.children = []);
61
+ });
62
+ }
63
+ ), _(
64
+ () => n.defaultKey,
65
+ () => {
66
+ s.value = n.defaultKey;
67
+ }
68
+ ), R(() => {
69
+ n.defaultKey && (s.value = n.defaultKey);
70
+ });
71
+ const v = {
72
+ changeActiveKey: (e) => {
73
+ s.value = e;
74
+ },
75
+ type: "formTabs"
76
+ };
77
+ if (n.name) {
78
+ const e = P(n.name, v);
79
+ W(() => {
80
+ e();
81
+ });
82
+ }
83
+ return V(v), (e, t) => {
84
+ const r = C("el-tab-pane"), i = C("el-tabs");
85
+ return o(), m(i, T({
86
+ ref: "tabsRef",
87
+ id: e.id
88
+ }, e.$attrs, {
89
+ modelValue: s.value,
90
+ "onUpdate:modelValue": t[0] || (t[0] = (a) => s.value = a),
91
+ onTabChange: I,
92
+ "before-leave": E,
93
+ addable: e.styleType === "btn",
94
+ class: {
95
+ "modal-type": e.styleType === "modal",
96
+ "btn-type": e.styleType === "btn",
97
+ "form-item-tabs": e.styleType === "normal"
98
+ }
99
+ }), {
100
+ "add-icon": d(() => [
101
+ p("div", q, [
102
+ e.dynamicBtns && e.dynamicBtns.length > 0 ? (o(), u("div", G, [
103
+ y(k, { btns: e.dynamicBtns }, null, 8, ["btns"])
104
+ ])) : f("", !0),
105
+ e.staticBtns && e.staticBtns.length > 0 ? (o(), u("div", H, [
106
+ y(k, { btns: e.staticBtns }, null, 8, ["btns"])
107
+ ])) : f("", !0)
108
+ ])
109
+ ]),
110
+ default: d(() => [
111
+ (o(!0), u(A, null, S(e.children, (a, c) => (o(), m(r, T({
112
+ key: a.name,
113
+ ref_for: !0
114
+ }, a), {
115
+ label: d(() => [
116
+ p("div", {
117
+ class: "tab-label",
118
+ style: { height: "100%" },
119
+ onWheel: L
120
+ }, [
121
+ e.styleType === "btn" && a.icon ? (o(), m(X, {
122
+ key: 0,
123
+ name: a.icon,
124
+ size: a.iconSize || "x-small"
125
+ }, null, 8, ["name", "size"])) : f("", !0),
126
+ p("span", J, $(a.label), 1),
127
+ c !== e.children.length - 1 ? (o(), u("span", {
128
+ key: 1,
129
+ class: D(["divider", {
130
+ "divider-hidden": s.value === a.name || w.value === c
131
+ }])
132
+ }, null, 2)) : f("", !0)
133
+ ], 32)
134
+ ]),
135
+ default: d(() => [
136
+ y(F(Y), {
137
+ list: a.children
138
+ }, null, 8, ["list"])
139
+ ]),
140
+ _: 2
141
+ }, 1040))), 128))
142
+ ]),
143
+ _: 1
144
+ }, 16, ["id", "modelValue", "addable", "class"]);
145
+ };
146
+ }
147
+ }), ne = /* @__PURE__ */ j(O, [["__scopeId", "data-v-5347826b"]]);
148
+ export {
149
+ ne as default
150
+ };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as u, mergeModels as i, useModel as _, computed as v, resolveComponent as f, openBlock as a, createElementBlock as n, createElementVNode as y, toDisplayString as r, createBlock as V, mergeProps as k } from "vue";
2
- import { u as x, _ as B } from "./index-BmDPMRiQ.js";
2
+ import { u as x, _ as B } from "./index-DWGVoK0b.js";
3
3
  import "element-plus";
4
4
  const M = {
5
5
  key: 0,
@@ -31,7 +31,7 @@ const M = {
31
31
  }), null, 16, ["modelValue"]));
32
32
  };
33
33
  }
34
- }), E = /* @__PURE__ */ B(I, [["__scopeId", "data-v-5775c381"]]);
34
+ }), C = /* @__PURE__ */ B(I, [["__scopeId", "data-v-166c6bcb"]]);
35
35
  export {
36
- E as default
36
+ C as default
37
37
  };
@@ -1,5 +1,5 @@
1
- import { defineComponent as v, ref as C, onUnmounted as g, resolveComponent as x, openBlock as r, createElementBlock as t, normalizeStyle as i, createVNode as a, withCtx as S, withDirectives as b, createElementVNode as _, normalizeClass as c, unref as B, createCommentVNode as d, vShow as D } from "vue";
2
- import { c as k, i as E, b as I, I as u, _ as j } from "./index-BmDPMRiQ.js";
1
+ import { defineComponent as v, ref as C, onUnmounted as g, resolveComponent as x, openBlock as r, createElementBlock as t, normalizeStyle as i, createVNode as a, withCtx as S, withDirectives as _, createElementVNode as b, normalizeClass as c, unref as B, createCommentVNode as d, vShow as D } from "vue";
2
+ import { c as k, i as E, b as I, I as u, _ as j } from "./index-DWGVoK0b.js";
3
3
  import "element-plus";
4
4
  const M = {
5
5
  key: 0,
@@ -56,7 +56,7 @@ const M = {
56
56
  }, [
57
57
  a(f, null, {
58
58
  default: S(() => [
59
- b(_("div", {
59
+ _(b("div", {
60
60
  class: c({
61
61
  normal: e.type === "normal",
62
62
  onlytable: e.type === "onlytable",
@@ -94,7 +94,7 @@ const M = {
94
94
  ], 4);
95
95
  };
96
96
  }
97
- }), O = /* @__PURE__ */ j(N, [["__scopeId", "data-v-bd573b7f"]]);
97
+ }), O = /* @__PURE__ */ j(N, [["__scopeId", "data-v-0a0f510b"]]);
98
98
  export {
99
99
  O as default
100
100
  };