asiaint-lowcode 3.0.64 → 3.0.66
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.
- package/README.md +31 -31
- package/dist/asiaint-lowcode.js +1 -1
- package/dist/asiaint-lowcode.umd.cjs +106 -106
- package/dist/index.d.ts +3 -1
- package/dist/lazy/{Card-8R10Q2H7.js → Card-B-PW_xf6.js} +2 -2
- package/dist/lazy/{Cascader-C6j8GRRA.js → Cascader-DTPcbjS4.js} +9 -8
- package/dist/lazy/{Checkbox-DeqNlXP3.js → Checkbox-Cb7eQedp.js} +13 -12
- package/dist/lazy/{Collapse-agcv2hyU.js → Collapse-uKo4xUZR.js} +1 -1
- package/dist/lazy/{Component-CwK4c36o.js → Component-BdbW3xbq.js} +1 -1
- package/dist/lazy/{Component-DPHWPAYw.js → Component-BnILgymP.js} +2 -2
- package/dist/lazy/{Component-CUlCMawS.js → Component-CzEIuniO.js} +1 -1
- package/dist/lazy/{Component-Ce9smX1d.js → Component-D1dV4qbv.js} +13 -13
- package/dist/lazy/{Component-1EeLobdd.js → Component-DPfeaS5u.js} +2 -2
- package/dist/lazy/{Component-B08MYgrz.js → Component-DX8iDxku.js} +1 -1
- package/dist/lazy/{CurdCard-CwcNHypG.js → CurdCard-BE_lAuIU.js} +2 -2
- package/dist/lazy/{Custom-D3f2BoYV.js → Custom-BnOejQu4.js} +7 -7
- package/dist/lazy/{FormList-DzwJ1W5P.js → FormList-8i6IjOEd.js} +1 -1
- package/dist/lazy/{Grid-DcbsLRmM.js → Grid-DM0t1623.js} +1 -1
- package/dist/lazy/{Inline-_pNRHSZv.js → Inline-CvVDnLAl.js} +7 -7
- package/dist/lazy/{JsonEdit-CsluGt-z.js → JsonEdit-CblpfCk6.js} +3 -3
- package/dist/lazy/{LogList-BKzFO3Vi.js → LogList-D4E9Sd3U.js} +7 -7
- package/dist/lazy/{ObjGroup-CGlyTF5A.js → ObjGroup-J8MBNfx9.js} +1 -1
- package/dist/lazy/{OfferDetails-BupPT4zL.js → OfferDetails-DRm-adPQ.js} +24 -24
- package/dist/lazy/{Progress-oHEIwwmg.js → Progress-CU3cbDYw.js} +5 -5
- package/dist/lazy/{Radio-CoRBg0UU.js → Radio-w2_WJsy1.js} +16 -15
- package/dist/lazy/{SearchSelect-DpoXJA4K.js → SearchSelect-BpdYzYvx.js} +30 -29
- package/dist/lazy/{Select-BxksxgKW.js → Select-B0WsuNDL.js} +19 -18
- package/dist/lazy/{Table-e-TDZci-.js → Table-Bl1g8c0p.js} +18 -18
- package/dist/lazy/{Tabs-DGfkxdqJ.js → Tabs-RUkui_oF.js} +1 -1
- package/dist/lazy/{Wrapper-CTxV8w6y.js → Wrapper-DmL_tRcc.js} +5 -5
- package/dist/lazy/{index-DU4L1LqE.js → index-BHAyF-de.js} +2139 -2148
- package/dist/lazy/useSelect-DZdGLXAq.js +76 -0
- package/dist/style.css +2 -2
- package/global.d.ts +10 -10
- package/package.json +36 -36
- package/dist/lazy/useSelect-CmeDB6g1.js +0 -61
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { inject as I, ref as h, toRaw as y, onMounted as S, watch as r } from "vue";
|
|
2
|
+
import { $ as D, u as P, l as F, h as g } from "./index-BHAyF-de.js";
|
|
3
|
+
import "element-plus";
|
|
4
|
+
const q = () => {
|
|
5
|
+
const { fetchOptionsFn: e } = I(D);
|
|
6
|
+
return e;
|
|
7
|
+
}, $ = (e) => {
|
|
8
|
+
const s = P(), c = q(), a = h([]), u = h(!1);
|
|
9
|
+
let m = 0;
|
|
10
|
+
const l = F.debounce(async () => {
|
|
11
|
+
if (!c || !e.apiParams || Object.values(e.apiParams).some((n) => n === void 0))
|
|
12
|
+
return;
|
|
13
|
+
u.value = !0;
|
|
14
|
+
const t = ++m;
|
|
15
|
+
try {
|
|
16
|
+
const n = await c({
|
|
17
|
+
formItemProps: y(e),
|
|
18
|
+
formSchema: y(s.schema)
|
|
19
|
+
});
|
|
20
|
+
if (t !== m)
|
|
21
|
+
return;
|
|
22
|
+
if (a.value = [...n], e.filters && (a.value = a.value.filter((i) => Array.isArray(e.filters) ? !e.filters.includes(i[e.valueKey || "value"]) : !0)), e.name) {
|
|
23
|
+
const i = g(s.schema.items, e.name);
|
|
24
|
+
i && i.props && (i.props.options = a.value);
|
|
25
|
+
}
|
|
26
|
+
if (e.refreshFlag && a.value.length >= 1) {
|
|
27
|
+
s.updateFormValues(
|
|
28
|
+
{
|
|
29
|
+
[`${e.name}`]: a.value[0][e.valueKey || "value"]
|
|
30
|
+
},
|
|
31
|
+
!0
|
|
32
|
+
);
|
|
33
|
+
const i = g(s.schema.items, e.name);
|
|
34
|
+
i && i.props && (i.props.refreshFlag = !1);
|
|
35
|
+
}
|
|
36
|
+
} finally {
|
|
37
|
+
u.value = !1;
|
|
38
|
+
}
|
|
39
|
+
}, 300);
|
|
40
|
+
S(() => {
|
|
41
|
+
const { mode: t, options: n = [] } = e;
|
|
42
|
+
t === "static" && (a.value = n), t === "remote" && l();
|
|
43
|
+
}), r(
|
|
44
|
+
() => e.apiParams,
|
|
45
|
+
(t, n) => {
|
|
46
|
+
F.isEqual(t, n) || (a.value = [], l());
|
|
47
|
+
}
|
|
48
|
+
), r(
|
|
49
|
+
() => e.options,
|
|
50
|
+
(t = []) => {
|
|
51
|
+
e.mode === "static" && (a.value = t);
|
|
52
|
+
}
|
|
53
|
+
), r(
|
|
54
|
+
() => e.mode,
|
|
55
|
+
(t) => {
|
|
56
|
+
t === "static" && (a.value = e.options || []), t === "remote" && (a.value = [], l());
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
const { mode: A, dependentFields: d } = e;
|
|
60
|
+
if (A === "remote" && Array.isArray(d))
|
|
61
|
+
for (const t of d)
|
|
62
|
+
r(
|
|
63
|
+
() => s.formValues[t],
|
|
64
|
+
(n, i) => {
|
|
65
|
+
l();
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
return { selectChange: (t) => {
|
|
69
|
+
const { valueKey: n = "value", multiple: i, name: v } = e;
|
|
70
|
+
let f = {};
|
|
71
|
+
i && Array.isArray(t) ? f = a.value.filter((o) => t.includes(o[n])) : f = a.value.find((o) => o[n] === t) || {}, s.selectData && v && s.updateSelectData(v, f);
|
|
72
|
+
}, currentOptions: a, loading: u, fetchData: l };
|
|
73
|
+
};
|
|
74
|
+
export {
|
|
75
|
+
$ as u
|
|
76
|
+
};
|