asiaint-lowcode 3.0.14 → 3.0.16

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 (44) hide show
  1. package/dist/asiaint-lowcode.js +1 -1
  2. package/dist/asiaint-lowcode.umd.cjs +144 -144
  3. package/dist/index.d.ts +14 -23
  4. package/dist/lazy/Card-DIBN4bRf.js +59 -0
  5. package/dist/lazy/CardList-DkwHDPNp.js +51 -0
  6. package/dist/lazy/CardListItem-DbXsd1_k.js +85 -0
  7. package/dist/lazy/{Cascader-CdcNT10v.js → Cascader-BZhmVWOO.js} +1 -1
  8. package/dist/lazy/{Checkbox-CJK0zpkP.js → Checkbox-B1TSYANT.js} +2 -2
  9. package/dist/lazy/{Collapse-R3V_-9Qy.js → Collapse-C8VWxgHp.js} +1 -1
  10. package/dist/lazy/{Component-BUukjBGQ.js → Component-CUa78qLF.js} +1 -1
  11. package/dist/lazy/{Component-CnZjiCoz.js → Component-Cmw2Jlj3.js} +1 -1
  12. package/dist/lazy/{Component-BZ3Z_bac.js → Component-CqAhbbGQ.js} +1 -1
  13. package/dist/lazy/Component-D-Eh8B-j.js +89 -0
  14. package/dist/lazy/{Component-DbJnyH6w.js → Component-DUuuNUxC.js} +1 -1
  15. package/dist/lazy/Component-HCqPaHwQ.js +68 -0
  16. package/dist/lazy/Component-NvoLQyab.js +34 -0
  17. package/dist/lazy/CurdCard-BSgF68nl.js +85 -0
  18. package/dist/lazy/{Custom-DY63ABbq.js → Custom-zNcfkvdD.js} +1 -1
  19. package/dist/lazy/DatePicker-sqHk1tuj.js +25 -0
  20. package/dist/lazy/{FormList-Df9RL7s7.js → FormList-ChQYp1l-.js} +1 -1
  21. package/dist/lazy/Grid-GCB39VOw.js +38 -0
  22. package/dist/lazy/{Inline-CdWL3Eo6.js → Inline-D1ZMiudr.js} +1 -1
  23. package/dist/lazy/{JsonEdit-RsSvMWDj.js → JsonEdit-BK25HRpb.js} +1 -1
  24. package/dist/lazy/{ObjGroup-BG6jqGua.js → ObjGroup-DLXLO2wj.js} +1 -1
  25. package/dist/lazy/OfferDetails-CKwTw0z4.js +95 -0
  26. package/dist/lazy/{Radio-BIji-gnQ.js → Radio-DoOsjG7K.js} +12 -12
  27. package/dist/lazy/{SearchSelect-CYLY81h9.js → SearchSelect-CktfCSrM.js} +27 -27
  28. package/dist/lazy/Select-DgAQhalx.js +76 -0
  29. package/dist/lazy/Table-C3PlF9J4.js +273 -0
  30. package/dist/lazy/{Tabs-B7G8h04a.js → Tabs-C7ZXJbOT.js} +1 -1
  31. package/dist/lazy/TextArea-DBUM3-2Q.js +25 -0
  32. package/dist/lazy/Wrapper-DIpJqF_p.js +22 -0
  33. package/dist/lazy/{index-6mpfROTy.js → index-BvOUGCFQ.js} +7690 -7491
  34. package/dist/lazy/{useSelect-C3fi7G2S.js → useSelect-BqqanrGo.js} +1 -1
  35. package/dist/style.css +2 -2
  36. package/package.json +1 -1
  37. package/dist/lazy/Card-CaWqhmgk.js +0 -77
  38. package/dist/lazy/Component-C4dBecYq.js +0 -32
  39. package/dist/lazy/Component-CiXpJ5wI.js +0 -70
  40. package/dist/lazy/Component-DO63yabq.js +0 -66
  41. package/dist/lazy/DatePicker-gDYjpGax.js +0 -11
  42. package/dist/lazy/Grid-08EF9A-O.js +0 -30
  43. package/dist/lazy/Select-C1vTDJWg.js +0 -78
  44. package/dist/lazy/TextArea-C0PEa3Es.js +0 -25
@@ -0,0 +1,85 @@
1
+ import { defineComponent as f, inject as p, resolveComponent as k, openBlock as t, createElementBlock as l, createElementVNode as n, normalizeClass as y, createBlock as a, createCommentVNode as v, toDisplayString as I, Fragment as m, renderList as b, withCtx as g, createVNode as r, unref as u } from "vue";
2
+ import { I as s, B, a as M, b as V } from "./index-BvOUGCFQ.js";
3
+ import "element-plus";
4
+ const $ = { class: "crm-curd-card" }, w = { class: "left-part" }, z = { class: "title" }, E = { class: "right-part" }, F = /* @__PURE__ */ f({
5
+ __name: "CurdCard",
6
+ props: {
7
+ children: {},
8
+ collapsible: { type: Boolean },
9
+ title: {},
10
+ btns: {},
11
+ type: {},
12
+ mainIcon: {},
13
+ extraIcons: {}
14
+ },
15
+ setup(N) {
16
+ const c = p("ruleModule", void 0), C = p("pageMethodMap", {}), i = (e) => {
17
+ if (e && c)
18
+ try {
19
+ c[e](C);
20
+ } catch (d) {
21
+ console.error(d);
22
+ }
23
+ };
24
+ return (e, d) => {
25
+ const _ = k("el-tooltip");
26
+ return t(), l("div", $, [
27
+ n("div", {
28
+ class: y(["card-header", {
29
+ inline: e.type === "inline",
30
+ mix: e.type === "mix",
31
+ default: e.type === "default"
32
+ }])
33
+ }, [
34
+ n("div", w, [
35
+ e.mainIcon ? (t(), a(s, {
36
+ key: 0,
37
+ class: "title-icon",
38
+ size: "large",
39
+ name: e.mainIcon.name,
40
+ color: e.mainIcon.color
41
+ }, null, 8, ["name", "color"])) : v("", !0),
42
+ n("span", z, I(e.title), 1),
43
+ (t(!0), l(m, null, b(e.extraIcons, (o) => (t(), l(m, {
44
+ key: o.name
45
+ }, [
46
+ o.tips ? (t(), a(_, {
47
+ key: 0,
48
+ content: o.tips,
49
+ placement: "right",
50
+ class: "low-tsp"
51
+ }, {
52
+ default: g(() => [
53
+ r(s, {
54
+ class: "extra-icon",
55
+ name: o.name,
56
+ color: o.color,
57
+ onClick: (h) => i(o.onClick)
58
+ }, null, 8, ["name", "color", "onClick"])
59
+ ]),
60
+ _: 2
61
+ }, 1032, ["content"])) : (t(), a(s, {
62
+ key: 1,
63
+ class: "extra-icon",
64
+ name: o.name,
65
+ color: o.color,
66
+ onClick: (h) => i(o.onClick)
67
+ }, null, 8, ["name", "color", "onClick"]))
68
+ ], 64))), 128))
69
+ ]),
70
+ n("div", E, [
71
+ r(u(B), {
72
+ btns: e.btns || []
73
+ }, null, 8, ["btns"])
74
+ ])
75
+ ], 2),
76
+ n("div", null, [
77
+ r(u(M), { list: e.children }, null, 8, ["list"])
78
+ ])
79
+ ]);
80
+ };
81
+ }
82
+ }), R = /* @__PURE__ */ V(F, [["__scopeId", "data-v-7fc3fb48"]]);
83
+ export {
84
+ R as default
85
+ };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as n, mergeModels as s, useModel as p, openBlock as t, createElementBlock as r, createBlock as u, resolveDynamicComponent as d, mergeProps as c } from "vue";
2
- import { b as i } from "./index-6mpfROTy.js";
2
+ import { b as i } from "./index-BvOUGCFQ.js";
3
3
  const f = {
4
4
  key: 0,
5
5
  class: "empty"
@@ -0,0 +1,25 @@
1
+ import { defineComponent as d, mergeModels as s, useModel as m, resolveComponent as p, openBlock as t, createElementBlock as u, toDisplayString as i, createBlock as c, mergeProps as k } from "vue";
2
+ const _ = { key: 0 }, f = /* @__PURE__ */ d({
3
+ __name: "DatePicker",
4
+ props: /* @__PURE__ */ s({
5
+ read: { type: Boolean }
6
+ }, {
7
+ modelValue: {},
8
+ modelModifiers: {}
9
+ }),
10
+ emits: ["update:modelValue"],
11
+ setup(a) {
12
+ const e = m(a, "modelValue");
13
+ return (o, l) => {
14
+ const n = p("el-date-picker");
15
+ return o.read ? (t(), u("span", _, i(e.value), 1)) : (t(), c(n, k({ key: 1 }, o.$attrs, {
16
+ modelValue: e.value,
17
+ "onUpdate:modelValue": l[0] || (l[0] = (r) => e.value = r),
18
+ style: { width: "100%" }
19
+ }), null, 16, ["modelValue"]));
20
+ };
21
+ }
22
+ });
23
+ export {
24
+ f as default
25
+ };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as S, mergeModels as j, useModel as G, ref as T, computed as M, watch as H, onMounted as J, provide as K, resolveComponent as b, openBlock as l, createElementBlock as _, unref as m, createBlock as s, Fragment as $, renderList as g, withCtx as r, createElementVNode as C, createVNode as v, mergeProps as R, createCommentVNode as y, toDisplayString as F, createTextVNode as O, h as Q } from "vue";
2
- import { u as U, l as w, d as W, e as V, _ as L, f as X } from "./index-6mpfROTy.js";
2
+ import { u as U, l as w, d as W, e as V, _ as L, f as X } from "./index-BvOUGCFQ.js";
3
3
  import "element-plus";
4
4
  const Y = { class: "vfc-formList" }, Z = { key: 1 }, x = { class: "list-item-content" }, ee = { class: "card-header" }, le = { style: { "margin-top": "5px" } }, oe = /* @__PURE__ */ S({
5
5
  __name: "FormList",
@@ -0,0 +1,38 @@
1
+ import { defineComponent as o, computed as a, openBlock as d, createBlock as e, unref as r, normalizeStyle as l } from "vue";
2
+ import { a as m } from "./index-BvOUGCFQ.js";
3
+ import "element-plus";
4
+ const f = /* @__PURE__ */ o({
5
+ __name: "Grid",
6
+ props: {
7
+ children: {},
8
+ columns: {},
9
+ rowGap: {},
10
+ columnGap: {},
11
+ alignItems: {},
12
+ paddingTop: {},
13
+ paddingBottom: {},
14
+ paddingLeft: {},
15
+ paddingRight: {}
16
+ },
17
+ setup(t) {
18
+ const p = t, n = a(() => ({
19
+ display: "grid",
20
+ "grid-template-columns": `repeat(${p.columns}, 1fr)`,
21
+ "row-gap": (p.rowGap || 14) + "px",
22
+ "column-gap": (p.columnGap || 14) + "px",
23
+ "align-items": p.alignItems,
24
+ "padding-top": p.paddingTop + "px",
25
+ "padding-bottom": p.paddingBottom + "px",
26
+ "padding-left": p.paddingLeft + "px",
27
+ "padding-right": p.paddingRight + "px"
28
+ }));
29
+ return (i, g) => (d(), e(r(m), {
30
+ class: "form-item-grid",
31
+ style: l(n.value),
32
+ list: i.children
33
+ }, null, 8, ["style", "list"]));
34
+ }
35
+ });
36
+ export {
37
+ f as default
38
+ };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as a, computed as l, openBlock as p, createBlock as r, unref as i, normalizeStyle as s } from "vue";
2
- import { a as c, b as f } from "./index-6mpfROTy.js";
2
+ import { a as c, b as f } from "./index-BvOUGCFQ.js";
3
3
  import "element-plus";
4
4
  const m = /* @__PURE__ */ a({
5
5
  __name: "Inline",
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as At, openBlock as mt, createElementBlock as wt, mergeProps as St, createElementVNode as pt, renderSlot as It, normalizeClass as bt, mergeModels as Tt, useModel as Et, createBlock as Rt, unref as $t, withCtx as _t, createVNode as Lt } from "vue";
2
- import { b as xt, g as Nt } from "./index-6mpfROTy.js";
2
+ import { b as xt, g as Nt } from "./index-BvOUGCFQ.js";
3
3
  import "element-plus";
4
4
  const Mt = /* @__PURE__ */ At({
5
5
  __name: "Disabled",
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as p, inject as i, provide as d, ref as f, openBlock as e, createElementBlock as o, unref as n, createBlock as m, Fragment as _, renderList as $, mergeProps as b } from "vue";
2
- import { u as j, d as h, e as k } from "./index-6mpfROTy.js";
2
+ import { u as j, d as h, e as k } from "./index-BvOUGCFQ.js";
3
3
  import "element-plus";
4
4
  const v = { class: "vfc-ObjGroup" }, B = {
5
5
  key: 1,
@@ -0,0 +1,95 @@
1
+ import { defineComponent as p, resolveComponent as b, openBlock as t, createBlock as f, withCtx as u, createVNode as _, createElementVNode as e, createElementBlock as a, Fragment as r, renderList as n, toDisplayString as o, createCommentVNode as v, normalizeStyle as h } from "vue";
2
+ import { C as k } from "./CardListItem-DbXsd1_k.js";
3
+ import { b as y } from "./index-BvOUGCFQ.js";
4
+ const g = { class: "content" }, C = { class: "product-list" }, D = { class: "attribute-list" }, B = {
5
+ key: 0,
6
+ class: "attribute-list-item"
7
+ }, I = { class: "product-title attribute-title" }, N = { class: "attribute-item-list" }, O = { class: "attribute-label" }, V = { class: "attribute-value" }, E = /* @__PURE__ */ p({
8
+ __name: "OfferDetailItem",
9
+ props: {
10
+ data: {},
11
+ btns: {}
12
+ },
13
+ setup(m) {
14
+ return (s, i) => {
15
+ const d = b("el-popover");
16
+ return t(), f(d, {
17
+ "popper-class": "offer-detail",
18
+ placement: "right"
19
+ }, {
20
+ reference: u(() => [
21
+ _(k, {
22
+ data: s.data,
23
+ btns: s.btns
24
+ }, null, 8, ["data", "btns"])
25
+ ]),
26
+ default: u(() => [
27
+ e("div", g, [
28
+ i[0] || (i[0] = e("div", { class: "product-title" }, "Product", -1)),
29
+ e("div", C, [
30
+ (t(!0), a(r, null, n(s.data.product, (l) => (t(), a("div", {
31
+ class: "product-item",
32
+ key: l.label
33
+ }, o(l.label), 1))), 128))
34
+ ]),
35
+ e("div", D, [
36
+ (t(!0), a(r, null, n(s.data.product, (l) => (t(), a(r, {
37
+ key: l.label
38
+ }, [
39
+ l.children.length > 0 ? (t(), a("div", B, [
40
+ e("div", I, o(l.label), 1),
41
+ e("div", N, [
42
+ (t(!0), a(r, null, n(l.children, (c) => (t(), a("div", {
43
+ class: "attribute-item",
44
+ key: c.label
45
+ }, [
46
+ e("div", O, o(c.label), 1),
47
+ e("div", V, o(c.value || "--"), 1)
48
+ ]))), 128))
49
+ ])
50
+ ])) : v("", !0)
51
+ ], 64))), 128))
52
+ ])
53
+ ])
54
+ ]),
55
+ _: 1
56
+ });
57
+ };
58
+ }
59
+ }), L = { class: "card-list-footer" }, S = /* @__PURE__ */ p({
60
+ __name: "OfferDetails",
61
+ props: {
62
+ data: {},
63
+ btns: {},
64
+ columns: { default: 3 },
65
+ gap: { default: 16 },
66
+ footerText: {}
67
+ },
68
+ setup(m) {
69
+ return (s, i) => (t(), a(r, null, [
70
+ e("div", {
71
+ class: "card-list",
72
+ style: h({
73
+ "--columns": s.columns,
74
+ "--gap": s.gap + "px"
75
+ })
76
+ }, [
77
+ (t(!0), a(r, null, n(s.data, (d, l) => (t(), a("div", {
78
+ class: "card-list-item",
79
+ key: l
80
+ }, [
81
+ _(E, {
82
+ data: d,
83
+ btns: s.btns
84
+ }, null, 8, ["data", "btns"])
85
+ ]))), 128))
86
+ ], 4),
87
+ e("div", L, [
88
+ e("span", null, o(s.footerText), 1)
89
+ ])
90
+ ], 64));
91
+ }
92
+ }), z = /* @__PURE__ */ y(S, [["__scopeId", "data-v-1a7cbb6c"]]);
93
+ export {
94
+ z as default
95
+ };
@@ -1,6 +1,6 @@
1
- import { defineComponent as z, mergeModels as S, useModel as T, inject as K, resolveComponent as p, resolveDirective as w, unref as l, openBlock as a, createElementBlock as d, toDisplayString as F, Fragment as y, createCommentVNode as N, withDirectives as I, createBlock as f, mergeProps as k, withCtx as C, createVNode as P, renderList as M } from "vue";
2
- import { u as $ } from "./index-6mpfROTy.js";
3
- import { u as j } from "./useSelect-C3fi7G2S.js";
1
+ import { defineComponent as z, mergeModels as S, useModel as T, inject as K, resolveComponent as p, resolveDirective as w, openBlock as a, createElementBlock as d, toDisplayString as F, unref as l, Fragment as m, createCommentVNode as N, withDirectives as I, createBlock as y, mergeProps as k, withCtx as C, createVNode as P, renderList as M } from "vue";
2
+ import { u as $ } from "./index-BvOUGCFQ.js";
3
+ import { u as j } from "./useSelect-BqqanrGo.js";
4
4
  const E = { key: 0 }, L = {
5
5
  key: 0,
6
6
  style: { "font-size": "12px" }
@@ -25,11 +25,11 @@ const E = { key: 0 }, L = {
25
25
  modelModifiers: {}
26
26
  }),
27
27
  emits: ["update:modelValue"],
28
- setup(v) {
29
- const u = v, c = T(v, "modelValue"), m = $(), b = K("ruleModule", void 0), V = K("pageMethodMap", {}), _ = (e) => {
28
+ setup(f) {
29
+ const u = f, c = T(f, "modelValue"), v = $(), b = K("ruleModule", void 0), V = K("pageMethodMap", {}), D = (e) => {
30
30
  const { valueKey: i = "value", name: s } = u;
31
31
  let t = {};
32
- if (t = n.value.find((r) => r[i] === e) || {}, m.selectData && s && m.updateSelectData(s, t), u.onChange && b)
32
+ if (t = n.value.find((r) => r[i] === e) || {}, v.selectData && s && v.updateSelectData(s, t), u.onChange && b)
33
33
  try {
34
34
  b[u.onChange](V, e, t);
35
35
  } catch (r) {
@@ -38,13 +38,13 @@ const E = { key: 0 }, L = {
38
38
  }, { currentOptions: n, loading: g } = j(u);
39
39
  return (e, i) => {
40
40
  var h;
41
- const s = p("el-radio"), t = p("el-radio-button"), r = p("el-space"), D = p("el-radio-group"), B = w("loading");
42
- return l(m).read ? (a(), d("div", E, F((h = l(n).find((o) => o[e.valueKey] === c.value)) == null ? void 0 : h[e.labelKey]), 1)) : (a(), d(y, { key: 1 }, [
41
+ const s = p("el-radio"), t = p("el-radio-button"), r = p("el-space"), _ = p("el-radio-group"), B = w("loading");
42
+ return e.read ? (a(), d("div", E, F(((h = l(n).find((o) => o[e.valueKey] === c.value)) == null ? void 0 : h[e.labelKey]) || "--"), 1)) : (a(), d(m, { key: 1 }, [
43
43
  !l(n).length && !l(g) ? (a(), d("div", L, "暂无选项")) : N("", !0),
44
- I((a(), f(D, k({
44
+ I((a(), y(_, k({
45
45
  modelValue: c.value,
46
46
  "onUpdate:modelValue": i[0] || (i[0] = (o) => c.value = o),
47
- onChange: _
47
+ onChange: D
48
48
  }, e.$attrs), {
49
49
  default: C(() => [
50
50
  P(r, {
@@ -54,13 +54,13 @@ const E = { key: 0 }, L = {
54
54
  alignment: "normal"
55
55
  }, {
56
56
  default: C(() => [
57
- e.optionType === "circle" || e.optionType === "border" ? (a(!0), d(y, { key: 0 }, M(l(n), (o) => (a(), f(s, {
57
+ e.optionType === "circle" || e.optionType === "border" ? (a(!0), d(m, { key: 0 }, M(l(n), (o) => (a(), y(s, {
58
58
  key: o[e.valueKey],
59
59
  label: o[e.labelKey],
60
60
  value: o[e.valueKey],
61
61
  disabled: o[e.disabledKey],
62
62
  border: e.optionType === "border"
63
- }, null, 8, ["label", "value", "disabled", "border"]))), 128)) : (a(!0), d(y, { key: 1 }, M(l(n), (o) => (a(), f(t, k({
63
+ }, null, 8, ["label", "value", "disabled", "border"]))), 128)) : (a(!0), d(m, { key: 1 }, M(l(n), (o) => (a(), y(t, k({
64
64
  key: o[e.valueKey],
65
65
  label: o[e.labelKey],
66
66
  value: o[e.valueKey],
@@ -1,6 +1,6 @@
1
- import { defineComponent as w, mergeModels as A, useModel as F, inject as S, resolveComponent as y, resolveDirective as I, unref as d, openBlock as o, createElementBlock as u, toDisplayString as b, withDirectives as N, createBlock as k, mergeProps as j, withCtx as v, Fragment as P, renderList as $, createTextVNode as E, createVNode as C } from "vue";
2
- import { u as L, _ as O, b as T } from "./index-6mpfROTy.js";
3
- import { u as U } from "./useSelect-C3fi7G2S.js";
1
+ import { defineComponent as w, mergeModels as A, useModel as F, inject as S, resolveComponent as f, resolveDirective as I, openBlock as o, createElementBlock as i, toDisplayString as y, unref as u, withDirectives as N, createBlock as k, mergeProps as j, withCtx as b, Fragment as P, renderList as $, createTextVNode as E, createVNode as C } from "vue";
2
+ import { u as L, _ as O, b as T } from "./index-BvOUGCFQ.js";
3
+ import { u as U } from "./useSelect-BqqanrGo.js";
4
4
  const q = { key: 0 }, z = { key: 0 }, G = { key: 1 }, H = {
5
5
  key: 1,
6
6
  class: "search-select-wrapper"
@@ -9,6 +9,7 @@ const q = { key: 0 }, z = { key: 0 }, G = { key: 1 }, H = {
9
9
  props: /* @__PURE__ */ A({
10
10
  onSearch: {},
11
11
  disabled: { type: Boolean },
12
+ read: { type: Boolean },
12
13
  options: { default: () => [] },
13
14
  multiple: { type: Boolean, default: !1 },
14
15
  mode: { default: "static" },
@@ -18,18 +19,17 @@ const q = { key: 0 }, z = { key: 0 }, G = { key: 1 }, H = {
18
19
  apiParams: {},
19
20
  dependentFields: {},
20
21
  name: { default: "" },
21
- onChange: {},
22
- read: { type: Boolean }
22
+ onChange: {}
23
23
  }, {
24
24
  modelValue: { type: [String, Number, Boolean, Array] },
25
25
  modelModifiers: {}
26
26
  }),
27
27
  emits: ["update:modelValue"],
28
- setup(h) {
29
- const t = h, s = F(h, "modelValue"), m = L(), c = S("ruleModule", void 0), _ = S("pageMethodMap", {}), M = (e) => {
30
- const { valueKey: i = "value", multiple: f, name: p } = t;
28
+ setup(v) {
29
+ const t = v, d = F(v, "modelValue"), h = L(), c = S("ruleModule", void 0), _ = S("pageMethodMap", {}), M = (e) => {
30
+ const { valueKey: r = "value", multiple: m, name: p } = t;
31
31
  let n = {};
32
- if (f && Array.isArray(e) ? n = r.value.filter((a) => e.includes(a[i])) : n = r.value.find((a) => a[i] === e) || {}, m.selectData && p && m.updateSelectData(p, n), t.onChange && c)
32
+ if (m && Array.isArray(e) ? n = s.value.filter((a) => e.includes(a[r])) : n = s.value.find((a) => a[r] === e) || {}, h.selectData && p && h.updateSelectData(p, n), t.onChange && c)
33
33
  try {
34
34
  c[t.onChange](_, e, n);
35
35
  } catch (a) {
@@ -42,19 +42,19 @@ const q = { key: 0 }, z = { key: 0 }, G = { key: 1 }, H = {
42
42
  } catch (e) {
43
43
  console.error(e);
44
44
  }
45
- }, { currentOptions: r, loading: B } = U(t);
46
- return (e, i) => {
45
+ }, { currentOptions: s, loading: B } = U(t);
46
+ return (e, r) => {
47
47
  var g;
48
- const f = y("el-option"), p = y("el-select"), n = y("el-button"), a = I("loading");
49
- return d(m).read ? (o(), u("div", q, [
50
- e.multiple ? (o(), u("div", z, b(s.value && s.value.map((l) => {
48
+ const m = f("el-option"), p = f("el-select"), n = f("el-button"), a = I("loading");
49
+ return e.read ? (o(), i("div", q, [
50
+ e.multiple ? (o(), i("div", z, y(d.value && d.value.map((l) => {
51
51
  var K;
52
- return (K = d(r).find((D) => D[e.valueKey] === l)) == null ? void 0 : K[e.labelKey];
53
- }).join("、")), 1)) : (o(), u("div", G, b((g = d(r).find((l) => l[e.valueKey] === s.value)) == null ? void 0 : g[e.labelKey]), 1))
54
- ])) : (o(), u("div", H, [
52
+ return (K = u(s).find((D) => D[e.valueKey] === l)) == null ? void 0 : K[e.labelKey];
53
+ }).join("、")), 1)) : (o(), i("div", G, y((g = u(s).find((l) => l[e.valueKey] === d.value)) == null ? void 0 : g[e.labelKey]), 1))
54
+ ])) : (o(), i("div", H, [
55
55
  N((o(), k(p, j({
56
- modelValue: s.value,
57
- "onUpdate:modelValue": i[0] || (i[0] = (l) => s.value = l)
56
+ modelValue: d.value,
57
+ "onUpdate:modelValue": r[0] || (r[0] = (l) => d.value = l)
58
58
  }, e.$attrs, {
59
59
  onChange: M,
60
60
  multiple: e.multiple,
@@ -62,37 +62,37 @@ const q = { key: 0 }, z = { key: 0 }, G = { key: 1 }, H = {
62
62
  filterable: "",
63
63
  disabled: e.disabled
64
64
  }), {
65
- default: v(() => [
66
- (o(!0), u(P, null, $(d(r), (l) => (o(), k(f, {
65
+ default: b(() => [
66
+ (o(!0), i(P, null, $(u(s), (l) => (o(), k(m, {
67
67
  key: l[e.valueKey],
68
68
  label: l[e.labelKey],
69
69
  value: l[e.valueKey],
70
70
  disabled: l[e.disabledKey]
71
71
  }, {
72
- default: v(() => [
73
- E(b(l[e.labelKey]), 1)
72
+ default: b(() => [
73
+ E(y(l[e.labelKey]), 1)
74
74
  ]),
75
75
  _: 2
76
76
  }, 1032, ["label", "value", "disabled"]))), 128))
77
77
  ]),
78
78
  _: 1
79
79
  }, 16, ["modelValue", "multiple", "disabled"])), [
80
- [a, d(B)]
80
+ [a, u(B)]
81
81
  ]),
82
82
  C(n, {
83
83
  onClick: V,
84
84
  disabled: e.disabled,
85
85
  class: "search-btn"
86
86
  }, {
87
- default: v(() => [
88
- C(d(O), { name: "search" })
87
+ default: b(() => [
88
+ C(u(O), { name: "search" })
89
89
  ]),
90
90
  _: 1
91
91
  }, 8, ["disabled"])
92
92
  ]));
93
93
  };
94
94
  }
95
- }), X = /* @__PURE__ */ T(J, [["__scopeId", "data-v-4fd2fc03"]]);
95
+ }), X = /* @__PURE__ */ T(J, [["__scopeId", "data-v-eecd230d"]]);
96
96
  export {
97
97
  X as default
98
98
  };
@@ -0,0 +1,76 @@
1
+ import { defineComponent as _, mergeModels as k, useModel as B, inject as f, computed as D, resolveComponent as y, resolveDirective as S, openBlock as r, createElementBlock as i, toDisplayString as v, createBlock as b, mergeProps as A, withCtx as g, withDirectives as F, Fragment as j, renderList as w, unref as h, createTextVNode as I } from "vue";
2
+ import { u as N } from "./index-BvOUGCFQ.js";
3
+ import { u as P } from "./useSelect-BqqanrGo.js";
4
+ const E = { key: 0 }, L = { style: { "min-height": "32px" } }, $ = /* @__PURE__ */ _({
5
+ __name: "Select",
6
+ props: /* @__PURE__ */ k({
7
+ options: { default: () => [] },
8
+ multiple: { type: Boolean, default: !1 },
9
+ mode: { default: "static" },
10
+ labelKey: { default: "label" },
11
+ valueKey: { default: "value" },
12
+ disabledKey: { default: "disabled" },
13
+ apiParams: {},
14
+ dependentFields: {},
15
+ name: { default: "" },
16
+ onChange: {},
17
+ read: { type: Boolean }
18
+ }, {
19
+ modelValue: { type: [String, Number, Boolean, Array] },
20
+ modelModifiers: {}
21
+ }),
22
+ emits: ["update:modelValue"],
23
+ setup(p) {
24
+ const a = p, s = B(p, "modelValue"), c = N(), m = f("ruleModule", void 0), K = f("pageMethodMap", {}), V = (e) => {
25
+ const { valueKey: t = "value", multiple: o, name: d } = a;
26
+ let n = {};
27
+ if (o && Array.isArray(e) ? n = u.value.filter((l) => e.includes(l[t])) : n = u.value.find((l) => l[t] === e) || {}, c.selectData && d && c.updateSelectData(d, n), a.onChange && m)
28
+ try {
29
+ m[a.onChange](K, e, n);
30
+ } catch (l) {
31
+ console.error(l);
32
+ }
33
+ }, { currentOptions: u, loading: M } = P(a), C = D(() => {
34
+ var e;
35
+ return a.multiple ? u.value.filter(
36
+ (o) => s.value.includes(o[a.valueKey])
37
+ ).map((o) => o[a.labelKey]).join(",") : ((e = u.value.find((t) => t[a.valueKey] === s.value)) == null ? void 0 : e[a.labelKey]) || "--";
38
+ });
39
+ return (e, t) => {
40
+ const o = y("el-option"), d = y("el-select"), n = S("loading");
41
+ return e.read ? (r(), i("span", E, v(C.value), 1)) : (r(), b(d, A({
42
+ key: 1,
43
+ modelValue: s.value,
44
+ "onUpdate:modelValue": t[0] || (t[0] = (l) => s.value = l)
45
+ }, e.$attrs, {
46
+ onChange: V,
47
+ multiple: e.multiple,
48
+ clearable: "",
49
+ filterable: "",
50
+ "fallback-placements": ["bottom"]
51
+ }), {
52
+ default: g(() => [
53
+ F((r(), i("div", L, [
54
+ (r(!0), i(j, null, w(h(u), (l) => (r(), b(o, {
55
+ key: l[e.valueKey],
56
+ label: l[e.labelKey],
57
+ value: l[e.valueKey],
58
+ disabled: l[e.disabledKey]
59
+ }, {
60
+ default: g(() => [
61
+ I(v(l[e.labelKey]), 1)
62
+ ]),
63
+ _: 2
64
+ }, 1032, ["label", "value", "disabled"]))), 128))
65
+ ])), [
66
+ [n, h(M)]
67
+ ])
68
+ ]),
69
+ _: 1
70
+ }, 16, ["modelValue", "multiple"]));
71
+ };
72
+ }
73
+ });
74
+ export {
75
+ $ as default
76
+ };