asiaint-lowcode 3.0.1 → 3.0.2

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 (30) hide show
  1. package/dist/asiaint-lowcode.js +1 -1
  2. package/dist/asiaint-lowcode.umd.cjs +54 -54
  3. package/dist/index.d.ts +21 -2
  4. package/dist/lazy/{Card-Dsd1ydt8.js → Card-CgInTORA.js} +1 -1
  5. package/dist/lazy/{Cascader-D8pYveJW.js → Cascader-Ccrs8-ka.js} +1 -1
  6. package/dist/lazy/{Checkbox-DmNO76gt.js → Checkbox-CWWOw1FI.js} +2 -2
  7. package/dist/lazy/{Collapse-DahOWaTk.js → Collapse-ckoNfqa8.js} +1 -1
  8. package/dist/lazy/{Component-DQcpUpZd.js → Component-DjRLGRhq.js} +1 -1
  9. package/dist/lazy/{Component-C1EGoisS.js → Component-EKiCae99.js} +1 -1
  10. package/dist/lazy/{Component-D08n0RnK.js → Component-JcjpPNlK.js} +1 -1
  11. package/dist/lazy/{Component-DvJBRtpM.js → Component-QDqteMg2.js} +1 -1
  12. package/dist/lazy/{Component-DT5ozzlx.js → Component-ms58oJYi.js} +1 -1
  13. package/dist/lazy/{Custom-BVgwtYPa.js → Custom-agCeCFgq.js} +1 -1
  14. package/dist/lazy/{DatePicker-Ll1tF6zR.js → DatePicker-2RgUNM5p.js} +1 -1
  15. package/dist/lazy/{FormList-DPko3piR.js → FormList-DLFUVPXo.js} +1 -1
  16. package/dist/lazy/{Grid-C1DCBRVh.js → Grid-CEKhkcz0.js} +1 -1
  17. package/dist/lazy/{Inline-C_WTGbGy.js → Inline-D_8y_g96.js} +1 -1
  18. package/dist/lazy/{JsonEdit-C79HaljB.js → JsonEdit-BeSmvWhK.js} +1 -1
  19. package/dist/lazy/{ObjGroup-B8XE-sZH.js → ObjGroup-Boc4ftOK.js} +1 -1
  20. package/dist/lazy/{Radio-W5d4ZrBI.js → Radio-B8y5htdt.js} +2 -2
  21. package/dist/lazy/{SearchSelect-BsBXbAx_.js → SearchSelect-BHyhol4D.js} +2 -2
  22. package/dist/lazy/Select-qvIWMCjT.js +64 -0
  23. package/dist/lazy/{Tabs-CT8toQRa.js → Tabs-Dcwprp8J.js} +1 -1
  24. package/dist/lazy/{TextArea-N0w87ek_.js → TextArea-C5FB32gt.js} +1 -1
  25. package/dist/lazy/{index-DuQxCd3z.js → index-DfCg75rA.js} +2548 -2539
  26. package/dist/lazy/useSelect-CwRNgHGU.js +58 -0
  27. package/dist/style.css +1 -1
  28. package/package.json +2 -2
  29. package/dist/lazy/Select-COqlMsmt.js +0 -68
  30. package/dist/lazy/useSelect-DdH13YK3.js +0 -55
@@ -0,0 +1,58 @@
1
+ import { inject as D, ref as v, toRaw as h, onMounted as g, watch as i } from "vue";
2
+ import { $ as q, u as w, l as y } from "./index-DfCg75rA.js";
3
+ import "element-plus";
4
+ const F = () => {
5
+ const { fetchOptionsFn: t } = D(q);
6
+ return t;
7
+ }, E = (t) => {
8
+ const n = w(), u = F(), a = v([]), l = v(!1), s = y.debounce(async () => {
9
+ if (u) {
10
+ l.value = !0;
11
+ try {
12
+ const e = await u({
13
+ formItemProps: h(t),
14
+ formSchema: h(n.schema)
15
+ });
16
+ a.value = [...a.value, ...e];
17
+ } finally {
18
+ l.value = !1;
19
+ }
20
+ }
21
+ }, 300);
22
+ g(() => {
23
+ const { mode: e, options: o = [] } = t;
24
+ e === "static" && (a.value = o), e === "remote" && s();
25
+ }), i(
26
+ () => t.apiParams,
27
+ (e, o) => {
28
+ y.isEqual(e, o) || (a.value = [], s());
29
+ }
30
+ ), i(
31
+ () => t.options,
32
+ (e = []) => {
33
+ t.mode === "static" && (a.value = e);
34
+ }
35
+ ), i(
36
+ () => t.mode,
37
+ (e) => {
38
+ e === "static" && (a.value = t.options || []), e === "remote" && (a.value = [], s());
39
+ }
40
+ );
41
+ const { mode: A, dependentFields: f } = t;
42
+ if (A === "remote" && Array.isArray(f))
43
+ for (const e of f)
44
+ i(
45
+ () => n.formValues[e],
46
+ (o, m) => {
47
+ s();
48
+ }
49
+ );
50
+ return { selectChange: (e) => {
51
+ const { valueKey: o = "value", multiple: m, name: d } = t;
52
+ let c = {};
53
+ m && Array.isArray(e) ? c = a.value.filter((r) => e.includes(r[o])) : c = a.value.find((r) => r[o] === e) || {}, n.selectData && d && n.updateSelectData(d, c);
54
+ }, currentOptions: a, loading: l, fetchData: s };
55
+ };
56
+ export {
57
+ E as u
58
+ };