@oneflowui/ui 0.7.0 → 0.8.1
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/components/database/DatabaseView.vue.js +2 -2
- package/dist/components/database/DatabaseView.vue2.js +504 -419
- package/dist/components/overlay/Drawer.vue.d.ts +8 -0
- package/dist/components/overlay/Drawer.vue.js +2 -2
- package/dist/components/overlay/Drawer.vue2.js +71 -46
- package/dist/components/overlay/SidePanel.vue.d.ts +8 -0
- package/dist/components/overlay/SidePanel.vue.js +1 -1
- package/dist/components/overlay/SidePanel.vue2.js +95 -64
- package/dist/components/table/DataTable.vue.d.ts +8 -2
- package/dist/components/table/DataTable.vue.js +1 -1
- package/dist/components/table/DataTable.vue2.js +513 -506
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -6,6 +6,9 @@ type __VLS_Props = {
|
|
|
6
6
|
maskClosable?: boolean;
|
|
7
7
|
zIndex?: number;
|
|
8
8
|
fullscreen?: boolean;
|
|
9
|
+
resizable?: boolean;
|
|
10
|
+
minWidth?: number;
|
|
11
|
+
maxWidth?: number;
|
|
9
12
|
};
|
|
10
13
|
declare function __VLS_template(): {
|
|
11
14
|
attrs: Partial<{}>;
|
|
@@ -21,15 +24,20 @@ declare function __VLS_template(): {
|
|
|
21
24
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
22
25
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
23
26
|
"update:modelValue": (value: boolean) => any;
|
|
27
|
+
"update:width": (value: number) => any;
|
|
24
28
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
25
29
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
30
|
+
"onUpdate:width"?: ((value: number) => any) | undefined;
|
|
26
31
|
}>, {
|
|
27
32
|
title: string;
|
|
28
33
|
width: number;
|
|
29
34
|
fullscreen: boolean;
|
|
35
|
+
maxWidth: number;
|
|
36
|
+
minWidth: number;
|
|
30
37
|
zIndex: number;
|
|
31
38
|
maskClosable: boolean;
|
|
32
39
|
showClose: boolean;
|
|
40
|
+
resizable: boolean;
|
|
33
41
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
34
42
|
drawerRef: HTMLElement;
|
|
35
43
|
}, any>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Drawer.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-c40443d8"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as V, useSlots as _, computed as W, onMounted as L, watch as S, onBeforeUnmount as M, openBlock as n, createBlock as T, Teleport as R, createVNode as c, Transition as D, withCtx as I, createElementBlock as a, normalizeStyle as m, createCommentVNode as l, createElementVNode as r, withModifiers as N, normalizeClass as P, unref as w, renderSlot as y, toDisplayString as $ } from "vue";
|
|
2
2
|
import { X as g } from "lucide-vue-next";
|
|
3
|
-
import { useFocusTrap as
|
|
4
|
-
const
|
|
3
|
+
import { useFocusTrap as U } from "../../composables/useFocusTrap.js";
|
|
4
|
+
const X = ["aria-label"], F = { class: "of-drawer__inner" }, K = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "of-drawer__header"
|
|
7
|
-
},
|
|
7
|
+
}, j = { class: "of-drawer__title" }, q = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "of-drawer__title-text"
|
|
10
|
-
},
|
|
10
|
+
}, A = { class: "of-drawer__body" }, O = /* @__PURE__ */ V({
|
|
11
11
|
__name: "Drawer",
|
|
12
12
|
props: {
|
|
13
13
|
modelValue: { type: Boolean },
|
|
@@ -16,81 +16,106 @@ const L = ["aria-label"], M = { class: "of-drawer__inner" }, F = {
|
|
|
16
16
|
showClose: { type: Boolean, default: !0 },
|
|
17
17
|
maskClosable: { type: Boolean, default: !0 },
|
|
18
18
|
zIndex: { default: 1e3 },
|
|
19
|
-
fullscreen: { type: Boolean, default: !1 }
|
|
19
|
+
fullscreen: { type: Boolean, default: !1 },
|
|
20
|
+
resizable: { type: Boolean, default: !1 },
|
|
21
|
+
minWidth: { default: 360 },
|
|
22
|
+
maxWidth: { default: 1320 }
|
|
20
23
|
},
|
|
21
|
-
emits: ["update:modelValue"],
|
|
22
|
-
setup(e, { emit:
|
|
23
|
-
const
|
|
24
|
-
"--of-drawer-width": `${
|
|
24
|
+
emits: ["update:modelValue", "update:width"],
|
|
25
|
+
setup(e, { emit: h }) {
|
|
26
|
+
const o = e, s = h, v = _(), b = W(() => ({
|
|
27
|
+
"--of-drawer-width": `${o.width}px`
|
|
25
28
|
})), {
|
|
26
|
-
containerRef:
|
|
27
|
-
activate:
|
|
29
|
+
containerRef: p,
|
|
30
|
+
activate: k,
|
|
28
31
|
deactivate: C
|
|
29
|
-
} =
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
+
} = U();
|
|
33
|
+
function i() {
|
|
34
|
+
s("update:modelValue", !1);
|
|
32
35
|
}
|
|
33
|
-
function
|
|
34
|
-
|
|
36
|
+
function z(t) {
|
|
37
|
+
return Math.max(o.minWidth, Math.min(o.maxWidth, t));
|
|
35
38
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
39
|
+
function u(t) {
|
|
40
|
+
t.key === "Escape" && o.modelValue && i();
|
|
41
|
+
}
|
|
42
|
+
L(() => {
|
|
43
|
+
typeof document > "u" || document.addEventListener("keydown", u);
|
|
44
|
+
}), S(
|
|
45
|
+
() => o.modelValue,
|
|
40
46
|
(t) => {
|
|
41
|
-
typeof document > "u" || (document.body.style.overflow = t ? "hidden" : "", t ?
|
|
47
|
+
typeof document > "u" || (document.body.style.overflow = t ? "hidden" : "", t ? k() : C());
|
|
42
48
|
},
|
|
43
49
|
{ immediate: !0 }
|
|
44
|
-
),
|
|
45
|
-
typeof document > "u" || (document.removeEventListener("keydown",
|
|
46
|
-
})
|
|
47
|
-
|
|
50
|
+
), M(() => {
|
|
51
|
+
typeof document > "u" || (document.removeEventListener("keydown", u), document.body.style.overflow = "");
|
|
52
|
+
});
|
|
53
|
+
function x(t) {
|
|
54
|
+
if (!o.resizable || o.fullscreen || typeof window > "u") return;
|
|
55
|
+
t.preventDefault();
|
|
56
|
+
const d = (B) => {
|
|
57
|
+
const E = z(window.innerWidth - B.clientX);
|
|
58
|
+
s("update:width", E);
|
|
59
|
+
}, f = () => {
|
|
60
|
+
window.removeEventListener("pointermove", d), window.removeEventListener("pointerup", f);
|
|
61
|
+
};
|
|
62
|
+
window.addEventListener("pointermove", d), window.addEventListener("pointerup", f, { once: !0 });
|
|
63
|
+
}
|
|
64
|
+
return (t, d) => (n(), T(R, { to: "body" }, [
|
|
65
|
+
c(D, { name: "of-drawer" }, {
|
|
48
66
|
default: I(() => [
|
|
49
|
-
e.modelValue ? (
|
|
67
|
+
e.modelValue ? (n(), a("div", {
|
|
50
68
|
key: 0,
|
|
51
69
|
class: "of-drawer-overlay",
|
|
52
|
-
style:
|
|
70
|
+
style: m({ zIndex: e.zIndex })
|
|
53
71
|
}, [
|
|
54
|
-
e.maskClosable ? (
|
|
72
|
+
e.maskClosable ? (n(), a("button", {
|
|
55
73
|
key: 0,
|
|
56
74
|
type: "button",
|
|
57
75
|
class: "of-drawer-overlay__hitarea",
|
|
58
76
|
"aria-label": "关闭抽屉",
|
|
59
|
-
onClick:
|
|
77
|
+
onClick: i
|
|
60
78
|
})) : l("", !0),
|
|
61
79
|
r("aside", {
|
|
62
80
|
ref_key: "drawerRef",
|
|
63
|
-
ref:
|
|
64
|
-
class:
|
|
81
|
+
ref: p,
|
|
82
|
+
class: P(["of-drawer", { "of-drawer--fullscreen": e.fullscreen }]),
|
|
65
83
|
role: "dialog",
|
|
66
84
|
"aria-modal": "true",
|
|
67
85
|
"aria-label": e.title,
|
|
68
|
-
style:
|
|
69
|
-
onClick:
|
|
86
|
+
style: m(b.value),
|
|
87
|
+
onClick: d[0] || (d[0] = N(() => {
|
|
70
88
|
}, ["stop"]))
|
|
71
89
|
}, [
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
90
|
+
e.resizable && !e.fullscreen ? (n(), a("button", {
|
|
91
|
+
key: 0,
|
|
92
|
+
type: "button",
|
|
93
|
+
class: "of-drawer__resize-handle",
|
|
94
|
+
"aria-label": "调整抽屉宽度",
|
|
95
|
+
onPointerdown: x
|
|
96
|
+
}, null, 32)) : l("", !0),
|
|
97
|
+
r("div", F, [
|
|
98
|
+
w(v).title || e.title || e.showClose ? (n(), a("div", K, [
|
|
99
|
+
r("div", j, [
|
|
100
|
+
y(t.$slots, "title", {}, () => [
|
|
101
|
+
e.title ? (n(), a("h3", q, $(e.title), 1)) : l("", !0)
|
|
77
102
|
], !0)
|
|
78
103
|
]),
|
|
79
|
-
e.showClose ? (
|
|
104
|
+
e.showClose ? (n(), a("button", {
|
|
80
105
|
key: 0,
|
|
81
106
|
class: "of-drawer__close",
|
|
82
107
|
type: "button",
|
|
83
108
|
"aria-label": "关闭",
|
|
84
|
-
onClick:
|
|
109
|
+
onClick: i
|
|
85
110
|
}, [
|
|
86
|
-
|
|
111
|
+
c(w(g), { size: 18 })
|
|
87
112
|
])) : l("", !0)
|
|
88
113
|
])) : l("", !0),
|
|
89
|
-
r("div",
|
|
90
|
-
|
|
114
|
+
r("div", A, [
|
|
115
|
+
y(t.$slots, "default", {}, void 0, !0)
|
|
91
116
|
])
|
|
92
117
|
])
|
|
93
|
-
], 14,
|
|
118
|
+
], 14, X)
|
|
94
119
|
], 4)) : l("", !0)
|
|
95
120
|
]),
|
|
96
121
|
_: 3
|
|
@@ -99,5 +124,5 @@ const L = ["aria-label"], M = { class: "of-drawer__inner" }, F = {
|
|
|
99
124
|
}
|
|
100
125
|
});
|
|
101
126
|
export {
|
|
102
|
-
|
|
127
|
+
O as default
|
|
103
128
|
};
|
|
@@ -5,6 +5,9 @@ export interface SidePanelProps {
|
|
|
5
5
|
title?: string;
|
|
6
6
|
showClose?: boolean;
|
|
7
7
|
mode?: "lazy" | "persistent";
|
|
8
|
+
resizable?: boolean;
|
|
9
|
+
minWidth?: number;
|
|
10
|
+
maxWidth?: number;
|
|
8
11
|
}
|
|
9
12
|
declare function __VLS_template(): {
|
|
10
13
|
attrs: Partial<{}>;
|
|
@@ -23,13 +26,18 @@ declare function __VLS_template(): {
|
|
|
23
26
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
24
27
|
declare const __VLS_component: import('vue').DefineComponent<SidePanelProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
25
28
|
"update:modelValue": (value: boolean) => any;
|
|
29
|
+
"update:width": (value: number) => any;
|
|
26
30
|
}, string, import('vue').PublicProps, Readonly<SidePanelProps> & Readonly<{
|
|
27
31
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
32
|
+
"onUpdate:width"?: ((value: number) => any) | undefined;
|
|
28
33
|
}>, {
|
|
29
34
|
title: string;
|
|
30
35
|
width: number;
|
|
31
36
|
mode: "lazy" | "persistent";
|
|
37
|
+
maxWidth: number;
|
|
38
|
+
minWidth: number;
|
|
32
39
|
showClose: boolean;
|
|
40
|
+
resizable: boolean;
|
|
33
41
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
34
42
|
sidePanelRef: HTMLElement;
|
|
35
43
|
}, any>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./SidePanel.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-33d4366a"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,122 +1,153 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { X as
|
|
3
|
-
import { useFocusTrap as
|
|
4
|
-
const
|
|
5
|
-
key:
|
|
1
|
+
import { defineComponent as B, computed as S, onMounted as W, watch as $, onBeforeUnmount as L, openBlock as o, createBlock as R, Teleport as g, createElementBlock as l, Fragment as M, normalizeStyle as y, createCommentVNode as n, renderSlot as i, toDisplayString as v, createVNode as w, unref as p, createElementVNode as b, withDirectives as T, vShow as D } from "vue";
|
|
2
|
+
import { X as k } from "lucide-vue-next";
|
|
3
|
+
import { useFocusTrap as N } from "../../composables/useFocusTrap.js";
|
|
4
|
+
const F = ["aria-label"], U = {
|
|
5
|
+
key: 1,
|
|
6
6
|
class: "of-side-panel__header"
|
|
7
|
-
},
|
|
7
|
+
}, X = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "of-side-panel__title"
|
|
10
|
-
},
|
|
10
|
+
}, x = {
|
|
11
11
|
key: 1,
|
|
12
12
|
class: "of-side-panel__title-placeholder"
|
|
13
|
-
},
|
|
14
|
-
key:
|
|
13
|
+
}, K = { class: "of-side-panel__body" }, j = ["aria-label"], q = {
|
|
14
|
+
key: 1,
|
|
15
15
|
class: "of-side-panel__header"
|
|
16
|
-
},
|
|
16
|
+
}, A = {
|
|
17
17
|
key: 0,
|
|
18
18
|
class: "of-side-panel__title"
|
|
19
|
-
},
|
|
19
|
+
}, G = {
|
|
20
20
|
key: 1,
|
|
21
21
|
class: "of-side-panel__title-placeholder"
|
|
22
|
-
},
|
|
22
|
+
}, H = { class: "of-side-panel__body" }, Q = /* @__PURE__ */ B({
|
|
23
23
|
__name: "SidePanel",
|
|
24
24
|
props: {
|
|
25
25
|
modelValue: { type: Boolean },
|
|
26
26
|
width: { default: 500 },
|
|
27
27
|
title: { default: void 0 },
|
|
28
28
|
showClose: { type: Boolean, default: !0 },
|
|
29
|
-
mode: { default: "persistent" }
|
|
29
|
+
mode: { default: "persistent" },
|
|
30
|
+
resizable: { type: Boolean, default: !1 },
|
|
31
|
+
minWidth: { default: 360 },
|
|
32
|
+
maxWidth: { default: 1320 }
|
|
30
33
|
},
|
|
31
|
-
emits: ["update:modelValue"],
|
|
32
|
-
setup(e, { emit:
|
|
33
|
-
const
|
|
34
|
-
"--of-side-panel-width": `${
|
|
34
|
+
emits: ["update:modelValue", "update:width"],
|
|
35
|
+
setup(e, { emit: _ }) {
|
|
36
|
+
const a = e, r = _, u = S(() => ({
|
|
37
|
+
"--of-side-panel-width": `${a.width}px`
|
|
35
38
|
})), {
|
|
36
|
-
containerRef:
|
|
37
|
-
activate:
|
|
38
|
-
deactivate:
|
|
39
|
-
} =
|
|
40
|
-
function
|
|
41
|
-
|
|
39
|
+
containerRef: c,
|
|
40
|
+
activate: z,
|
|
41
|
+
deactivate: V
|
|
42
|
+
} = N();
|
|
43
|
+
function f(t) {
|
|
44
|
+
t.key === "Escape" && a.modelValue && d();
|
|
42
45
|
}
|
|
43
|
-
|
|
44
|
-
typeof document > "u" || document.addEventListener("keydown",
|
|
46
|
+
W(() => {
|
|
47
|
+
typeof document > "u" || document.addEventListener("keydown", f);
|
|
45
48
|
}), $(
|
|
46
|
-
() =>
|
|
47
|
-
(
|
|
48
|
-
typeof document > "u" || (document.body.style.overflow =
|
|
49
|
+
() => a.modelValue,
|
|
50
|
+
(t) => {
|
|
51
|
+
typeof document > "u" || (document.body.style.overflow = t ? "hidden" : "", t ? z() : V());
|
|
49
52
|
},
|
|
50
53
|
{ immediate: !0 }
|
|
51
|
-
),
|
|
52
|
-
typeof document > "u" || (document.removeEventListener("keydown",
|
|
54
|
+
), L(() => {
|
|
55
|
+
typeof document > "u" || (document.removeEventListener("keydown", f), document.body.style.overflow = "");
|
|
53
56
|
});
|
|
54
|
-
function
|
|
55
|
-
|
|
57
|
+
function d() {
|
|
58
|
+
r("update:modelValue", !1);
|
|
56
59
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
+
function C(t) {
|
|
61
|
+
return Math.max(a.minWidth, Math.min(a.maxWidth, t));
|
|
62
|
+
}
|
|
63
|
+
function m(t) {
|
|
64
|
+
if (!a.resizable || typeof window > "u") return;
|
|
65
|
+
t.preventDefault();
|
|
66
|
+
const s = (E) => {
|
|
67
|
+
const P = C(window.innerWidth - E.clientX);
|
|
68
|
+
r("update:width", P);
|
|
69
|
+
}, h = () => {
|
|
70
|
+
window.removeEventListener("pointermove", s), window.removeEventListener("pointerup", h);
|
|
71
|
+
};
|
|
72
|
+
window.addEventListener("pointermove", s), window.addEventListener("pointerup", h, { once: !0 });
|
|
73
|
+
}
|
|
74
|
+
return (t, s) => (o(), R(g, { to: "body" }, [
|
|
75
|
+
e.mode === "lazy" ? (o(), l(M, { key: 0 }, [
|
|
76
|
+
e.modelValue ? (o(), l("aside", {
|
|
60
77
|
key: 0,
|
|
61
78
|
ref_key: "sidePanelRef",
|
|
62
|
-
ref:
|
|
79
|
+
ref: c,
|
|
63
80
|
class: "of-side-panel",
|
|
64
|
-
style: u
|
|
81
|
+
style: y(u.value),
|
|
65
82
|
role: "dialog",
|
|
66
83
|
"aria-modal": "true",
|
|
67
84
|
"aria-label": e.title
|
|
68
85
|
}, [
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
86
|
+
e.resizable ? (o(), l("button", {
|
|
87
|
+
key: 0,
|
|
88
|
+
type: "button",
|
|
89
|
+
class: "of-side-panel__resize-handle",
|
|
90
|
+
"aria-label": "调整面板宽度",
|
|
91
|
+
onPointerdown: m
|
|
92
|
+
}, null, 32)) : n("", !0),
|
|
93
|
+
t.$slots.header || e.title || e.showClose ? (o(), l("div", U, [
|
|
94
|
+
i(t.$slots, "header", {}, () => [
|
|
95
|
+
e.title ? (o(), l("h3", X, v(e.title), 1)) : (o(), l("div", x))
|
|
72
96
|
], !0),
|
|
73
|
-
e.showClose ? (
|
|
97
|
+
e.showClose ? (o(), l("button", {
|
|
74
98
|
key: 0,
|
|
75
99
|
class: "of-side-panel__close",
|
|
76
100
|
type: "button",
|
|
77
101
|
"aria-label": "关闭",
|
|
78
|
-
onClick:
|
|
102
|
+
onClick: d
|
|
79
103
|
}, [
|
|
80
|
-
|
|
81
|
-
])) :
|
|
82
|
-
])) :
|
|
83
|
-
|
|
84
|
-
|
|
104
|
+
w(p(k), { size: 18 })
|
|
105
|
+
])) : n("", !0)
|
|
106
|
+
])) : n("", !0),
|
|
107
|
+
b("div", K, [
|
|
108
|
+
i(t.$slots, "default", {}, void 0, !0)
|
|
85
109
|
])
|
|
86
|
-
], 12,
|
|
87
|
-
], 64)) :
|
|
110
|
+
], 12, F)) : n("", !0)
|
|
111
|
+
], 64)) : T((o(), l("aside", {
|
|
88
112
|
key: 1,
|
|
89
113
|
ref_key: "sidePanelRef",
|
|
90
|
-
ref:
|
|
114
|
+
ref: c,
|
|
91
115
|
class: "of-side-panel",
|
|
92
|
-
style: u
|
|
116
|
+
style: y(u.value),
|
|
93
117
|
role: "dialog",
|
|
94
118
|
"aria-modal": "true",
|
|
95
119
|
"aria-label": e.title
|
|
96
120
|
}, [
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
121
|
+
e.resizable ? (o(), l("button", {
|
|
122
|
+
key: 0,
|
|
123
|
+
type: "button",
|
|
124
|
+
class: "of-side-panel__resize-handle",
|
|
125
|
+
"aria-label": "调整面板宽度",
|
|
126
|
+
onPointerdown: m
|
|
127
|
+
}, null, 32)) : n("", !0),
|
|
128
|
+
t.$slots.header || e.title || e.showClose ? (o(), l("div", q, [
|
|
129
|
+
i(t.$slots, "header", {}, () => [
|
|
130
|
+
e.title ? (o(), l("h3", A, v(e.title), 1)) : (o(), l("div", G))
|
|
100
131
|
], !0),
|
|
101
|
-
e.showClose ? (
|
|
132
|
+
e.showClose ? (o(), l("button", {
|
|
102
133
|
key: 0,
|
|
103
134
|
class: "of-side-panel__close",
|
|
104
135
|
type: "button",
|
|
105
136
|
"aria-label": "关闭",
|
|
106
|
-
onClick:
|
|
137
|
+
onClick: d
|
|
107
138
|
}, [
|
|
108
|
-
|
|
109
|
-
])) :
|
|
110
|
-
])) :
|
|
111
|
-
|
|
112
|
-
|
|
139
|
+
w(p(k), { size: 18 })
|
|
140
|
+
])) : n("", !0)
|
|
141
|
+
])) : n("", !0),
|
|
142
|
+
b("div", H, [
|
|
143
|
+
i(t.$slots, "default", {}, void 0, !0)
|
|
113
144
|
])
|
|
114
|
-
], 12,
|
|
115
|
-
[
|
|
145
|
+
], 12, j)), [
|
|
146
|
+
[D, e.modelValue]
|
|
116
147
|
])
|
|
117
148
|
]));
|
|
118
149
|
}
|
|
119
150
|
});
|
|
120
151
|
export {
|
|
121
|
-
|
|
152
|
+
Q as default
|
|
122
153
|
};
|
|
@@ -2,11 +2,17 @@ import { FieldDef as CellFieldDef } from './FieldCell.vue';
|
|
|
2
2
|
import { Density, Task, TableColumn, ColorMap, DataRecord, TableSchema, ViewConfig, ActiveCell, AggregationConfig, GroupConfig } from '../../types';
|
|
3
3
|
export interface BulkActionItem {
|
|
4
4
|
key: string;
|
|
5
|
-
label: string;
|
|
5
|
+
label: string | ((context: BulkActionContext<unknown>) => string);
|
|
6
6
|
variant?: "default" | "danger";
|
|
7
|
-
disabled?: boolean;
|
|
7
|
+
disabled?: boolean | ((context: BulkActionContext<unknown>) => boolean);
|
|
8
|
+
visible?: boolean | ((context: BulkActionContext<unknown>) => boolean);
|
|
8
9
|
clearSelectionAfter?: boolean;
|
|
9
10
|
}
|
|
11
|
+
export interface BulkActionContext<TRecord = DataRecord> {
|
|
12
|
+
selectionCount: number;
|
|
13
|
+
rowIds: string[];
|
|
14
|
+
rows: TRecord[];
|
|
15
|
+
}
|
|
10
16
|
declare const _default: <T extends {
|
|
11
17
|
id: string;
|
|
12
18
|
} & Record<string, unknown>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./DataTable.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-64e01b4b"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|