cimu-parcel 1.1.7 → 1.1.9
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 +4 -1
- package/dist/cimu-parcel.css +1 -1
- package/dist/cimu-parcel.es.js +1 -1
- package/dist/cimu-parcel.umd.js +7 -7
- package/dist/{index-Cob9E3Gg.js → index-BbwEkGQe.js} +1 -1
- package/dist/{index-BBplahb6.js → index-CXoB6786.js} +462 -462
- package/dist/index-D1-cJrkU.js +121 -0
- package/package.json +1 -1
- package/dist/index-Bt4fAGZ5.js +0 -108
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { defineComponent as D, computed as k, resolveComponent as p, createBlock as h, openBlock as i, mergeProps as E, withCtx as f, createElementBlock as g, Fragment as _, renderList as x, createCommentVNode as I, createTextVNode as V, toDisplayString as y, createVNode as m, createElementVNode as U } from "vue";
|
|
2
|
+
import { _ as F } from "./index-CXoB6786.js";
|
|
3
|
+
const L = /* @__PURE__ */ D({
|
|
4
|
+
__name: "index",
|
|
5
|
+
props: {
|
|
6
|
+
value: {},
|
|
7
|
+
config: {},
|
|
8
|
+
col: {}
|
|
9
|
+
},
|
|
10
|
+
emits: ["update:value", "callback"],
|
|
11
|
+
setup(C, { emit: N }) {
|
|
12
|
+
const d = C, b = N, e = {
|
|
13
|
+
label: d.config.fieldNames?.label ?? "label",
|
|
14
|
+
value: d.config.fieldNames?.value ?? "value",
|
|
15
|
+
children: d.config.fieldNames?.children ?? "children"
|
|
16
|
+
}, s = k({
|
|
17
|
+
get: () => d.value,
|
|
18
|
+
set: (c) => {
|
|
19
|
+
b("update:value", c), b("callback", {
|
|
20
|
+
value: c,
|
|
21
|
+
config: d.config
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}), w = k(() => d.config.options ?? []), A = (c, l) => {
|
|
25
|
+
let n = s.value;
|
|
26
|
+
if (Array.isArray(n)) {
|
|
27
|
+
if (c && l && (l[e.value] === "" || l[e.value] === void 0)) {
|
|
28
|
+
n.splice(0, n.length), n.push("");
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
for (let r = n.length - 1; r >= 0; r--)
|
|
32
|
+
n[r] === "" && n.splice(r, 1);
|
|
33
|
+
if (l[e.children || "children"] && l[e.children || "children"].length) {
|
|
34
|
+
const r = l[e.children || "children"].map((o) => o[e.value]);
|
|
35
|
+
if (c)
|
|
36
|
+
r.forEach((o) => {
|
|
37
|
+
n.includes(o) || n.push(o);
|
|
38
|
+
});
|
|
39
|
+
else
|
|
40
|
+
for (let o = n.length - 1; o >= 0; o--)
|
|
41
|
+
r.includes(n[o]) && n.splice(o, 1);
|
|
42
|
+
}
|
|
43
|
+
n.length == 0 && n.push("");
|
|
44
|
+
}
|
|
45
|
+
}, H = (c) => {
|
|
46
|
+
let l = s.value;
|
|
47
|
+
if (!Array.isArray(l)) return;
|
|
48
|
+
let r = c[e.children || "children"].map((a) => a[e.value]).some((a) => l.includes(a)), o = l.includes(c[e.value]);
|
|
49
|
+
if (r)
|
|
50
|
+
o || l.push(c[e.value]);
|
|
51
|
+
else if (o) {
|
|
52
|
+
let a = l.findIndex((v) => v == c[e.value]);
|
|
53
|
+
l.splice(a, 1);
|
|
54
|
+
}
|
|
55
|
+
for (let a = l.length - 1; a >= 0; a--)
|
|
56
|
+
l[a] === "" && l.splice(a, 1);
|
|
57
|
+
l.length == 0 && l.push("");
|
|
58
|
+
};
|
|
59
|
+
return (c, l) => {
|
|
60
|
+
const n = p("ArrowDown"), r = p("el-icon"), o = p("el-checkbox"), a = p("el-checkbox-group"), v = p("el-popover"), B = p("el-checkbox-button");
|
|
61
|
+
return i(), h(a, E({
|
|
62
|
+
modelValue: s.value,
|
|
63
|
+
"onUpdate:modelValue": l[1] || (l[1] = (t) => s.value = t)
|
|
64
|
+
}, c.config), {
|
|
65
|
+
default: f(() => [
|
|
66
|
+
(i(!0), g(_, null, x(w.value, (t) => (i(), h(B, {
|
|
67
|
+
key: t.value,
|
|
68
|
+
label: t[e.value],
|
|
69
|
+
value: t[e.value],
|
|
70
|
+
onChange: (u) => A(!!u, t)
|
|
71
|
+
}, {
|
|
72
|
+
default: f(() => [
|
|
73
|
+
e.children && (!t[e.children] || t[e.children].length == 0) ? (i(), g(_, { key: 0 }, [
|
|
74
|
+
V(y(t[e.label]), 1)
|
|
75
|
+
], 64)) : e.children ? (i(), h(v, {
|
|
76
|
+
key: 1,
|
|
77
|
+
placement: "bottom",
|
|
78
|
+
trigger: "hover"
|
|
79
|
+
}, {
|
|
80
|
+
reference: f(() => [
|
|
81
|
+
U("div", null, [
|
|
82
|
+
V(y(t[e.label]) + " ", 1),
|
|
83
|
+
m(r, null, {
|
|
84
|
+
default: f(() => [
|
|
85
|
+
m(n)
|
|
86
|
+
]),
|
|
87
|
+
_: 1
|
|
88
|
+
})
|
|
89
|
+
])
|
|
90
|
+
]),
|
|
91
|
+
default: f(() => [
|
|
92
|
+
m(a, {
|
|
93
|
+
modelValue: s.value,
|
|
94
|
+
"onUpdate:modelValue": l[0] || (l[0] = (u) => s.value = u)
|
|
95
|
+
}, {
|
|
96
|
+
default: f(() => [
|
|
97
|
+
(i(!0), g(_, null, x(t[e.children], (u) => (i(), h(o, {
|
|
98
|
+
key: u[e.value],
|
|
99
|
+
label: u[e.label],
|
|
100
|
+
value: u[e.value],
|
|
101
|
+
style: { "margin-right": "0", width: "100%" },
|
|
102
|
+
onChange: (P) => H(t)
|
|
103
|
+
}, null, 8, ["label", "value", "onChange"]))), 128))
|
|
104
|
+
]),
|
|
105
|
+
_: 2
|
|
106
|
+
}, 1032, ["modelValue"])
|
|
107
|
+
]),
|
|
108
|
+
_: 2
|
|
109
|
+
}, 1024)) : I("", !0)
|
|
110
|
+
]),
|
|
111
|
+
_: 2
|
|
112
|
+
}, 1032, ["label", "value", "onChange"]))), 128))
|
|
113
|
+
]),
|
|
114
|
+
_: 1
|
|
115
|
+
}, 16, ["modelValue"]);
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
}), $ = /* @__PURE__ */ F(L, [["__scopeId", "data-v-d508680f"]]);
|
|
119
|
+
export {
|
|
120
|
+
$ as default
|
|
121
|
+
};
|
package/package.json
CHANGED
package/dist/index-Bt4fAGZ5.js
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { defineComponent as D, computed as b, resolveComponent as i, createBlock as f, openBlock as u, mergeProps as E, withCtx as s, createElementBlock as v, Fragment as h, renderList as k, createCommentVNode as U, createTextVNode as x, toDisplayString as V, createVNode as _, createElementVNode as F } from "vue";
|
|
2
|
-
import { _ as I } from "./index-BBplahb6.js";
|
|
3
|
-
const L = /* @__PURE__ */ D({
|
|
4
|
-
__name: "index",
|
|
5
|
-
props: {
|
|
6
|
-
value: {},
|
|
7
|
-
config: {},
|
|
8
|
-
col: {}
|
|
9
|
-
},
|
|
10
|
-
emits: ["update:value", "callback"],
|
|
11
|
-
setup(y, { emit: N }) {
|
|
12
|
-
const d = y, g = N, l = {
|
|
13
|
-
label: d.config.fieldNames?.label ?? "label",
|
|
14
|
-
value: d.config.fieldNames?.value ?? "value",
|
|
15
|
-
children: d.config.fieldNames?.children ?? "children"
|
|
16
|
-
}, p = b({
|
|
17
|
-
get: () => d.value,
|
|
18
|
-
set: (c) => {
|
|
19
|
-
g("update:value", c), g("callback", {
|
|
20
|
-
value: c,
|
|
21
|
-
config: d.config
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
}), w = b(() => d.config.options ?? []), C = (c, o) => {
|
|
25
|
-
let e = p.value;
|
|
26
|
-
if (Array.isArray(e)) {
|
|
27
|
-
if (c && o && (o.value === "" || o.value === void 0)) {
|
|
28
|
-
e.splice(0, e.length), e.push("");
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
for (let t = e.length - 1; t >= 0; t--)
|
|
32
|
-
e[t] === "" && e.splice(t, 1);
|
|
33
|
-
if (o.children && o.children.length) {
|
|
34
|
-
const t = o.children.map((n) => n.value);
|
|
35
|
-
if (c)
|
|
36
|
-
t.forEach((n) => {
|
|
37
|
-
e.includes(n) || e.push(n);
|
|
38
|
-
});
|
|
39
|
-
else {
|
|
40
|
-
for (let n = e.length - 1; n >= 0; n--)
|
|
41
|
-
t.includes(e[n]) && e.splice(n, 1);
|
|
42
|
-
(!e || e.length == 0) && e.push("");
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
return (c, o) => {
|
|
48
|
-
const e = i("ArrowDown"), t = i("el-icon"), n = i("el-checkbox"), m = i("el-checkbox-group"), A = i("el-popover"), B = i("el-checkbox-button");
|
|
49
|
-
return u(), f(m, E({
|
|
50
|
-
modelValue: p.value,
|
|
51
|
-
"onUpdate:modelValue": o[1] || (o[1] = (a) => p.value = a)
|
|
52
|
-
}, c.config), {
|
|
53
|
-
default: s(() => [
|
|
54
|
-
(u(!0), v(h, null, k(w.value, (a) => (u(), f(B, {
|
|
55
|
-
key: a.value,
|
|
56
|
-
label: a[l.value],
|
|
57
|
-
value: a[l.value],
|
|
58
|
-
onChange: (r) => C(!!r, a)
|
|
59
|
-
}, {
|
|
60
|
-
default: s(() => [
|
|
61
|
-
l.children && (!a[l.children] || a[l.children].length == 0) ? (u(), v(h, { key: 0 }, [
|
|
62
|
-
x(V(a[l.label]), 1)
|
|
63
|
-
], 64)) : l.children ? (u(), f(A, {
|
|
64
|
-
key: 1,
|
|
65
|
-
placement: "bottom",
|
|
66
|
-
trigger: "hover"
|
|
67
|
-
}, {
|
|
68
|
-
reference: s(() => [
|
|
69
|
-
F("div", null, [
|
|
70
|
-
x(V(a[l.label]) + " ", 1),
|
|
71
|
-
_(t, null, {
|
|
72
|
-
default: s(() => [
|
|
73
|
-
_(e)
|
|
74
|
-
]),
|
|
75
|
-
_: 1
|
|
76
|
-
})
|
|
77
|
-
])
|
|
78
|
-
]),
|
|
79
|
-
default: s(() => [
|
|
80
|
-
_(m, {
|
|
81
|
-
modelValue: p.value,
|
|
82
|
-
"onUpdate:modelValue": o[0] || (o[0] = (r) => p.value = r)
|
|
83
|
-
}, {
|
|
84
|
-
default: s(() => [
|
|
85
|
-
(u(!0), v(h, null, k(a[l.children], (r) => (u(), f(n, {
|
|
86
|
-
key: r[l.value],
|
|
87
|
-
label: r[l.label],
|
|
88
|
-
value: r[l.value],
|
|
89
|
-
style: { "margin-right": "0", width: "100%" }
|
|
90
|
-
}, null, 8, ["label", "value"]))), 128))
|
|
91
|
-
]),
|
|
92
|
-
_: 2
|
|
93
|
-
}, 1032, ["modelValue"])
|
|
94
|
-
]),
|
|
95
|
-
_: 2
|
|
96
|
-
}, 1024)) : U("", !0)
|
|
97
|
-
]),
|
|
98
|
-
_: 2
|
|
99
|
-
}, 1032, ["label", "value", "onChange"]))), 128))
|
|
100
|
-
]),
|
|
101
|
-
_: 1
|
|
102
|
-
}, 16, ["modelValue"]);
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
}), T = /* @__PURE__ */ I(L, [["__scopeId", "data-v-99eedc2c"]]);
|
|
106
|
-
export {
|
|
107
|
-
T as default
|
|
108
|
-
};
|