asiaint-lowcode 2.0.0 → 2.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.
- package/README.md +0 -73
- package/dist/asiaint-lowcode.js +12 -0
- package/dist/asiaint-lowcode.umd.cjs +1579 -0
- package/dist/index.d.ts +528 -0
- package/dist/lazy/Card-op6i_z8G.js +46 -0
- package/dist/lazy/Cascader-cy25S0M_.js +41 -0
- package/dist/lazy/Checkbox-CQ56BycM.js +75 -0
- package/dist/lazy/Collapse-DXETETv8.js +54 -0
- package/dist/lazy/ColorInput-Ox5qD0YJ.js +28 -0
- package/dist/lazy/Component-BEqoz5jH.js +321 -0
- package/dist/lazy/Component-BLahI--2.js +117 -0
- package/dist/lazy/Component-C69_b7D6.js +97 -0
- package/dist/lazy/Component-CcwERaPj.js +27 -0
- package/dist/lazy/Component-DO63yabq.js +66 -0
- package/dist/lazy/Component-DhFx0wp3.js +13 -0
- package/dist/lazy/Component-IxyabXCT.js +24 -0
- package/dist/lazy/Custom-D7E3J-kY.js +26 -0
- package/dist/lazy/DatePicker-B565iRox.js +11 -0
- package/dist/lazy/Divider-2PVfgKTw.js +21 -0
- package/dist/lazy/FormList-BAk7pGQ5.js +199 -0
- package/dist/lazy/Grid-CQ3I3JJA.js +30 -0
- package/dist/lazy/Inline-DqNMJ75M.js +30 -0
- package/dist/lazy/JsonEdit-j4lAk68A.js +16385 -0
- package/dist/lazy/ObjGroup-CKy7PIXn.js +32 -0
- package/dist/lazy/Radio-Cv3X53D3.js +77 -0
- package/dist/lazy/SearchSelect-BkYukJim.js +86 -0
- package/dist/lazy/Select-MM2rUOPj.js +67 -0
- package/dist/lazy/Tabs-BVFfJAUT.js +47 -0
- package/dist/lazy/Tag-YpWlcGOi.js +22 -0
- package/dist/lazy/TextArea-KNtWavU4.js +25 -0
- package/dist/lazy/Title-32bZDihB.js +4 -0
- package/dist/lazy/Title.vue_vue_type_script_setup_true_lang-Ceco_9-w.js +23 -0
- package/dist/lazy/index-DoIvJXpY.js +22488 -0
- package/dist/lazy/useSelect-DkY4BS54.js +50 -0
- package/dist/style.css +6 -0
- 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-DoIvJXpY.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
|
+
};
|