asiaint-lowcode 3.0.42 → 3.0.44

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 (32) hide show
  1. package/dist/asiaint-lowcode.js +1 -1
  2. package/dist/asiaint-lowcode.umd.cjs +84 -84
  3. package/dist/index.d.ts +1 -0
  4. package/dist/lazy/{Card-S2rqo_c1.js → Card-Ex9sRSpS.js} +1 -1
  5. package/dist/lazy/{Cascader-B6o29F5o.js → Cascader-LkBGEvOS.js} +17 -16
  6. package/dist/lazy/{Checkbox-DkV1ImsU.js → Checkbox-ShPRez_y.js} +3 -2
  7. package/dist/lazy/{Collapse-BtnFY-rS.js → Collapse-BPSdcMAL.js} +1 -1
  8. package/dist/lazy/{Component-D1zd9pWu.js → Component-B5dFypMK.js} +1 -1
  9. package/dist/lazy/{Component-Bs3NxQX9.js → Component-BAUI5X7V.js} +1 -1
  10. package/dist/lazy/{Component-D_nNEscB.js → Component-BsnKZmN8.js} +1 -1
  11. package/dist/lazy/{Component-Bec8N2fA.js → Component-C_6HeUT9.js} +1 -1
  12. package/dist/lazy/{Component-DL_1RCsk.js → Component-DlCaoXMI.js} +1 -1
  13. package/dist/lazy/{Component-Czzp1aIm.js → Component-oPjpIyYK.js} +1 -1
  14. package/dist/lazy/{CurdCard-BtTbeVIr.js → CurdCard-DXiDqENg.js} +1 -1
  15. package/dist/lazy/{Custom-DEeXXg0w.js → Custom-CYhjj4dn.js} +1 -1
  16. package/dist/lazy/{FormList-gRNISlkD.js → FormList-C3PNCPTj.js} +1 -1
  17. package/dist/lazy/{Grid-DrM36LeN.js → Grid-9jS0x7F4.js} +1 -1
  18. package/dist/lazy/{Inline-Db1FhCHc.js → Inline-DzUsOL0y.js} +1 -1
  19. package/dist/lazy/{JsonEdit-CXcrgpCE.js → JsonEdit-DRif6lkC.js} +1 -1
  20. package/dist/lazy/{ObjGroup-DX5wa0mU.js → ObjGroup-Dtdqedii.js} +1 -1
  21. package/dist/lazy/{OfferDetails-Bhl0m0ui.js → OfferDetails-CNxR6wvf.js} +1 -1
  22. package/dist/lazy/{Radio-BLsE0Zq8.js → Radio-DAnkx1Op.js} +3 -2
  23. package/dist/lazy/{SearchSelect-DY44BK9I.js → SearchSelect-BzDWF2VG.js} +4 -3
  24. package/dist/lazy/{Select-C9BLuT_m.js → Select-BFyV74sQ.js} +4 -3
  25. package/dist/lazy/{Table-Cui8PTFW.js → Table-CBJXJWIr.js} +1 -1
  26. package/dist/lazy/{Tabs-Csj6YLqB.js → Tabs-DQw4KZYJ.js} +1 -1
  27. package/dist/lazy/{Wrapper-B5YrhtF1.js → Wrapper-DU5PwSq9.js} +1 -1
  28. package/dist/lazy/{index-Bf2453Vt.js → index-Be3Tmwhx.js} +727 -724
  29. package/dist/lazy/useSelect-DhMGWWcQ.js +61 -0
  30. package/dist/style.css +1 -1
  31. package/package.json +1 -1
  32. package/dist/lazy/useSelect-DqN6kHl2.js +0 -61
@@ -0,0 +1,61 @@
1
+ import { inject as D, ref as v, toRaw as y, onMounted as I, watch as l } from "vue";
2
+ import { $ as P, u as S, l as h, h as g } from "./index-Be3Tmwhx.js";
3
+ import "element-plus";
4
+ const q = () => {
5
+ const { fetchOptionsFn: e } = D(P);
6
+ return e;
7
+ }, j = (e) => {
8
+ const n = S(), f = q(), a = v([]), r = v(!1), s = h.debounce(async () => {
9
+ if (f && e.apiParams && !Object.values(e.apiParams).some((t) => t === void 0)) {
10
+ r.value = !0;
11
+ try {
12
+ const t = await f({
13
+ formItemProps: y(e),
14
+ formSchema: y(n.schema)
15
+ });
16
+ if (a.value = [...a.value, ...t], e.filters && (a.value = a.value.filter((i) => Array.isArray(e.filters) ? !e.filters.includes(i[e.valueKey || "value"]) : !0)), e.name) {
17
+ const i = g(n.schema.items, e.name);
18
+ i && i.props && (i.props.options = a.value);
19
+ }
20
+ } finally {
21
+ r.value = !1;
22
+ }
23
+ }
24
+ }, 300);
25
+ I(() => {
26
+ const { mode: t, options: i = [] } = e;
27
+ t === "static" && (a.value = i), t === "remote" && s();
28
+ }), l(
29
+ () => e.apiParams,
30
+ (t, i) => {
31
+ h.isEqual(t, i) || (a.value = [], s());
32
+ }
33
+ ), l(
34
+ () => e.options,
35
+ (t = []) => {
36
+ e.mode === "static" && (a.value = t);
37
+ }
38
+ ), l(
39
+ () => e.mode,
40
+ (t) => {
41
+ t === "static" && (a.value = e.options || []), t === "remote" && (a.value = [], s());
42
+ }
43
+ );
44
+ const { mode: A, dependentFields: c } = e;
45
+ if (A === "remote" && Array.isArray(c))
46
+ for (const t of c)
47
+ l(
48
+ () => n.formValues[t],
49
+ (i, m) => {
50
+ s();
51
+ }
52
+ );
53
+ return { selectChange: (t) => {
54
+ const { valueKey: i = "value", multiple: m, name: d } = e;
55
+ let u = {};
56
+ m && Array.isArray(t) ? u = a.value.filter((o) => t.includes(o[i])) : u = a.value.find((o) => o[i] === t) || {}, n.selectData && d && n.updateSelectData(d, u);
57
+ }, currentOptions: a, loading: r, fetchData: s };
58
+ };
59
+ export {
60
+ j as u
61
+ };