asiaint-lowcode 3.0.0 → 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 +117 -117
  3. package/dist/index.d.ts +25 -2
  4. package/dist/lazy/{Card-BDPgDrI2.js → Card-CgInTORA.js} +1 -1
  5. package/dist/lazy/{Cascader-C4-YmIaK.js → Cascader-Ccrs8-ka.js} +1 -1
  6. package/dist/lazy/{Checkbox-DNSS1Txw.js → Checkbox-CWWOw1FI.js} +2 -2
  7. package/dist/lazy/{Collapse-C80q6smT.js → Collapse-ckoNfqa8.js} +1 -1
  8. package/dist/lazy/{Component-CeDDbFlt.js → Component-DjRLGRhq.js} +1 -1
  9. package/dist/lazy/{Component-B79gmO6K.js → Component-EKiCae99.js} +1 -1
  10. package/dist/lazy/{Component-Ghcasgly.js → Component-JcjpPNlK.js} +1 -1
  11. package/dist/lazy/{Component-BU6S4ypQ.js → Component-QDqteMg2.js} +1 -1
  12. package/dist/lazy/{Component-xoY7y60W.js → Component-ms58oJYi.js} +1 -1
  13. package/dist/lazy/{Custom-BG94rQkt.js → Custom-agCeCFgq.js} +1 -1
  14. package/dist/lazy/{DatePicker-6vsAU5ji.js → DatePicker-2RgUNM5p.js} +1 -1
  15. package/dist/lazy/{FormList-BfBo9OwL.js → FormList-DLFUVPXo.js} +1 -1
  16. package/dist/lazy/{Grid-DmDygTZN.js → Grid-CEKhkcz0.js} +1 -1
  17. package/dist/lazy/{Inline-BaF4S3jV.js → Inline-D_8y_g96.js} +1 -1
  18. package/dist/lazy/{JsonEdit-BPGmEF5d.js → JsonEdit-BeSmvWhK.js} +1 -1
  19. package/dist/lazy/{ObjGroup-CsBAxkRV.js → ObjGroup-Boc4ftOK.js} +1 -1
  20. package/dist/lazy/{Radio-C8HHJrdk.js → Radio-B8y5htdt.js} +2 -2
  21. package/dist/lazy/{SearchSelect-Xt5FhvIb.js → SearchSelect-BHyhol4D.js} +2 -2
  22. package/dist/lazy/Select-qvIWMCjT.js +64 -0
  23. package/dist/lazy/{Tabs-C945YGKQ.js → Tabs-Dcwprp8J.js} +1 -1
  24. package/dist/lazy/{TextArea-CwQ9cOJB.js → TextArea-C5FB32gt.js} +1 -1
  25. package/dist/lazy/{index-09dr6bnU.js → index-DfCg75rA.js} +4139 -4104
  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-CuE6Swfa.js +0 -68
  30. package/dist/lazy/useSelect-CbmMfUqn.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
+ };