asiaint-lowcode 2.0.0 → 2.0.1

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 (35) hide show
  1. package/dist/asiaint-lowcode.js +12 -0
  2. package/dist/asiaint-lowcode.umd.cjs +1579 -0
  3. package/dist/index.d.ts +621 -0
  4. package/dist/lazy/Card---AoXvYS.js +46 -0
  5. package/dist/lazy/Cascader-BR70LGn1.js +41 -0
  6. package/dist/lazy/Checkbox-BkN59USC.js +75 -0
  7. package/dist/lazy/Collapse-Dm754krv.js +54 -0
  8. package/dist/lazy/ColorInput-Ox5qD0YJ.js +28 -0
  9. package/dist/lazy/Component-6kccf2p2.js +24 -0
  10. package/dist/lazy/Component-DF4pvvy0.js +97 -0
  11. package/dist/lazy/Component-DJQM5OQV.js +27 -0
  12. package/dist/lazy/Component-DO63yabq.js +66 -0
  13. package/dist/lazy/Component-DT__xEY1.js +117 -0
  14. package/dist/lazy/Component-DhFx0wp3.js +13 -0
  15. package/dist/lazy/Component-wdoYPdpq.js +321 -0
  16. package/dist/lazy/Custom-D5IoN5_M.js +26 -0
  17. package/dist/lazy/DatePicker-DuIm95j0.js +11 -0
  18. package/dist/lazy/Divider-2PVfgKTw.js +21 -0
  19. package/dist/lazy/FormList-BjQT7shp.js +199 -0
  20. package/dist/lazy/Grid-BovYqDr-.js +30 -0
  21. package/dist/lazy/Inline-Cv5LyrT1.js +30 -0
  22. package/dist/lazy/JsonEdit-Dp7eAHK0.js +16385 -0
  23. package/dist/lazy/ObjGroup-DT4UeHtF.js +32 -0
  24. package/dist/lazy/Radio-P_nuE_Fb.js +77 -0
  25. package/dist/lazy/SearchSelect-Tec35-Iy.js +86 -0
  26. package/dist/lazy/Select-CnMIf_86.js +67 -0
  27. package/dist/lazy/Tabs-C7dXurre.js +47 -0
  28. package/dist/lazy/Tag-YpWlcGOi.js +22 -0
  29. package/dist/lazy/TextArea-DW5pxGGU.js +25 -0
  30. package/dist/lazy/Title-32bZDihB.js +4 -0
  31. package/dist/lazy/Title.vue_vue_type_script_setup_true_lang-Ceco_9-w.js +23 -0
  32. package/dist/lazy/index-C9fXRITB.js +22456 -0
  33. package/dist/lazy/useSelect-DvhNm7sS.js +50 -0
  34. package/dist/style.css +6 -0
  35. package/package.json +1 -1
@@ -0,0 +1,50 @@
1
+ import { inject as y, ref as h, onMounted as P, watch as f } from "vue";
2
+ import { $ as g, u as q, l as m, h as b } from "./index-C9fXRITB.js";
3
+ import "element-plus";
4
+ const E = () => {
5
+ const { request: t } = y(g);
6
+ return t;
7
+ }, x = (t) => {
8
+ const d = q(), v = E(), a = h([]), c = h(!1), u = m.debounce(async () => {
9
+ if (!v || !t.api) return;
10
+ const { url: e, method: s, params: r, dataPath: o } = t.api;
11
+ c.value = !0;
12
+ try {
13
+ const n = await v({
14
+ url: e,
15
+ method: s,
16
+ params: s === "GET" ? r : {},
17
+ data: s === "POST" ? r : {}
18
+ }), D = (b(n, o) || []).map((i) => m.isPlainObject(i) ? i : { label: i, value: i });
19
+ a.value = [...a.value, ...D];
20
+ } finally {
21
+ c.value = !1;
22
+ }
23
+ }, 300);
24
+ return P(() => {
25
+ const { mode: e, options: s = [] } = t;
26
+ e === "static" && (a.value = s), e === "remote" && u();
27
+ }), f(
28
+ () => t.api,
29
+ (e, s) => {
30
+ m.isEqual(e, s) || (a.value = [], u());
31
+ }
32
+ ), f(
33
+ () => t.options,
34
+ (e = []) => {
35
+ t.mode === "static" && (a.value = e);
36
+ }
37
+ ), f(
38
+ () => t.mode,
39
+ (e) => {
40
+ e === "static" && (a.value = t.options || []), e === "remote" && (a.value = [], u());
41
+ }
42
+ ), { selectChange: (e) => {
43
+ const { valueKey: s = "value", multiple: r, name: o } = t;
44
+ let n = {};
45
+ r && Array.isArray(e) ? n = a.value.filter((l) => e.includes(l[s])) : n = a.value.find((l) => l[s] === e) || {}, d.selectData && o && d.updateSelectData(o, n);
46
+ }, currentOptions: a, loading: c, fetchData: u };
47
+ };
48
+ export {
49
+ x as u
50
+ };