asiaint-lowcode 2.0.6 → 3.0.0

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 (34) hide show
  1. package/README.md +31 -31
  2. package/dist/asiaint-lowcode.js +1 -1
  3. package/dist/asiaint-lowcode.umd.cjs +131 -131
  4. package/dist/index.d.ts +59 -35
  5. package/dist/lazy/{Card-Br9_6h4Z.js → Card-BDPgDrI2.js} +6 -6
  6. package/dist/lazy/Cascader-C4-YmIaK.js +44 -0
  7. package/dist/lazy/{Checkbox-CqO1-QlM.js → Checkbox-DNSS1Txw.js} +12 -11
  8. package/dist/lazy/{Collapse-C8nFsrOL.js → Collapse-C80q6smT.js} +1 -1
  9. package/dist/lazy/{Component-CV0LZLKE.js → Component-B79gmO6K.js} +1 -1
  10. package/dist/lazy/Component-BU6S4ypQ.js +28 -0
  11. package/dist/lazy/Component-BftgSxpa.js +13 -0
  12. package/dist/lazy/{Component-DP7iB6BT.js → Component-CeDDbFlt.js} +2 -2
  13. package/dist/lazy/{Component-af_9m360.js → Component-Ghcasgly.js} +1 -1
  14. package/dist/lazy/{Component-DG-QKg64.js → Component-xoY7y60W.js} +2 -2
  15. package/dist/lazy/{Custom-Dk1Nr81h.js → Custom-BG94rQkt.js} +7 -7
  16. package/dist/lazy/{DatePicker-C_h8PGuz.js → DatePicker-6vsAU5ji.js} +1 -1
  17. package/dist/lazy/{FormList-ciHaSsZN.js → FormList-BfBo9OwL.js} +1 -1
  18. package/dist/lazy/{Grid-CZxpbowk.js → Grid-DmDygTZN.js} +1 -1
  19. package/dist/lazy/{Inline-Bnp-p-3I.js → Inline-BaF4S3jV.js} +2 -2
  20. package/dist/lazy/{JsonEdit-B4yGMT6R.js → JsonEdit-BPGmEF5d.js} +3 -3
  21. package/dist/lazy/{ObjGroup-CipzGSLC.js → ObjGroup-CsBAxkRV.js} +1 -1
  22. package/dist/lazy/{Radio-C6gBFA3u.js → Radio-C8HHJrdk.js} +15 -14
  23. package/dist/lazy/{SearchSelect-CbeuYE7W.js → SearchSelect-Xt5FhvIb.js} +12 -11
  24. package/dist/lazy/{Select-LDWGwp2E.js → Select-CuE6Swfa.js} +15 -14
  25. package/dist/lazy/{Tabs-BOvsls22.js → Tabs-C945YGKQ.js} +1 -1
  26. package/dist/lazy/{TextArea-D2Jmk5Mf.js → TextArea-CwQ9cOJB.js} +1 -1
  27. package/dist/lazy/{index-CqzCIPnG.js → index-09dr6bnU.js} +6072 -5880
  28. package/dist/lazy/useSelect-CbmMfUqn.js +55 -0
  29. package/dist/style.css +2 -2
  30. package/global.d.ts +10 -10
  31. package/package.json +36 -36
  32. package/dist/lazy/Cascader-QU2iguK3.js +0 -41
  33. package/dist/lazy/Component-DwEwJ8x3.js +0 -24
  34. package/dist/lazy/useSelect-Czrzaha_.js +0 -50
@@ -0,0 +1,55 @@
1
+ import { inject as A, ref as v, onMounted as D, watch as o } from "vue";
2
+ import { $ as g, u as q, l as y } from "./index-09dr6bnU.js";
3
+ import "element-plus";
4
+ const F = () => {
5
+ const { fetchOptionsFn: t } = A(g);
6
+ return t;
7
+ }, E = (t) => {
8
+ const i = q(), c = F(), a = v([]), l = v(!1), s = y.debounce(async () => {
9
+ if (!c || !t.apiParams) return;
10
+ const { apiParams: e } = t;
11
+ l.value = !0;
12
+ try {
13
+ const n = await c(e);
14
+ a.value = [...a.value, ...n];
15
+ } finally {
16
+ l.value = !1;
17
+ }
18
+ }, 300);
19
+ D(() => {
20
+ const { mode: e, options: n = [] } = t;
21
+ e === "static" && (a.value = n), e === "remote" && s();
22
+ }), o(
23
+ () => t.apiParams,
24
+ (e, n) => {
25
+ y.isEqual(e, n) || (a.value = [], s());
26
+ }
27
+ ), o(
28
+ () => t.options,
29
+ (e = []) => {
30
+ t.mode === "static" && (a.value = e);
31
+ }
32
+ ), o(
33
+ () => t.mode,
34
+ (e) => {
35
+ e === "static" && (a.value = t.options || []), e === "remote" && (a.value = [], s());
36
+ }
37
+ );
38
+ const { mode: h, dependentFields: f } = t;
39
+ if (h === "remote" && Array.isArray(f))
40
+ for (const e of f)
41
+ o(
42
+ () => i.formValues[e],
43
+ (n, m) => {
44
+ s();
45
+ }
46
+ );
47
+ return { selectChange: (e) => {
48
+ const { valueKey: n = "value", multiple: m, name: d } = t;
49
+ let u = {};
50
+ m && Array.isArray(e) ? u = a.value.filter((r) => e.includes(r[n])) : u = a.value.find((r) => r[n] === e) || {}, i.selectData && d && i.updateSelectData(d, u);
51
+ }, currentOptions: a, loading: l, fetchData: s };
52
+ };
53
+ export {
54
+ E as u
55
+ };