x-next 1.11.1 → 1.13.0
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/AI_USAGE/catalog.md +1 -1
- package/AI_USAGE/components/alert.md +1 -1
- package/AI_USAGE/components/bar-chart.md +1 -1
- package/AI_USAGE/components/button.md +1 -1
- package/AI_USAGE/components/checkbox.md +1 -1
- package/AI_USAGE/components/color-picker.md +1 -1
- package/AI_USAGE/components/config-provider.md +1 -1
- package/AI_USAGE/components/date-picker.md +1 -1
- package/AI_USAGE/components/dialog.md +1 -1
- package/AI_USAGE/components/dropdown.md +1 -1
- package/AI_USAGE/components/empty.md +1 -1
- package/AI_USAGE/components/input.md +1 -1
- package/AI_USAGE/components/line-chart.md +1 -1
- package/AI_USAGE/components/message-box.md +1 -1
- package/AI_USAGE/components/message.md +1 -1
- package/AI_USAGE/components/notification.md +1 -1
- package/AI_USAGE/components/pagination.md +7 -3
- package/AI_USAGE/components/pie-chart.md +1 -1
- package/AI_USAGE/components/popconfirm.md +1 -1
- package/AI_USAGE/components/popover.md +1 -1
- package/AI_USAGE/components/progress.md +1 -1
- package/AI_USAGE/components/radio.md +1 -1
- package/AI_USAGE/components/rate.md +1 -1
- package/AI_USAGE/components/select.md +1 -1
- package/AI_USAGE/components/slider.md +1 -1
- package/AI_USAGE/components/steps.md +1 -1
- package/AI_USAGE/components/switch.md +1 -1
- package/AI_USAGE/components/tabs.md +1 -1
- package/AI_USAGE/components/textarea.md +1 -1
- package/AI_USAGE/components/time-picker.md +1 -1
- package/AI_USAGE/components/upload.md +1 -1
- package/AI_USAGE/core.md +1 -1
- package/AI_USAGE/index.md +1 -1
- package/AI_USAGE/recipes/form-on-demand.md +1 -1
- package/AI_USAGE.md +8 -4
- package/CHANGELOG.md +40 -0
- package/dist/components/network/Network.vue.d.ts +8 -4
- package/dist/components/network/index.d.ts +13 -5
- package/dist/components/network/props.d.ts +5 -0
- package/dist/components/network/utils.d.ts +3 -3
- package/dist/components/pagination/page-item-ellipsis.vue.d.ts +4 -1
- package/dist/components/pagination/page-item-step.vue.d.ts +101 -130
- package/dist/components/pagination/page-item.vue.d.ts +1 -0
- package/dist/components/pagination/page-jumper.vue.d.ts +1 -1
- package/dist/components/pagination/page-options.vue.d.ts +6 -4
- package/dist/components/pagination/utils.d.ts +3 -0
- package/dist/components/table/Table.d.ts +11 -0
- package/dist/components/table/context.d.ts +5 -0
- package/dist/components/table/dom-listeners.d.ts +23 -0
- package/dist/components/table/hooks/use-column-resize.d.ts +2 -1
- package/dist/components/table/hooks/use-drag.d.ts +6 -3
- package/dist/components/table/hooks/use-keyboard-navigation.d.ts +27 -0
- package/dist/components/table/hooks/use-sorter.d.ts +3 -1
- package/dist/components/table/index.d.ts +15 -0
- package/dist/components/table/interface.d.ts +9 -2
- package/dist/components/table/locale.d.ts +8 -7
- package/dist/components/table/table-operation-td.d.ts +34 -0
- package/dist/components/table/table-td.d.ts +36 -2
- package/dist/components/table/table-th.d.ts +34 -0
- package/dist/components/table/table-tr.d.ts +34 -0
- package/dist/components/time-range-selector/index.d.ts +6 -6
- package/dist/components/trend-chart/components/TrendChart.d.ts +1 -1
- package/dist/components/trend-chart/index.d.ts +3 -3
- package/dist/components/upload/Upload.d.ts +1 -1
- package/dist/components/upload/index.d.ts +3 -3
- package/dist/es/_styles/palette-aliases.js +4 -4
- package/dist/es/components/button/Button.js +53 -42
- package/dist/es/components/network/Network.vue.js +17 -12
- package/dist/es/components/network/Network.vue2.js +78 -70
- package/dist/es/components/network/utils.js +112 -71
- package/dist/es/components/pagination/Pagination.js +132 -123
- package/dist/es/components/pagination/page-item-ellipsis.vue.js +10 -10
- package/dist/es/components/pagination/page-item-ellipsis.vue2.js +24 -19
- package/dist/es/components/pagination/page-item-step.vue.js +14 -11
- package/dist/es/components/pagination/page-item-step.vue2.js +20 -22
- package/dist/es/components/pagination/page-item.vue.js +10 -9
- package/dist/es/components/pagination/page-item.vue2.js +24 -19
- package/dist/es/components/pagination/page-jumper.vue2.js +23 -23
- package/dist/es/components/pagination/page-options.vue.js +15 -10
- package/dist/es/components/pagination/page-options.vue2.js +21 -17
- package/dist/es/components/pagination/utils.js +4 -2
- package/dist/es/components/table/Table.js +947 -713
- package/dist/es/components/table/dom-listeners.js +23 -0
- package/dist/es/components/table/hooks/use-column-resize.js +27 -18
- package/dist/es/components/table/hooks/use-column-sorter.js +22 -29
- package/dist/es/components/table/hooks/use-drag.js +23 -20
- package/dist/es/components/table/hooks/use-filter.js +43 -43
- package/dist/es/components/table/hooks/use-keyboard-navigation.js +69 -0
- package/dist/es/components/table/hooks/use-row-selection.js +33 -29
- package/dist/es/components/table/hooks/use-sorter.js +86 -38
- package/dist/es/components/table/hooks/use-span.js +28 -35
- package/dist/es/components/table/locale.js +27 -10
- package/dist/es/components/table/table-col-group.vue2.js +9 -9
- package/dist/es/components/table/table-operation-td.js +72 -51
- package/dist/es/components/table/table-operation-th.js +41 -34
- package/dist/es/components/table/table-td.js +100 -77
- package/dist/es/components/table/table-th.js +221 -188
- package/dist/es/components/table/table-tr.js +11 -8
- package/dist/es/components/table/utils.js +104 -94
- package/dist/es/components/virtual-list-v2/hooks/use-size.js +47 -41
- package/dist/es/components/virtual-list-v2/virtual-list-item.js +29 -16
- package/dist/es/locale/en-US.js +9 -1
- package/dist/es/locale/index.js +3 -3
- package/dist/es/locale/zh-CN.js +9 -1
- package/dist/es/style.css +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.umd.js +3 -3
- package/dist/locale/interface.d.ts +12 -0
- package/dist/style/base.css +1 -1
- package/dist/style/button.css +1 -1
- package/dist/style/form-select.css +1 -1
- package/dist/style/network.css +1 -1
- package/dist/style/pagination.css +1 -1
- package/dist/style/table.css +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,46 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
3
|
-
spanMethod:
|
|
4
|
-
data:
|
|
5
|
-
columns:
|
|
1
|
+
import { computed as $ } from "vue";
|
|
2
|
+
const E = ({
|
|
3
|
+
spanMethod: n,
|
|
4
|
+
data: a,
|
|
5
|
+
columns: h
|
|
6
6
|
}) => {
|
|
7
|
-
const
|
|
8
|
-
|
|
7
|
+
const p = (e, l, c) => {
|
|
8
|
+
e == null || e.forEach((f, i) => {
|
|
9
9
|
var g;
|
|
10
|
-
|
|
11
|
-
var
|
|
12
|
-
const { rowspan: u = 1, colspan: v = 1 } = ((
|
|
13
|
-
record:
|
|
14
|
-
column:
|
|
15
|
-
rowIndex:
|
|
10
|
+
f.hasSubtree && ((g = f.children) != null && g.length) && p(f.children || [], l, c), h.value.forEach((k, r) => {
|
|
11
|
+
var o;
|
|
12
|
+
const { rowspan: u = 1, colspan: v = 1 } = ((o = n.value) == null ? void 0 : o.call(n, {
|
|
13
|
+
record: f.raw,
|
|
14
|
+
column: k,
|
|
15
|
+
rowIndex: i,
|
|
16
16
|
columnIndex: r
|
|
17
|
-
})) ?? {}
|
|
18
|
-
(u
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
17
|
+
})) ?? {}, m = `${i}-${r}-${f.key}`;
|
|
18
|
+
if (u === 0 || v === 0)
|
|
19
|
+
c.add(m);
|
|
20
|
+
else if (u > 1 || v > 1) {
|
|
21
|
+
l[m] = [u, v];
|
|
22
|
+
for (let s = 0; s < Math.min(u, e.length - i); s++)
|
|
23
|
+
for (let t = 0; t < Math.min(v, h.value.length - r); t++)
|
|
24
|
+
(s || t) && c.add(`${i + s}-${r + t}-${e[i + s].key}`);
|
|
25
|
+
}
|
|
26
26
|
});
|
|
27
27
|
});
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const f = {};
|
|
32
|
-
return i.value = {}, s.value && c(k.value, f), f;
|
|
33
|
-
}), E = a(() => {
|
|
34
|
-
const f = [];
|
|
35
|
-
for (const l of Object.keys(i.value))
|
|
36
|
-
f.push(l);
|
|
37
|
-
return f;
|
|
28
|
+
}, S = $(() => {
|
|
29
|
+
const e = {}, l = /* @__PURE__ */ new Set();
|
|
30
|
+
return n.value && p(a.value, e, l), { span: e, removed: [...l] };
|
|
38
31
|
});
|
|
39
32
|
return {
|
|
40
|
-
tableSpan:
|
|
41
|
-
removedCells:
|
|
33
|
+
tableSpan: $(() => S.value.span),
|
|
34
|
+
removedCells: $(() => S.value.removed)
|
|
42
35
|
};
|
|
43
36
|
};
|
|
44
37
|
export {
|
|
45
|
-
|
|
38
|
+
E as useSpan
|
|
46
39
|
};
|
|
@@ -1,21 +1,38 @@
|
|
|
1
|
-
|
|
1
|
+
import { useLocale as r } from "../../locale/index.js";
|
|
2
|
+
const c = {
|
|
2
3
|
resetText: "重置",
|
|
3
4
|
okText: "确认",
|
|
4
5
|
currentColumnText: "当前列",
|
|
5
6
|
filterLabelText: "筛选{column}",
|
|
6
|
-
summaryText: "Summary"
|
|
7
|
-
|
|
7
|
+
summaryText: "Summary",
|
|
8
|
+
expandRowText: "展开行 {row}",
|
|
9
|
+
collapseRowText: "收起行 {row}",
|
|
10
|
+
selectRowText: "选择行 {row}",
|
|
11
|
+
selectAllText: "选择全部可选行",
|
|
12
|
+
resizeColumnText: "调整{column}列宽",
|
|
13
|
+
moveRowText: "移动行 {row},Alt 加上下方向键调整顺序"
|
|
14
|
+
}, s = {
|
|
8
15
|
resetText: "Reset",
|
|
9
16
|
okText: "OK",
|
|
10
17
|
currentColumnText: "Column",
|
|
11
18
|
filterLabelText: "Filter {column}",
|
|
12
|
-
summaryText: "Summary"
|
|
13
|
-
|
|
19
|
+
summaryText: "Summary",
|
|
20
|
+
expandRowText: "Expand row {row}",
|
|
21
|
+
collapseRowText: "Collapse row {row}",
|
|
22
|
+
selectRowText: "Select row {row}",
|
|
23
|
+
selectAllText: "Select all selectable rows",
|
|
24
|
+
resizeColumnText: "Resize {column} column",
|
|
25
|
+
moveRowText: "Move row {row}, Alt plus Up or Down to reorder"
|
|
26
|
+
}, x = (o, e = {}) => o.replace(
|
|
14
27
|
/\{(\w+)\}/g,
|
|
15
|
-
(
|
|
16
|
-
)
|
|
28
|
+
(t, l) => Object.prototype.hasOwnProperty.call(e, l) ? String(e[l]) : t
|
|
29
|
+
), n = () => {
|
|
30
|
+
const { locale: o } = r();
|
|
31
|
+
return (e, t) => x(o.value.table[e] ?? c[e] ?? e, t);
|
|
32
|
+
};
|
|
17
33
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
34
|
+
s as TABLE_LOCALE_EN_US,
|
|
35
|
+
c as TABLE_LOCALE_ZH_CN,
|
|
36
|
+
x as formatLocaleText,
|
|
37
|
+
n as useTableLocale
|
|
21
38
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as i } from "vue";
|
|
2
|
+
const p = i({
|
|
3
3
|
name: "ColGroup",
|
|
4
4
|
props: {
|
|
5
5
|
dataColumns: {
|
|
@@ -16,21 +16,21 @@ const i = n({
|
|
|
16
16
|
},
|
|
17
17
|
setup() {
|
|
18
18
|
return {
|
|
19
|
-
fixedWidth: (
|
|
20
|
-
if (
|
|
21
|
-
const
|
|
19
|
+
fixedWidth: (r, t) => {
|
|
20
|
+
if (r) {
|
|
21
|
+
const e = Math.max(r, t || 0);
|
|
22
22
|
return {
|
|
23
23
|
width: `${e}px`,
|
|
24
|
-
minWidth: `${
|
|
24
|
+
minWidth: `${e}px`,
|
|
25
25
|
maxWidth: `${e}px`
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
-
if (
|
|
29
|
-
return { minWidth: `${
|
|
28
|
+
if (t)
|
|
29
|
+
return { minWidth: `${t}px` };
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
34
|
export {
|
|
35
|
-
|
|
35
|
+
p as default
|
|
36
36
|
};
|
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { getOperationStyle as
|
|
3
|
-
import { Checkbox as
|
|
4
|
-
import { Radio as
|
|
5
|
-
import
|
|
6
|
-
import { tableInjectionKey as
|
|
7
|
-
import { getClassNameMixin as
|
|
8
|
-
|
|
1
|
+
import { defineComponent as v, inject as R, computed as d, createVNode as a, mergeProps as h } from "vue";
|
|
2
|
+
import { getOperationStyle as A, getOperationFixedCls as B, getLeafKeys as T, getSelectionStatus as j } from "./utils.js";
|
|
3
|
+
import { Checkbox as m } from "../form-checkbox/index.js";
|
|
4
|
+
import { Radio as w } from "../form-radio/index.js";
|
|
5
|
+
import K from "../../icons/_self/more-dot.js";
|
|
6
|
+
import { tableInjectionKey as L } from "./context.js";
|
|
7
|
+
import { getClassNameMixin as N } from "../../_utils/config.js";
|
|
8
|
+
import { useTableLocale as O } from "./locale.js";
|
|
9
|
+
import { tableDomListeners as E, getTableDomListeners as D } from "./dom-listeners.js";
|
|
10
|
+
const z = /* @__PURE__ */ v({
|
|
9
11
|
name: "OperationTd",
|
|
12
|
+
inheritAttrs: !1,
|
|
10
13
|
components: {
|
|
11
|
-
Checkbox:
|
|
12
|
-
Radio:
|
|
14
|
+
Checkbox: m,
|
|
15
|
+
Radio: w
|
|
13
16
|
},
|
|
14
17
|
props: {
|
|
18
|
+
...E,
|
|
15
19
|
operationColumn: {
|
|
16
20
|
type: Object,
|
|
17
21
|
required: !0
|
|
@@ -49,69 +53,86 @@ const P = /* @__PURE__ */ x({
|
|
|
49
53
|
},
|
|
50
54
|
emits: ["select"],
|
|
51
55
|
setup(e, {
|
|
52
|
-
|
|
53
|
-
slots:
|
|
56
|
+
attrs: g,
|
|
57
|
+
slots: c
|
|
54
58
|
}) {
|
|
55
|
-
const
|
|
56
|
-
[
|
|
57
|
-
[
|
|
58
|
-
[
|
|
59
|
+
const t = N("table"), n = R(L, {}), l = O(), x = d(() => A(e.operationColumn, e.operations)), k = d(() => [t.element("td"), t.element("operation"), {
|
|
60
|
+
[t.element("checkbox")]: e.operationColumn.name === "selection-checkbox",
|
|
61
|
+
[t.element("radio")]: e.operationColumn.name === "selection-radio",
|
|
62
|
+
[t.element("expand")]: e.operationColumn.name === "expand",
|
|
59
63
|
// 注意
|
|
60
|
-
[
|
|
61
|
-
}, ...
|
|
62
|
-
var
|
|
64
|
+
[t.modifier("drag-handle")]: e.operationColumn.name === "drag-handle"
|
|
65
|
+
}, ...B(t.block, e.operationColumn)]), s = d(() => T(e.record)), f = d(() => j(n.currentSelectedRowKeys ?? [], s.value)), S = () => {
|
|
66
|
+
var i, y, b, C;
|
|
63
67
|
if (e.summary)
|
|
64
68
|
return null;
|
|
65
69
|
if (e.operationColumn.render)
|
|
66
70
|
return e.operationColumn.render(e.record.raw);
|
|
67
71
|
if (e.operationColumn.name === "selection-checkbox") {
|
|
68
|
-
const
|
|
69
|
-
return !n.checkStrictly && !e.record.isLeaf ?
|
|
70
|
-
modelValue:
|
|
71
|
-
indeterminate:
|
|
72
|
-
disabled: !!e.record.disabled,
|
|
72
|
+
const u = e.record.key;
|
|
73
|
+
return !n.checkStrictly && !e.record.isLeaf && ((i = e.record.children) == null ? void 0 : i.length) !== 0 ? a(m, {
|
|
74
|
+
modelValue: f.value.checked,
|
|
75
|
+
indeterminate: f.value.indeterminate,
|
|
76
|
+
disabled: !!e.record.disabled || s.value.length === 0,
|
|
77
|
+
"aria-label": l("selectRowText", {
|
|
78
|
+
row: e.record.key
|
|
79
|
+
}),
|
|
73
80
|
uninjectGroupContext: !0,
|
|
74
|
-
onChange: (
|
|
75
|
-
var
|
|
76
|
-
return (
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
modelValue: ((m = e.selectedRowKeys) == null ? void 0 : m.includes(d)) ?? !1,
|
|
81
|
+
onChange: (r) => {
|
|
82
|
+
var o;
|
|
83
|
+
return (o = n.onSelectAllLeafs) == null ? void 0 : o.call(n, e.record, r);
|
|
84
|
+
}
|
|
85
|
+
}, null) : a(m, {
|
|
86
|
+
modelValue: ((y = e.selectedRowKeys) == null ? void 0 : y.includes(u)) ?? !1,
|
|
81
87
|
disabled: !!e.record.disabled,
|
|
88
|
+
"aria-label": l("selectRowText", {
|
|
89
|
+
row: e.record.key
|
|
90
|
+
}),
|
|
82
91
|
uninjectGroupContext: !0,
|
|
83
|
-
onChange: (
|
|
84
|
-
var
|
|
85
|
-
return (
|
|
86
|
-
}
|
|
87
|
-
onClick: (t) => t.stopPropagation()
|
|
92
|
+
onChange: (r) => {
|
|
93
|
+
var o;
|
|
94
|
+
return (o = n.onSelect) == null ? void 0 : o.call(n, r, e.record);
|
|
95
|
+
}
|
|
88
96
|
}, null);
|
|
89
97
|
}
|
|
90
98
|
if (e.operationColumn.name === "selection-radio") {
|
|
91
|
-
const
|
|
92
|
-
return
|
|
93
|
-
modelValue: ((
|
|
99
|
+
const u = e.record.key;
|
|
100
|
+
return a(w, {
|
|
101
|
+
modelValue: ((b = e.selectedRowKeys) == null ? void 0 : b.includes(u)) ?? !1,
|
|
94
102
|
disabled: !!e.record.disabled,
|
|
103
|
+
name: n.selectionName,
|
|
104
|
+
"aria-label": l("selectRowText", {
|
|
105
|
+
row: e.record.key
|
|
106
|
+
}),
|
|
95
107
|
uninjectGroupContext: !0,
|
|
96
|
-
onChange: (
|
|
97
|
-
var
|
|
98
|
-
return (
|
|
99
|
-
}
|
|
100
|
-
onClick: (t) => t.stopPropagation()
|
|
108
|
+
onChange: (r) => {
|
|
109
|
+
var o;
|
|
110
|
+
return (o = n.onSelect) == null ? void 0 : o.call(n, r, e.record);
|
|
111
|
+
}
|
|
101
112
|
}, null);
|
|
102
113
|
}
|
|
103
|
-
return e.operationColumn.name === "expand" ? e.hasExpand && e.renderExpandBtn ? e.renderExpandBtn(e.record) : null : e.operationColumn.name === "drag-handle" ? (
|
|
114
|
+
return e.operationColumn.name === "expand" ? e.hasExpand && e.renderExpandBtn ? e.renderExpandBtn(e.record) : null : e.operationColumn.name === "drag-handle" ? a("button", {
|
|
115
|
+
type: "button",
|
|
116
|
+
class: t.element("drag-button"),
|
|
117
|
+
"aria-label": l("moveRowText", {
|
|
118
|
+
row: e.record.key
|
|
119
|
+
}),
|
|
120
|
+
"aria-keyshortcuts": "Alt+ArrowUp Alt+ArrowDown"
|
|
121
|
+
}, [((C = c["drag-handle-icon"]) == null ? void 0 : C.call(c)) ?? a(K, null, null)]) : null;
|
|
104
122
|
};
|
|
105
|
-
return () =>
|
|
106
|
-
class:
|
|
107
|
-
style:
|
|
123
|
+
return () => a("td", h(h(g, D(e), {
|
|
124
|
+
class: k.value,
|
|
125
|
+
style: x.value
|
|
126
|
+
}), {
|
|
127
|
+
"data-x-table-column": e.operationColumn.name,
|
|
108
128
|
rowspan: e.rowSpan > 1 ? e.rowSpan : void 0,
|
|
109
129
|
colspan: e.colSpan > 1 ? e.colSpan : void 0
|
|
110
|
-
}, [
|
|
111
|
-
class:
|
|
130
|
+
}), [a("span", {
|
|
131
|
+
class: t.element("cell"),
|
|
132
|
+
onClick: e.operationColumn.name.startsWith("selection-") ? (i) => i.stopPropagation() : void 0
|
|
112
133
|
}, [S()])]);
|
|
113
134
|
}
|
|
114
135
|
});
|
|
115
136
|
export {
|
|
116
|
-
|
|
137
|
+
z as default
|
|
117
138
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { getOperationStyle as
|
|
3
|
-
import { Checkbox as
|
|
4
|
-
import { isFunction as
|
|
1
|
+
import { defineComponent as A, inject as S, computed as a, createVNode as i } from "vue";
|
|
2
|
+
import { getOperationStyle as g, getOperationFixedCls as x } from "./utils.js";
|
|
3
|
+
import { Checkbox as K } from "../form-checkbox/index.js";
|
|
4
|
+
import { isFunction as f } from "../../_utils/is.js";
|
|
5
5
|
import { tableInjectionKey as k } from "./context.js";
|
|
6
|
-
import { getClassNameMixin as
|
|
7
|
-
|
|
6
|
+
import { getClassNameMixin as E } from "../../_utils/config.js";
|
|
7
|
+
import { useTableLocale as N } from "./locale.js";
|
|
8
|
+
const V = /* @__PURE__ */ A({
|
|
8
9
|
name: "OperationTh",
|
|
9
10
|
props: {
|
|
10
11
|
operationColumn: {
|
|
@@ -26,39 +27,45 @@ const q = /* @__PURE__ */ h({
|
|
|
26
27
|
}
|
|
27
28
|
},
|
|
28
29
|
setup(e) {
|
|
29
|
-
const n =
|
|
30
|
-
var
|
|
31
|
-
let
|
|
32
|
-
const u = (((
|
|
33
|
-
var
|
|
34
|
-
return ((
|
|
35
|
-
})) ?? []).length,
|
|
36
|
-
return u > 0 && (u >=
|
|
37
|
-
checked:
|
|
38
|
-
indeterminate:
|
|
30
|
+
const n = E("table"), t = S(k, {}), b = N(), c = a(() => {
|
|
31
|
+
var m, s;
|
|
32
|
+
let l = !1, o = !1;
|
|
33
|
+
const u = (((m = t.currentSelectedRowKeys) == null ? void 0 : m.filter((w) => {
|
|
34
|
+
var d;
|
|
35
|
+
return ((d = t.currentAllEnabledRowKeys) == null ? void 0 : d.includes(w)) ?? !0;
|
|
36
|
+
})) ?? []).length, h = ((s = t.currentAllEnabledRowKeys) == null ? void 0 : s.length) ?? 0;
|
|
37
|
+
return u > 0 && (u >= h ? l = !0 : o = !0), {
|
|
38
|
+
checked: l,
|
|
39
|
+
indeterminate: o
|
|
39
40
|
};
|
|
40
|
-
}),
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
41
|
+
}), C = () => {
|
|
42
|
+
var l;
|
|
43
|
+
return e.selectAll ? i(K, {
|
|
44
|
+
modelValue: c.value.checked,
|
|
45
|
+
indeterminate: c.value.indeterminate,
|
|
46
|
+
disabled: !((l = t.currentAllEnabledRowKeys) != null && l.length),
|
|
47
|
+
"aria-label": b("selectAllText"),
|
|
48
|
+
uninjectGroupContext: !0,
|
|
49
|
+
onChange: (o) => {
|
|
50
|
+
var r;
|
|
51
|
+
(r = t.onSelectAll) == null || r.call(t, o);
|
|
52
|
+
}
|
|
53
|
+
}, {
|
|
54
|
+
default: f(e.operationColumn.title) ? e.operationColumn.title() : e.operationColumn.title
|
|
55
|
+
}) : e.operationColumn.title ? f(e.operationColumn.title) ? e.operationColumn.title() : e.operationColumn.title : null;
|
|
56
|
+
}, p = a(() => g(e.operationColumn, e.operations)), y = a(() => [n.element("th"), n.element("operation"), {
|
|
51
57
|
[n.element("checkbox")]: e.selectAll
|
|
52
|
-
}, ...
|
|
53
|
-
return () =>
|
|
54
|
-
|
|
55
|
-
|
|
58
|
+
}, ...x(n.block, e.operationColumn)]);
|
|
59
|
+
return () => i("th", {
|
|
60
|
+
scope: "col",
|
|
61
|
+
class: y.value,
|
|
62
|
+
style: p.value,
|
|
56
63
|
rowspan: e.rowSpan > 1 ? e.rowSpan : void 0
|
|
57
|
-
}, [
|
|
64
|
+
}, [i("span", {
|
|
58
65
|
class: n.element("cell")
|
|
59
|
-
}, [
|
|
66
|
+
}, [C()])]);
|
|
60
67
|
}
|
|
61
68
|
});
|
|
62
69
|
export {
|
|
63
|
-
|
|
70
|
+
V as default
|
|
64
71
|
};
|