asiaint-lowcode 3.0.65 → 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/dist/asiaint-lowcode.js +1 -1
- package/dist/asiaint-lowcode.umd.cjs +92 -92
- package/dist/index.d.ts +3 -1
- package/dist/lazy/{Card-C6DWiWZn.js → Card-B-PW_xf6.js} +1 -1
- package/dist/lazy/{Cascader-QgQC7Wex.js → Cascader-DTPcbjS4.js} +9 -8
- package/dist/lazy/{Checkbox-DLT4jPfX.js → Checkbox-Cb7eQedp.js} +13 -12
- package/dist/lazy/{Collapse-BBqD7SZg.js → Collapse-uKo4xUZR.js} +1 -1
- package/dist/lazy/{Component-B39lLJmT.js → Component-BdbW3xbq.js} +1 -1
- package/dist/lazy/{Component-B1d0CbAF.js → Component-BnILgymP.js} +1 -1
- package/dist/lazy/{Component-By5BgmKu.js → Component-CzEIuniO.js} +1 -1
- package/dist/lazy/{Component-2ArGDTPS.js → Component-D1dV4qbv.js} +1 -1
- package/dist/lazy/{Component-BG06SAHV.js → Component-DPfeaS5u.js} +1 -1
- package/dist/lazy/{Component-2L5E_UkG.js → Component-DX8iDxku.js} +1 -1
- package/dist/lazy/{CurdCard-DZrWZFI-.js → CurdCard-BE_lAuIU.js} +1 -1
- package/dist/lazy/{Custom-BVFBvTUw.js → Custom-BnOejQu4.js} +1 -1
- package/dist/lazy/{FormList-DdLDS5qu.js → FormList-8i6IjOEd.js} +1 -1
- package/dist/lazy/{Grid-asSoOpfq.js → Grid-DM0t1623.js} +1 -1
- package/dist/lazy/{Inline-CMRtO9Cq.js → Inline-CvVDnLAl.js} +1 -1
- package/dist/lazy/{JsonEdit-CFhG4VAM.js → JsonEdit-CblpfCk6.js} +1 -1
- package/dist/lazy/{LogList-BuiNAOVW.js → LogList-D4E9Sd3U.js} +1 -1
- package/dist/lazy/{ObjGroup-BLyAm5iB.js → ObjGroup-J8MBNfx9.js} +1 -1
- package/dist/lazy/{OfferDetails-DBmq2nDK.js → OfferDetails-DRm-adPQ.js} +1 -1
- package/dist/lazy/{Progress-Crw6DojO.js → Progress-CU3cbDYw.js} +1 -1
- package/dist/lazy/{Radio-OhpLcZX0.js → Radio-w2_WJsy1.js} +16 -15
- package/dist/lazy/{SearchSelect-B9SRnDdA.js → SearchSelect-BpdYzYvx.js} +28 -27
- package/dist/lazy/{Select-DplDqiHs.js → Select-B0WsuNDL.js} +19 -18
- package/dist/lazy/{Table-DkNmA9oE.js → Table-Bl1g8c0p.js} +1 -1
- package/dist/lazy/{Tabs-CFUlf3nX.js → Tabs-RUkui_oF.js} +1 -1
- package/dist/lazy/{Wrapper-AdqfIGRb.js → Wrapper-DmL_tRcc.js} +1 -1
- package/dist/lazy/{index-sORxG9aa.js → index-BHAyF-de.js} +1451 -1447
- package/dist/lazy/useSelect-DZdGLXAq.js +76 -0
- package/package.json +1 -1
- package/dist/lazy/useSelect-7O5X7Yn_.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
|
+
};
|
package/package.json
CHANGED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { inject as D, ref as v, toRaw as y, onMounted as I, watch as l } from "vue";
|
|
2
|
-
import { $ as P, u as S, l as h, h as g } from "./index-sORxG9aa.js";
|
|
3
|
-
import "element-plus";
|
|
4
|
-
const q = () => {
|
|
5
|
-
const { fetchOptionsFn: e } = D(P);
|
|
6
|
-
return e;
|
|
7
|
-
}, j = (e) => {
|
|
8
|
-
const n = S(), f = q(), a = v([]), r = v(!1), s = h.debounce(async () => {
|
|
9
|
-
if (f && e.apiParams && !Object.values(e.apiParams).some((t) => t === void 0)) {
|
|
10
|
-
r.value = !0;
|
|
11
|
-
try {
|
|
12
|
-
const t = await f({
|
|
13
|
-
formItemProps: y(e),
|
|
14
|
-
formSchema: y(n.schema)
|
|
15
|
-
});
|
|
16
|
-
if (a.value = [...a.value, ...t], e.filters && (a.value = a.value.filter((i) => Array.isArray(e.filters) ? !e.filters.includes(i[e.valueKey || "value"]) : !0)), e.name) {
|
|
17
|
-
const i = g(n.schema.items, e.name);
|
|
18
|
-
i && i.props && (i.props.options = a.value);
|
|
19
|
-
}
|
|
20
|
-
} finally {
|
|
21
|
-
r.value = !1;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}, 300);
|
|
25
|
-
I(() => {
|
|
26
|
-
const { mode: t, options: i = [] } = e;
|
|
27
|
-
t === "static" && (a.value = i), t === "remote" && s();
|
|
28
|
-
}), l(
|
|
29
|
-
() => e.apiParams,
|
|
30
|
-
(t, i) => {
|
|
31
|
-
h.isEqual(t, i) || (a.value = [], s());
|
|
32
|
-
}
|
|
33
|
-
), l(
|
|
34
|
-
() => e.options,
|
|
35
|
-
(t = []) => {
|
|
36
|
-
e.mode === "static" && (a.value = t);
|
|
37
|
-
}
|
|
38
|
-
), l(
|
|
39
|
-
() => e.mode,
|
|
40
|
-
(t) => {
|
|
41
|
-
t === "static" && (a.value = e.options || []), t === "remote" && (a.value = [], s());
|
|
42
|
-
}
|
|
43
|
-
);
|
|
44
|
-
const { mode: A, dependentFields: c } = e;
|
|
45
|
-
if (A === "remote" && Array.isArray(c))
|
|
46
|
-
for (const t of c)
|
|
47
|
-
l(
|
|
48
|
-
() => n.formValues[t],
|
|
49
|
-
(i, m) => {
|
|
50
|
-
s();
|
|
51
|
-
}
|
|
52
|
-
);
|
|
53
|
-
return { selectChange: (t) => {
|
|
54
|
-
const { valueKey: i = "value", multiple: m, name: d } = e;
|
|
55
|
-
let u = {};
|
|
56
|
-
m && Array.isArray(t) ? u = a.value.filter((o) => t.includes(o[i])) : u = a.value.find((o) => o[i] === t) || {}, n.selectData && d && n.updateSelectData(d, u);
|
|
57
|
-
}, currentOptions: a, loading: r, fetchData: s };
|
|
58
|
-
};
|
|
59
|
-
export {
|
|
60
|
-
j as u
|
|
61
|
-
};
|