adverich-kun-ui 0.1.235 → 0.1.237
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createElementBlock as s, openBlock as n, normalizeClass as a, createCommentVNode as c, renderSlot as m, createElementVNode as b, withModifiers as w, Fragment as h, renderList as y, unref as g, createTextVNode as S, toDisplayString as f } from "vue";
|
|
2
2
|
import { getValue as x, formatValue as v } from "../../../../utils/tableFormatters.js";
|
|
3
|
-
const B = { key: 0 }, $ = { key: 1 }, A = ["checked"], E = "hover:bg-slate-300 dark:hover:bg-slate-600 border-t border-slate-300 dark:border-slate-700", T = "", V = "px-3 py-2 whitespace-nowrap text-sm text-black dark:text-white", R = {
|
|
3
|
+
const B = { key: 0 }, $ = { key: 1 }, A = ["checked"], E = "hover:bg-slate-300 dark:hover:bg-slate-600 border-t border-slate-300 dark:border-slate-700", T = "bg-slate-100 dark:bg-slate-900", V = "px-3 py-2 whitespace-nowrap text-sm text-black dark:text-white", R = {
|
|
4
4
|
__name: "KunTableRow",
|
|
5
5
|
props: {
|
|
6
6
|
item: Object,
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
function
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
},
|
|
7
|
-
|
|
8
|
-
},
|
|
9
|
-
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
},
|
|
13
|
-
var
|
|
14
|
-
return ((
|
|
15
|
-
}),
|
|
16
|
-
var
|
|
17
|
-
return ((
|
|
1
|
+
import { computed as r, watch as S } from "vue";
|
|
2
|
+
function x(g, i, n, u) {
|
|
3
|
+
const a = (l) => u.value.includes(l), h = (l) => {
|
|
4
|
+
const o = u.value.indexOf(l);
|
|
5
|
+
o === -1 ? u.value.push(l) : u.value.splice(o, 1);
|
|
6
|
+
}, v = () => {
|
|
7
|
+
u.value = [...n.value];
|
|
8
|
+
}, e = () => {
|
|
9
|
+
u.value = [];
|
|
10
|
+
}, f = () => {
|
|
11
|
+
c.value ? e() : v();
|
|
12
|
+
}, c = r(() => {
|
|
13
|
+
var l;
|
|
14
|
+
return ((l = n.value) == null ? void 0 : l.length) > 0 && u.value.length === n.value.length;
|
|
15
|
+
}), t = r(() => {
|
|
16
|
+
var l;
|
|
17
|
+
return ((l = n.value) == null ? void 0 : l.length) > 0 && u.value.length > 0 && u.value.length < n.value.length;
|
|
18
18
|
});
|
|
19
|
-
return
|
|
20
|
-
|
|
19
|
+
return S(() => n, (l, o) => {
|
|
20
|
+
l !== o && e();
|
|
21
21
|
}, { deep: !0 }), {
|
|
22
|
-
selectedItems:
|
|
23
|
-
isSelected:
|
|
24
|
-
toggleSelect:
|
|
25
|
-
selectAll:
|
|
26
|
-
clearSelection:
|
|
27
|
-
toggleSelectAll:
|
|
28
|
-
allSelected:
|
|
29
|
-
someSelected:
|
|
22
|
+
selectedItems: u,
|
|
23
|
+
isSelected: a,
|
|
24
|
+
toggleSelect: h,
|
|
25
|
+
selectAll: v,
|
|
26
|
+
clearSelection: e,
|
|
27
|
+
toggleSelectAll: f,
|
|
28
|
+
allSelected: c,
|
|
29
|
+
someSelected: t
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
export {
|
|
33
|
-
|
|
33
|
+
x as default
|
|
34
34
|
};
|