adverich-kun-ui 0.1.288 → 0.1.289
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,5 +1,5 @@
|
|
|
1
|
-
import { computed as k, createElementBlock as s, openBlock as l, normalizeClass as
|
|
2
|
-
import { getValue as
|
|
1
|
+
import { computed as k, createElementBlock as s, openBlock as l, normalizeClass as o, createCommentVNode as r, renderSlot as u, createElementVNode as y, withModifiers as v, Fragment as w, renderList as S, createBlock as h, resolveDynamicComponent as B, unref as c, createTextVNode as $, toDisplayString as A } from "vue";
|
|
2
|
+
import { getValue as x, formatValue as E } from "../../../../utils/tableFormatters.js";
|
|
3
3
|
const T = { key: 0 }, V = { key: 1 }, N = ["checked"], j = "hover:bg-slate-300 dark:hover:bg-slate-600 border-t border-slate-300 dark:border-slate-700", D = "bg-slate-100 dark:bg-slate-900", F = "px-3 py-2 whitespace-nowrap text-sm text-black dark:text-white", z = {
|
|
4
4
|
__name: "KunTableRow",
|
|
5
5
|
props: {
|
|
@@ -30,24 +30,24 @@ const T = { key: 0 }, V = { key: 1 }, N = ["checked"], j = "hover:bg-slate-300 d
|
|
|
30
30
|
n.stripedClass,
|
|
31
31
|
n.isSelected ? n.selectedClass : ""
|
|
32
32
|
]);
|
|
33
|
-
function
|
|
33
|
+
function d(a = null, i = null) {
|
|
34
34
|
return typeof n.tdClass == "function" ? n.tdClass({
|
|
35
35
|
item: n.item,
|
|
36
|
-
header:
|
|
36
|
+
header: a,
|
|
37
37
|
value: i,
|
|
38
38
|
index: n.index
|
|
39
39
|
}) : n.tdClass;
|
|
40
40
|
}
|
|
41
41
|
const f = k(() => ["text-center", n.actionsAlign]);
|
|
42
|
-
return (
|
|
43
|
-
class:
|
|
42
|
+
return (a, i) => (l(), s("tr", {
|
|
43
|
+
class: o(b.value),
|
|
44
44
|
onClick: i[2] || (i[2] = (t) => m("row-click", { item: e.item, index: e.index, event: t }))
|
|
45
45
|
}, [
|
|
46
46
|
e.showExpand ? (l(), s("td", {
|
|
47
47
|
key: 0,
|
|
48
|
-
class:
|
|
48
|
+
class: o(d(e.item, "expand"))
|
|
49
49
|
}, [
|
|
50
|
-
|
|
50
|
+
a.$slots.expandIcon ? u(a.$slots, "expand-icon", {
|
|
51
51
|
key: 0,
|
|
52
52
|
item: e.item,
|
|
53
53
|
index: e.index
|
|
@@ -60,7 +60,7 @@ const T = { key: 0 }, V = { key: 1 }, N = ["checked"], j = "hover:bg-slate-300 d
|
|
|
60
60
|
], 2)) : r("", !0),
|
|
61
61
|
e.showSelect ? (l(), s("td", {
|
|
62
62
|
key: 1,
|
|
63
|
-
class:
|
|
63
|
+
class: o([d(e.item, "checkbox"), "h-full w-10 flex flex-col items-center justify-center"])
|
|
64
64
|
}, [
|
|
65
65
|
y("input", {
|
|
66
66
|
type: "checkbox",
|
|
@@ -73,34 +73,34 @@ const T = { key: 0 }, V = { key: 1 }, N = ["checked"], j = "hover:bg-slate-300 d
|
|
|
73
73
|
var g;
|
|
74
74
|
return l(), s("td", {
|
|
75
75
|
key: t.value,
|
|
76
|
-
class:
|
|
76
|
+
class: o([
|
|
77
77
|
F,
|
|
78
|
-
|
|
78
|
+
d(e.item, t),
|
|
79
79
|
t.align === "right" ? "text-right" : t.align === "left" ? "text-left" : "text-center"
|
|
80
80
|
])
|
|
81
81
|
}, [
|
|
82
82
|
(g = e.customSlots) != null && g[`item.${t.value}`] ? (l(), h(B(e.customSlots[`item.${t.value}`]), {
|
|
83
83
|
key: 0,
|
|
84
84
|
item: e.item,
|
|
85
|
-
value:
|
|
85
|
+
value: c(x)(t, e.item),
|
|
86
86
|
index: e.index,
|
|
87
87
|
header: t
|
|
88
|
-
}, null, 8, ["item", "value", "index", "header"])) : u(
|
|
88
|
+
}, null, 8, ["item", "value", "index", "header"])) : u(a.$slots, `item.${t.value}`, {
|
|
89
89
|
key: 1,
|
|
90
90
|
item: e.item,
|
|
91
|
-
value:
|
|
91
|
+
value: c(x)(t, e.item),
|
|
92
92
|
index: e.index,
|
|
93
93
|
header: t
|
|
94
94
|
}, () => [
|
|
95
|
-
$(A(
|
|
95
|
+
$(A(c(E)(t, c(x)(t, e.item))), 1)
|
|
96
96
|
])
|
|
97
97
|
], 2);
|
|
98
98
|
}), 128)),
|
|
99
99
|
e.hasActions ? (l(), s("td", {
|
|
100
100
|
key: 2,
|
|
101
|
-
class:
|
|
101
|
+
class: o([d(e.item, "actions"), f.value])
|
|
102
102
|
}, [
|
|
103
|
-
u(
|
|
103
|
+
u(a.$slots, "item.actions", {
|
|
104
104
|
item: e.item,
|
|
105
105
|
index: e.index,
|
|
106
106
|
loading: e.loading
|