asiaint-lowcode 3.0.65 → 3.0.67
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 +95 -95
- package/dist/index.d.ts +4 -2
- package/dist/lazy/{Card-C6DWiWZn.js → Card-DDgKq_rK.js} +1 -1
- package/dist/lazy/{Cascader-QgQC7Wex.js → Cascader-BYGKNoHU.js} +10 -9
- package/dist/lazy/{Checkbox-DLT4jPfX.js → Checkbox-BAUjA9Wo.js} +14 -13
- package/dist/lazy/{Collapse-BBqD7SZg.js → Collapse-DmSaZNhG.js} +1 -1
- package/dist/lazy/{Component-B39lLJmT.js → Component-CGswwN41.js} +1 -1
- package/dist/lazy/{Component-B1d0CbAF.js → Component-CyzvuQzp.js} +1 -1
- package/dist/lazy/{Component-2L5E_UkG.js → Component-Db6RveM9.js} +1 -1
- package/dist/lazy/{Component-By5BgmKu.js → Component-DlnqzSVP.js} +1 -1
- package/dist/lazy/{Component-BG06SAHV.js → Component-_6IHdV_c.js} +1 -1
- package/dist/lazy/{Component-2ArGDTPS.js → Component-qw8S5wm6.js} +1 -1
- package/dist/lazy/{CurdCard-DZrWZFI-.js → CurdCard-DvxZHYcw.js} +1 -1
- package/dist/lazy/{Custom-BVFBvTUw.js → Custom-9JyY2HbI.js} +1 -1
- package/dist/lazy/{FormList-DdLDS5qu.js → FormList-Cp73RTPI.js} +1 -1
- package/dist/lazy/{Grid-asSoOpfq.js → Grid-BOeJuByH.js} +1 -1
- package/dist/lazy/{Inline-CMRtO9Cq.js → Inline-DTCDMEMd.js} +1 -1
- package/dist/lazy/{JsonEdit-CFhG4VAM.js → JsonEdit-P7upyVKA.js} +1 -1
- package/dist/lazy/{LogList-BuiNAOVW.js → LogList-FbGq9DrS.js} +1 -1
- package/dist/lazy/{ObjGroup-BLyAm5iB.js → ObjGroup-hQdQNvfG.js} +1 -1
- package/dist/lazy/{OfferDetails-DBmq2nDK.js → OfferDetails-CrWDdtvt.js} +1 -1
- package/dist/lazy/{Progress-Crw6DojO.js → Progress-B21PSNL0.js} +1 -1
- package/dist/lazy/{Radio-OhpLcZX0.js → Radio-DOeJBqZj.js} +17 -16
- package/dist/lazy/{SearchSelect-B9SRnDdA.js → SearchSelect-Dj-u0nw3.js} +29 -28
- package/dist/lazy/Select-D3XhLyrX.js +83 -0
- package/dist/lazy/{Table-DkNmA9oE.js → Table-CoYLAf1j.js} +1 -1
- package/dist/lazy/{Tabs-CFUlf3nX.js → Tabs-BCclKkhg.js} +1 -1
- package/dist/lazy/{Wrapper-AdqfIGRb.js → Wrapper-CbRUQW6V.js} +1 -1
- package/dist/lazy/{index-sORxG9aa.js → index-DYA6kETU.js} +1451 -1447
- package/dist/lazy/useSelect-7h75CJio.js +76 -0
- package/package.json +1 -1
- package/dist/lazy/Select-DplDqiHs.js +0 -82
- 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-DYA6kETU.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,82 +0,0 @@
|
|
|
1
|
-
import { defineComponent as _, mergeModels as k, useModel as B, inject as f, computed as D, resolveComponent as y, resolveDirective as S, openBlock as s, createElementBlock as i, toDisplayString as v, createBlock as b, mergeProps as A, withCtx as g, withDirectives as F, Fragment as j, renderList as w, unref as h, createTextVNode as I } from "vue";
|
|
2
|
-
import { u as N } from "./index-sORxG9aa.js";
|
|
3
|
-
import { u as P } from "./useSelect-7O5X7Yn_.js";
|
|
4
|
-
const $ = { key: 0 }, E = { style: { "min-height": "32px" } }, U = /* @__PURE__ */ _({
|
|
5
|
-
__name: "Select",
|
|
6
|
-
props: /* @__PURE__ */ k({
|
|
7
|
-
options: { default: () => [] },
|
|
8
|
-
multiple: { type: Boolean, default: !1 },
|
|
9
|
-
mode: { default: "static" },
|
|
10
|
-
labelKey: { default: "label" },
|
|
11
|
-
valueKey: { default: "value" },
|
|
12
|
-
disabledKey: { default: "disabled" },
|
|
13
|
-
env: {},
|
|
14
|
-
apiParams: {},
|
|
15
|
-
dependentFields: {},
|
|
16
|
-
name: { default: "" },
|
|
17
|
-
onChange: {},
|
|
18
|
-
read: { type: Boolean },
|
|
19
|
-
clearable: { type: Boolean },
|
|
20
|
-
filters: {}
|
|
21
|
-
}, {
|
|
22
|
-
modelValue: { type: [String, Number, Boolean, Array] },
|
|
23
|
-
modelModifiers: {}
|
|
24
|
-
}),
|
|
25
|
-
emits: ["update:modelValue"],
|
|
26
|
-
setup(p) {
|
|
27
|
-
const a = p, d = B(p, "modelValue"), c = N(), m = f("ruleModule", void 0), K = f("pageMethodMap", {}), V = (e) => {
|
|
28
|
-
const { valueKey: t = "value", multiple: n, name: o } = a;
|
|
29
|
-
let u = {};
|
|
30
|
-
if (n && Array.isArray(e) ? u = r.value.filter((l) => e.includes(l[t])) : u = r.value.find((l) => l[t] === e) || {}, c.selectData && o && c.updateSelectData(o, u), a.onChange && m)
|
|
31
|
-
try {
|
|
32
|
-
m[a.onChange](K, e, u);
|
|
33
|
-
} catch (l) {
|
|
34
|
-
console.error(l);
|
|
35
|
-
}
|
|
36
|
-
}, { currentOptions: r, loading: M } = P(a), C = D(() => {
|
|
37
|
-
var t;
|
|
38
|
-
if (a.multiple)
|
|
39
|
-
return r.value.filter(
|
|
40
|
-
(o) => d.value.includes(o[a.valueKey])
|
|
41
|
-
).map((o) => o[a.labelKey]).join(",");
|
|
42
|
-
const e = (t = r.value.find((n) => n[a.valueKey] === d.value)) == null ? void 0 : t[a.labelKey];
|
|
43
|
-
return !e || `${e}`.trim().length === 0 ? "--" : e;
|
|
44
|
-
});
|
|
45
|
-
return (e, t) => {
|
|
46
|
-
const n = y("el-option"), o = y("el-select"), u = S("loading");
|
|
47
|
-
return e.read ? (s(), i("span", $, v(C.value), 1)) : (s(), b(o, A({
|
|
48
|
-
key: 1,
|
|
49
|
-
modelValue: d.value,
|
|
50
|
-
"onUpdate:modelValue": t[0] || (t[0] = (l) => d.value = l)
|
|
51
|
-
}, e.$attrs, {
|
|
52
|
-
onChange: V,
|
|
53
|
-
multiple: e.multiple,
|
|
54
|
-
clearable: "",
|
|
55
|
-
filterable: "",
|
|
56
|
-
"fallback-placements": ["bottom"]
|
|
57
|
-
}), {
|
|
58
|
-
default: g(() => [
|
|
59
|
-
F((s(), i("div", E, [
|
|
60
|
-
(s(!0), i(j, null, w(h(r), (l) => (s(), b(n, {
|
|
61
|
-
key: l[e.valueKey],
|
|
62
|
-
label: l[e.labelKey],
|
|
63
|
-
value: l[e.valueKey],
|
|
64
|
-
disabled: l[e.disabledKey]
|
|
65
|
-
}, {
|
|
66
|
-
default: g(() => [
|
|
67
|
-
I(v(l[e.labelKey]), 1)
|
|
68
|
-
]),
|
|
69
|
-
_: 2
|
|
70
|
-
}, 1032, ["label", "value", "disabled"]))), 128))
|
|
71
|
-
])), [
|
|
72
|
-
[u, h(M)]
|
|
73
|
-
])
|
|
74
|
-
]),
|
|
75
|
-
_: 1
|
|
76
|
-
}, 16, ["modelValue", "multiple"]));
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
export {
|
|
81
|
-
U as default
|
|
82
|
-
};
|
|
@@ -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
|
-
};
|