@keyblade/pro-components 1.13.8-alpha.3 → 1.13.8-alpha.5
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/es/global-props.d.ts +2 -0
- package/es/pro-date-range-picker/pro-date-range-picker.vue.js +2 -2
- package/es/pro-date-range-picker/pro-date-range-picker.vue2.js +37 -34
- package/es/pro-layout/hooks.js +83 -83
- package/es/pro-table/index.d.ts +4 -2
- package/es/pro-table/index.js +5 -4
- package/es/pro-table/index.vue.d.ts +9 -2
- package/es/pro-table/index.vue.js +30 -17
- package/es/pro-table/index.vue3.js +5 -0
- package/es/pro-table/interface.d.ts +1 -0
- package/es/style.css +1 -1
- package/package.json +1 -1
- package/es/pro-table/index.vue2.js +0 -4
package/es/global-props.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { ProFooterBarProps } from './pro-footer-bar/inerface';
|
|
2
|
+
import { ProTableProps } from './pro-table/interface';
|
|
2
3
|
import { ProTextareaProps } from './pro-textarea';
|
|
3
4
|
export interface GlobalProps {
|
|
4
5
|
footerBar?: ProFooterBarProps;
|
|
5
6
|
textarea?: ProTextareaProps;
|
|
7
|
+
table?: ProTableProps;
|
|
6
8
|
}
|
|
7
9
|
export declare const globalProps: GlobalProps;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./pro-date-range-picker.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const _ = /* @__PURE__ */
|
|
3
|
+
import r from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const _ = /* @__PURE__ */ r(o, [["__scopeId", "data-v-26a58e45"]]);
|
|
5
5
|
export {
|
|
6
6
|
_ as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as R, ref as
|
|
1
|
+
import { defineComponent as R, ref as p, computed as y, resolveComponent as b, createElementBlock as w, openBlock as I, normalizeClass as N, createVNode as i, mergeProps as s, withCtx as c, createTextVNode as q, toDisplayString as A, nextTick as D } from "vue";
|
|
2
2
|
import o from "dayjs";
|
|
3
|
-
import { range as
|
|
4
|
-
const
|
|
3
|
+
import { range as f } from "./pro-date-range-picker.js";
|
|
4
|
+
const H = "keyblade-pro-date-range-picker", $ = /* @__PURE__ */ R({
|
|
5
5
|
__name: "pro-date-range-picker",
|
|
6
6
|
props: {
|
|
7
7
|
modelValue: {},
|
|
@@ -17,7 +17,7 @@ const I = "keyblade-pro-date-range-picker", $ = /* @__PURE__ */ R({
|
|
|
17
17
|
},
|
|
18
18
|
emits: ["update:modelValue"],
|
|
19
19
|
setup(F, { emit: g }) {
|
|
20
|
-
const e = F, V = g,
|
|
20
|
+
const e = F, V = g, h = p(), P = p(), n = p(), u = y({
|
|
21
21
|
get: () => e.modelValue[e.startField],
|
|
22
22
|
set: (t) => {
|
|
23
23
|
V("update:modelValue", {
|
|
@@ -25,7 +25,7 @@ const I = "keyblade-pro-date-range-picker", $ = /* @__PURE__ */ R({
|
|
|
25
25
|
[e.startField]: t
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
-
}),
|
|
28
|
+
}), k = y({
|
|
29
29
|
get: () => e.modelValue[e.endField],
|
|
30
30
|
set: (t) => {
|
|
31
31
|
V("update:modelValue", {
|
|
@@ -43,24 +43,24 @@ const I = "keyblade-pro-date-range-picker", $ = /* @__PURE__ */ R({
|
|
|
43
43
|
return e.modelValue[e.startField] ? (e.intraday && ((d = e.datePickerProps) != null && d.showTime) && t.setDate(t.getDate() + 1), o(t).isBefore(o(e.modelValue[e.startField]))) : !1;
|
|
44
44
|
}, C = (t) => {
|
|
45
45
|
if (!e.modelValue[e.startField] || !t || !e.intraday) {
|
|
46
|
-
|
|
46
|
+
n.value = {};
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
49
|
const a = o(e.modelValue[e.startField]), d = o(t);
|
|
50
50
|
if (!a.isSame(d, "day")) {
|
|
51
|
-
|
|
51
|
+
n.value = {};
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
|
-
const l = a.hour(), r = a.minute(),
|
|
55
|
-
|
|
56
|
-
disabledHours: () =>
|
|
57
|
-
disabledMinutes: (
|
|
58
|
-
disabledSeconds: (
|
|
54
|
+
const l = a.hour(), r = a.minute(), B = a.second();
|
|
55
|
+
n.value = {
|
|
56
|
+
disabledHours: () => f(0, l),
|
|
57
|
+
disabledMinutes: (m) => m === l ? f(0, r) : [],
|
|
58
|
+
disabledSeconds: (m, _) => m === l && _ === r ? f(0, B) : []
|
|
59
59
|
};
|
|
60
60
|
}, T = () => {
|
|
61
61
|
setTimeout(() => {
|
|
62
62
|
const t = e.modelValue[e.endField], a = e.modelValue[e.startField];
|
|
63
|
-
o(a).isAfter(o(t)) && (
|
|
63
|
+
o(a).isAfter(o(t)) && (u.value = t), t && !a && D(() => {
|
|
64
64
|
var l;
|
|
65
65
|
const d = (l = P.value) == null ? void 0 : l.$el.parentElement.querySelector("input");
|
|
66
66
|
d && d.click();
|
|
@@ -70,26 +70,26 @@ const I = "keyblade-pro-date-range-picker", $ = /* @__PURE__ */ R({
|
|
|
70
70
|
setTimeout(() => {
|
|
71
71
|
e.modelValue[e.endField] && !e.modelValue[e.startField] && D(() => {
|
|
72
72
|
var a;
|
|
73
|
-
const t = (a =
|
|
73
|
+
const t = (a = h.value) == null ? void 0 : a.$el.parentElement.querySelector("input");
|
|
74
74
|
t && t.click();
|
|
75
75
|
});
|
|
76
76
|
});
|
|
77
77
|
};
|
|
78
78
|
return (t, a) => {
|
|
79
|
-
const d =
|
|
80
|
-
return
|
|
81
|
-
class:
|
|
79
|
+
const d = b("a-date-picker"), l = b("a-form-item");
|
|
80
|
+
return I(), w("div", {
|
|
81
|
+
class: N(H)
|
|
82
82
|
}, [
|
|
83
|
-
|
|
83
|
+
i(l, s(t.formItemProps, {
|
|
84
84
|
field: t.startField,
|
|
85
85
|
"hide-label": t.hideLabel
|
|
86
86
|
}), {
|
|
87
|
-
default:
|
|
88
|
-
|
|
87
|
+
default: c(() => [
|
|
88
|
+
i(d, s({
|
|
89
89
|
ref_key: "startDatePickerRef",
|
|
90
|
-
ref:
|
|
91
|
-
modelValue:
|
|
92
|
-
"onUpdate:modelValue": a[0] || (a[0] = (r) =>
|
|
90
|
+
ref: h,
|
|
91
|
+
modelValue: u.value,
|
|
92
|
+
"onUpdate:modelValue": a[0] || (a[0] = (r) => u.value = r)
|
|
93
93
|
}, t.datePickerProps, {
|
|
94
94
|
placeholder: t.startPlaceholder,
|
|
95
95
|
"disabled-date": (r) => v(r),
|
|
@@ -98,33 +98,36 @@ const I = "keyblade-pro-date-range-picker", $ = /* @__PURE__ */ R({
|
|
|
98
98
|
]),
|
|
99
99
|
_: 1
|
|
100
100
|
}, 16, ["field", "hide-label"]),
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
i(l, {
|
|
102
|
+
"hide-label": "",
|
|
103
|
+
style: { "max-height": "32px", top: "0px" }
|
|
104
|
+
}, {
|
|
105
|
+
default: c(() => [
|
|
106
|
+
q(A(t.separator), 1)
|
|
104
107
|
]),
|
|
105
108
|
_: 1
|
|
106
109
|
}),
|
|
107
|
-
|
|
110
|
+
i(l, s(t.formItemProps, {
|
|
108
111
|
field: t.endField,
|
|
109
112
|
"hide-label": "",
|
|
110
113
|
style: { "margin-right": "0px" }
|
|
111
|
-
}, {
|
|
112
|
-
default:
|
|
113
|
-
|
|
114
|
+
}), {
|
|
115
|
+
default: c(() => [
|
|
116
|
+
i(d, s({
|
|
114
117
|
ref_key: "endDatePickerRef",
|
|
115
118
|
ref: P,
|
|
116
|
-
modelValue:
|
|
117
|
-
"onUpdate:modelValue": a[1] || (a[1] = (r) =>
|
|
119
|
+
modelValue: k.value,
|
|
120
|
+
"onUpdate:modelValue": a[1] || (a[1] = (r) => k.value = r)
|
|
118
121
|
}, t.datePickerProps, {
|
|
119
122
|
placeholder: t.endPlaceholder,
|
|
120
123
|
"disabled-date": (r) => S(r),
|
|
121
|
-
"disabled-time": () =>
|
|
124
|
+
"disabled-time": () => n.value,
|
|
122
125
|
onSelect: C,
|
|
123
126
|
onChange: E
|
|
124
127
|
}), null, 16, ["modelValue", "placeholder", "disabled-date", "disabled-time"])
|
|
125
128
|
]),
|
|
126
129
|
_: 1
|
|
127
|
-
},
|
|
130
|
+
}, 16, ["field"])
|
|
128
131
|
]);
|
|
129
132
|
};
|
|
130
133
|
}
|
package/es/pro-layout/hooks.js
CHANGED
|
@@ -1,131 +1,131 @@
|
|
|
1
|
-
import { ref as
|
|
1
|
+
import { ref as h, computed as L, watch as g } from "vue";
|
|
2
2
|
import { useRoute as R, useRouter as W } from "vue-router";
|
|
3
3
|
import { ProLayoutMode as P, ProLayoutMenuType as B } from "./enum.js";
|
|
4
|
-
function z(
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
|
|
4
|
+
function z(o) {
|
|
5
|
+
const u = R(), r = W(), y = h([]), T = h([]), i = h(), v = h([]), M = h({}), k = h([]), s = h([]), p = h([]), b = h([]), f = h([]), d = L(() => {
|
|
6
|
+
const e = [...o.menuItems], a = (t) => {
|
|
7
|
+
t.forEach((l) => {
|
|
8
8
|
if (l != null && l.children && l.children.length > 0) {
|
|
9
9
|
if ((l == null ? void 0 : l.topChildrenMenu) !== void 0)
|
|
10
|
-
l.children = l.children.map((
|
|
10
|
+
l.children = l.children.map((n) => ({ ...n, topMenu: l == null ? void 0 : l.topChildrenMenu }));
|
|
11
11
|
else {
|
|
12
|
-
const
|
|
13
|
-
|
|
12
|
+
const n = l.children.find((c) => c.topMenu !== void 0);
|
|
13
|
+
n && (l.topChildrenMenu = n.topMenu, l.children = l.children.map((c) => ({ ...c, topMenu: n.topMenu })));
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
a(l.children);
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
};
|
|
19
|
-
return
|
|
20
|
-
}), C = (
|
|
21
|
-
var
|
|
22
|
-
y.value = [
|
|
23
|
-
}, E = (
|
|
24
|
-
|
|
25
|
-
}, N = async (
|
|
26
|
-
if (
|
|
27
|
-
if (
|
|
28
|
-
window.open(
|
|
19
|
+
return o.layout === P.mix && a(e), e;
|
|
20
|
+
}), C = (e) => {
|
|
21
|
+
var a;
|
|
22
|
+
y.value = [e.name], !(e != null && e.children) || ((a = e == null ? void 0 : e.children) == null ? void 0 : a.length) === 0 ? (f.value = [], r == null || r.push({ path: e.path })) : f.value = e.children;
|
|
23
|
+
}, E = (e) => {
|
|
24
|
+
e != null && e.name ? r == null || r.push({ name: e.name }) : r == null || r.push({ path: e.path, params: {} }), T.value = [e.name];
|
|
25
|
+
}, N = async (e, a) => {
|
|
26
|
+
if (a != null && a.path && !(o != null && o.onMenuItemClick && !await o.onMenuItemClick(a))) {
|
|
27
|
+
if (a.path.startsWith("http") || a.path.startsWith("https")) {
|
|
28
|
+
window.open(a.path);
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
|
-
|
|
31
|
+
e === B.top ? C(a) : E(a);
|
|
32
32
|
}
|
|
33
33
|
}, S = () => {
|
|
34
|
-
const
|
|
34
|
+
const e = [], a = (t) => {
|
|
35
35
|
var l;
|
|
36
|
-
for (const
|
|
37
|
-
const c = n
|
|
38
|
-
if (c.name === ((l = i == null ? void 0 : i.value) == null ? void 0 : l.name) || c.children && c.children.length > 0 &&
|
|
39
|
-
return
|
|
36
|
+
for (const n in t) {
|
|
37
|
+
const c = t[n];
|
|
38
|
+
if (c.name === ((l = i == null ? void 0 : i.value) == null ? void 0 : l.name) || c.children && c.children.length > 0 && a(c.children))
|
|
39
|
+
return e.unshift(c), !0;
|
|
40
40
|
}
|
|
41
41
|
return !1;
|
|
42
42
|
};
|
|
43
|
-
|
|
43
|
+
a(JSON.parse(JSON.stringify(d.value))), v.value = e;
|
|
44
44
|
}, x = () => {
|
|
45
|
-
var
|
|
46
|
-
const
|
|
47
|
-
k.value = (
|
|
45
|
+
var a, t, l;
|
|
46
|
+
const e = (a = v.value) == null ? void 0 : a.map((n) => ({ path: n == null ? void 0 : n.path, label: n == null ? void 0 : n.title }));
|
|
47
|
+
k.value = (t = i.value) != null && t.breadcrumbs ? (l = i.value) == null ? void 0 : l.breadcrumbs : e.length !== 0 ? e : [];
|
|
48
48
|
};
|
|
49
49
|
function A() {
|
|
50
50
|
if (!i.value || i.value.noAffix) {
|
|
51
|
-
s.value.forEach((
|
|
52
|
-
|
|
51
|
+
s.value.forEach((n) => {
|
|
52
|
+
n.active = !1;
|
|
53
53
|
});
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
56
|
-
const { name:
|
|
57
|
-
let
|
|
58
|
-
s.value.forEach((
|
|
59
|
-
|
|
56
|
+
const { name: e, title: a } = i.value;
|
|
57
|
+
let t = -1;
|
|
58
|
+
s.value.forEach((n, c) => {
|
|
59
|
+
n.active = !1, n.name === e && (t = c);
|
|
60
60
|
});
|
|
61
61
|
const l = {
|
|
62
|
-
name:
|
|
63
|
-
parentNames: v.value.map((
|
|
64
|
-
title:
|
|
65
|
-
fullPath:
|
|
62
|
+
name: e,
|
|
63
|
+
parentNames: v.value.map((n) => n.name),
|
|
64
|
+
title: a ?? e,
|
|
65
|
+
fullPath: u.fullPath,
|
|
66
66
|
active: !0
|
|
67
67
|
};
|
|
68
|
-
if (~
|
|
69
|
-
const
|
|
70
|
-
|
|
68
|
+
if (~t) {
|
|
69
|
+
const n = s.value[t];
|
|
70
|
+
n.fullPath === u.fullPath ? (n.active = !0, n.fullPath = u.fullPath) : (s.value.splice(t, 1), setTimeout(() => {
|
|
71
71
|
s.value.push(l);
|
|
72
72
|
}));
|
|
73
73
|
} else
|
|
74
74
|
s.value.push(l);
|
|
75
75
|
}
|
|
76
|
-
const w = (
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
}, K = (
|
|
80
|
-
let
|
|
81
|
-
if (s.value.forEach((
|
|
82
|
-
|
|
83
|
-
}),
|
|
84
|
-
let
|
|
85
|
-
|
|
76
|
+
const w = (e) => {
|
|
77
|
+
const a = s.value.findIndex((l) => l.name === e), t = s.value[a];
|
|
78
|
+
r.push(t.fullPath);
|
|
79
|
+
}, K = (e) => {
|
|
80
|
+
let a = -1, t = -1;
|
|
81
|
+
if (s.value.forEach((n, c) => {
|
|
82
|
+
n.name === e && (t = c), n.active && (a = c);
|
|
83
|
+
}), a === t) {
|
|
84
|
+
let n;
|
|
85
|
+
t === 0 ? n = s.value[t + 1] : n = s.value[t - 1], n.active = !0, r.push(n.fullPath);
|
|
86
86
|
}
|
|
87
|
-
const l = s.value.splice(
|
|
87
|
+
const l = s.value.splice(t, 1);
|
|
88
88
|
O(l[0]);
|
|
89
89
|
}, J = () => {
|
|
90
|
-
var
|
|
91
|
-
if (
|
|
90
|
+
var a;
|
|
91
|
+
if (o != null && o.disableKeepAlive || (a = u == null ? void 0 : u.meta) != null && a.ignoreCache)
|
|
92
92
|
return;
|
|
93
|
-
const a = new Set(p.value);
|
|
94
|
-
v.value.forEach((n) => {
|
|
95
|
-
n.name && a.add(n.name);
|
|
96
|
-
}), p.value = Array.from(a.values());
|
|
97
|
-
}, O = (a) => {
|
|
98
93
|
const e = new Set(p.value);
|
|
99
|
-
|
|
100
|
-
e.
|
|
101
|
-
}), s.value.forEach((n) => {
|
|
102
|
-
n.parentNames.forEach((l) => {
|
|
103
|
-
const t = M.value[l];
|
|
104
|
-
t != null && t.ignoreCache || e.add(t.name);
|
|
105
|
-
});
|
|
94
|
+
v.value.forEach((t) => {
|
|
95
|
+
t.name && e.add(t.name);
|
|
106
96
|
}), p.value = Array.from(e.values());
|
|
97
|
+
}, O = (e) => {
|
|
98
|
+
const a = new Set(p.value);
|
|
99
|
+
e.parentNames.forEach((t) => {
|
|
100
|
+
a.delete(t);
|
|
101
|
+
}), s.value.forEach((t) => {
|
|
102
|
+
t.parentNames.forEach((l) => {
|
|
103
|
+
const n = M.value[l];
|
|
104
|
+
n != null && n.ignoreCache || a.add(n.name);
|
|
105
|
+
});
|
|
106
|
+
}), p.value = Array.from(a.values());
|
|
107
107
|
};
|
|
108
108
|
return g(() => d.value, () => {
|
|
109
|
-
const
|
|
110
|
-
|
|
111
|
-
l.children && l.children.length > 0 &&
|
|
109
|
+
const e = {}, a = (t) => {
|
|
110
|
+
t.forEach((l) => {
|
|
111
|
+
l.children && l.children.length > 0 && a(l.children), delete l.children, e[l.name] = l;
|
|
112
112
|
});
|
|
113
113
|
};
|
|
114
|
-
|
|
115
|
-
}, { immediate: !0 }), g(() => [
|
|
116
|
-
var
|
|
117
|
-
if (b.value = [], f.value = [],
|
|
114
|
+
a(JSON.parse(JSON.stringify(d.value))), M.value = e;
|
|
115
|
+
}, { immediate: !0 }), g(() => [o.layout, d.value], () => {
|
|
116
|
+
var e;
|
|
117
|
+
if (b.value = [], f.value = [], o.layout === P.side)
|
|
118
118
|
f.value = d.value;
|
|
119
|
-
else if (
|
|
120
|
-
const
|
|
121
|
-
(
|
|
119
|
+
else if (o.layout === P.mix) {
|
|
120
|
+
const a = (e = d.value) == null ? void 0 : e.filter((t) => t.topMenu);
|
|
121
|
+
(a == null ? void 0 : a.length) === 0 ? f.value = d.value : b.value = a;
|
|
122
122
|
}
|
|
123
|
-
}, { immediate: !0 }), g(() =>
|
|
124
|
-
var
|
|
125
|
-
const
|
|
126
|
-
i.value = M.value[
|
|
127
|
-
const
|
|
128
|
-
|
|
123
|
+
}, { immediate: !0 }), g(() => u == null ? void 0 : u.name, () => {
|
|
124
|
+
var t, l, n;
|
|
125
|
+
const e = u == null ? void 0 : u.name;
|
|
126
|
+
i.value = M.value[e], S();
|
|
127
|
+
const a = v.value.filter((c) => c.topMenu);
|
|
128
|
+
a.length > 0 && b.value.length > 0 && (f.value = ((t = a[a.length - 1]) == null ? void 0 : t.children) || []), y.value = i != null && i.value ? [...a.map((c) => c.name), ...((l = i.value) == null ? void 0 : l.activatedKeys) || []] : [], T.value = i != null && i.value ? [i.value.name, ...((n = i.value) == null ? void 0 : n.activatedKeys) || []] : [], x(), o.hideTabs || A(), J();
|
|
129
129
|
}, { immediate: !0 }), {
|
|
130
130
|
topMenuItems: b,
|
|
131
131
|
siderMenuItems: f,
|
package/es/pro-table/index.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ declare const ProTable: {
|
|
|
23
23
|
defaultExpandAllRows: boolean;
|
|
24
24
|
stickyHeader: number | boolean;
|
|
25
25
|
showEmptyTree: boolean;
|
|
26
|
-
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {},
|
|
26
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
27
27
|
P: {};
|
|
28
28
|
B: {};
|
|
29
29
|
D: {};
|
|
@@ -81,7 +81,9 @@ declare const ProTable: {
|
|
|
81
81
|
stickyHeader: number | boolean;
|
|
82
82
|
showEmptyTree: boolean;
|
|
83
83
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
84
|
-
$slots: any
|
|
84
|
+
$slots: Partial<Record<NonNullable<string | number>, (_: any) => any>> & {
|
|
85
|
+
'pagination-left'?(_: {}): any;
|
|
86
|
+
};
|
|
85
87
|
}) & {
|
|
86
88
|
install: (app: App) => void;
|
|
87
89
|
};
|
package/es/pro-table/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import t from "./index.vue.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { Table as e } from "@arco-design/web-vue";
|
|
4
|
+
const s = Object.assign(t, {
|
|
4
5
|
install: (o) => {
|
|
5
|
-
o.use(
|
|
6
|
+
o.use(e), o.component("KbProTable", t);
|
|
6
7
|
}
|
|
7
8
|
});
|
|
8
9
|
export {
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { IProTable } from './interface';
|
|
2
|
-
declare function __VLS_template():
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: Partial<Record<NonNullable<string | number>, (_: any) => any>> & {
|
|
5
|
+
'pagination-left'?(_: {}): any;
|
|
6
|
+
};
|
|
7
|
+
refs: {};
|
|
8
|
+
rootEl: HTMLDivElement;
|
|
9
|
+
};
|
|
3
10
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
4
11
|
declare const __VLS_component: import('vue').DefineComponent<IProTable, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IProTable> & Readonly<{}>, {
|
|
5
12
|
data: any[];
|
|
@@ -24,7 +31,7 @@ declare const __VLS_component: import('vue').DefineComponent<IProTable, {}, {},
|
|
|
24
31
|
defaultExpandAllRows: boolean;
|
|
25
32
|
stickyHeader: number | boolean;
|
|
26
33
|
showEmptyTree: boolean;
|
|
27
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {},
|
|
34
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
28
35
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
29
36
|
export default _default;
|
|
30
37
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
1
|
+
import { defineComponent as B, useSlots as h, useAttrs as x, computed as s, resolveComponent as S, createElementBlock as r, openBlock as d, normalizeClass as u, createCommentVNode as k, createVNode as v, renderSlot as p, mergeProps as w, toHandlers as E, createSlots as P, renderList as z, unref as K, withCtx as R, normalizeProps as _, guardReactiveProps as L } from "vue";
|
|
2
|
+
import { conclude as A } from "vue-global-config";
|
|
3
|
+
import { globalProps as M } from "../global-props.js";
|
|
4
|
+
const i = "keyblade-pro-table", F = /* @__PURE__ */ B({
|
|
3
5
|
__name: "index",
|
|
4
6
|
props: {
|
|
5
7
|
size: { default: "large" },
|
|
@@ -12,7 +14,7 @@ const K = /* @__PURE__ */ p({
|
|
|
12
14
|
pagination: { type: Boolean, default: !0 },
|
|
13
15
|
stripe: { type: Boolean, default: !1 },
|
|
14
16
|
tableLayoutFixed: { type: Boolean, default: !1 },
|
|
15
|
-
pagePosition: { default: "
|
|
17
|
+
pagePosition: { default: "tr" },
|
|
16
18
|
indentSize: { default: 16 },
|
|
17
19
|
rowKey: { default: "key" },
|
|
18
20
|
showHeader: { type: Boolean, default: !0 },
|
|
@@ -63,26 +65,37 @@ const K = /* @__PURE__ */ p({
|
|
|
63
65
|
onRowContextmenu: {},
|
|
64
66
|
onCellContextmenu: {}
|
|
65
67
|
},
|
|
66
|
-
setup(
|
|
67
|
-
const
|
|
68
|
+
setup(f) {
|
|
69
|
+
const c = f, y = h(), m = x(), C = s(() => {
|
|
68
70
|
const e = {};
|
|
69
|
-
for (const [o, t] of Object.entries(
|
|
71
|
+
for (const [o, t] of Object.entries(m))
|
|
70
72
|
o.startsWith("on") && typeof t == "function" && (e[o] = t);
|
|
71
73
|
return e;
|
|
72
|
-
});
|
|
74
|
+
}), g = s(() => A([c, M.textarea]) || {});
|
|
73
75
|
return (e, o) => {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
76
|
+
var a, l;
|
|
77
|
+
const t = S("a-table");
|
|
78
|
+
return d(), r("div", {
|
|
79
|
+
class: u(i)
|
|
80
|
+
}, [
|
|
81
|
+
!((a = e.pagination) != null && a.total) && !((l = e.data) != null && l.length) ? (d(), r("div", {
|
|
82
|
+
key: 0,
|
|
83
|
+
class: u(`${i}-header`)
|
|
84
|
+
}, [
|
|
85
|
+
p(e.$slots, "pagination-left")
|
|
86
|
+
], 2)) : k("", !0),
|
|
87
|
+
v(t, w(g.value, E(C.value)), P({ _: 2 }, [
|
|
88
|
+
z(K(y), (N, n) => ({
|
|
89
|
+
name: n,
|
|
90
|
+
fn: R((b) => [
|
|
91
|
+
p(e.$slots, n, _(L(b ?? {})))
|
|
92
|
+
])
|
|
93
|
+
}))
|
|
94
|
+
]), 1040)
|
|
95
|
+
]);
|
|
83
96
|
};
|
|
84
97
|
}
|
|
85
98
|
});
|
|
86
99
|
export {
|
|
87
|
-
|
|
100
|
+
F as default
|
|
88
101
|
};
|
package/es/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.keyblade-pro-page-header{background:var(--color-bg-2);padding:16px 32px}.keyblade-pro-page-header .keyblade-pro-page-header-section-breadcrumb .arco-breadcrumb-item:first-child{padding-left:0}.keyblade-pro-page-header .keyblade-pro-page-header-title.arco-typography{padding-top:4px;margin-top:0}.keyblade-pro-layout{width:100%;height:100%}.keyblade-pro-layout .keyblade-pro-layout-header{position:fixed;top:0;left:0;width:100%;height:var(--4a477a1a);z-index:100;display:flex;align-items:center;justify-content:space-between;padding:0 20px;background-color:var(--color-bg-2);border-bottom:1px solid var(--color-border);transition:all .2s cubic-bezier(.34,.69,.1,1)}.keyblade-pro-layout .keyblade-pro-layout-header-left{cursor:pointer;display:flex;align-items:center}.keyblade-pro-layout .keyblade-pro-layout-header-left-logo-img{width:28px;height:28px}.keyblade-pro-layout .keyblade-pro-layout-header-left-logo-title.arco-typography{margin:0;font-size:18px}.keyblade-pro-layout .keyblade-pro-layout-header-center{flex:1}.keyblade-pro-layout .keyblade-pro-layout-sider{padding-top:var(--4a477a1a);position:fixed;top:0;left:0;z-index:99;height:100%;transition:all .2s cubic-bezier(.34,.69,.1,1)}.keyblade-pro-layout .keyblade-pro-layout-sider-content{position:relative;height:100%;overflow:auto}.keyblade-pro-layout .keyblade-pro-layout-sider-collapse-btn.arco-btn{position:absolute;right:12px;bottom:12px}.keyblade-pro-layout .keyblade-pro-layout-body{padding-top:var(--4a477a1a);padding-left:var(--3599ef93);min-height:100vh;overflow-y:hidden;background-color:var(--color-fill-2);transition:padding .2s cubic-bezier(.34,.69,.1,1)}.keyblade-pro-layout .keyblade-pro-layout-body-hide-sider{padding-left:0}.keyblade-pro-layout .keyblade-pro-layout-body-affix .arco-affix{z-index:98}.keyblade-pro-layout .keyblade-pro-layout-body-footer{display:flex;align-items:center;justify-content:center;height:40px;color:var(--color-text-2);text-align:center}.keyblade-pro-layout .keyblade-pro-layout-body-collapsed{padding-left:var(--5b478c92)}.keyblade-pro-layout-side .keyblade-pro-layout-header{z-index:98;left:var(--3599ef93);width:calc(100% - var(--3599ef93))}.keyblade-pro-layout-side .keyblade-pro-layout-header-collapsed{left:var(--5b478c92);width:calc(100% - var(--5b478c92))}.keyblade-pro-layout-side .keyblade-pro-layout-sider{padding-top:0}.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-logo{position:relative;display:flex;align-items:center;padding:16px;cursor:pointer;transition:padding .3s cubic-bezier(.645,.045,.355,1)}.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-logo-img{width:28px;height:28px}.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-logo-title.arco-typography{margin:0;font-size:18px}.keyblade-pro-layout-side .keyblade-pro-layout-sider-collapsed .keyblade-pro-layout-sider-content-logo{padding:16px 10px}.keyblade-pro-menu .keyblade-pro-menu-item-img{width:14px;height:auto}.keyblade-pro-reuse-tabs{position:relative;background-color:var(--color-bg-2);padding:4px 20px}.keyblade-pro-page-container .keyblade-pro-page-container-content{padding:20px}.keyblade-pro-page-container-with-footer-bar .keyblade-pro-page-container-content{padding-bottom:84px}.keyblade-pro-footer-bar[data-v-f9d45b25]{z-index:11;position:fixed;width:100%;bottom:0;right:0;padding:16px 20px;background-color:var(--color-bg-3);display:flex;justify-content:flex-end;box-shadow:0 -2px 5px #0000000d}[arco-theme=dark] .keyblade-pro-footer-bar[data-v-f9d45b25]{border-top:1px solid var(--color-neutral-3)}.keyblade-pro-image-upload-cropper-dialog-cropper-wrapper[data-v-1bddf267]{width:100%;height:400px}.keyblade-pro-image-upload-cropper-dialog-operate[data-v-1bddf267]{margin-top:24px;display:flex;align-items:center;justify-content:center}.keyblade-pro-image-upload-cropper-dialog-footer[data-v-1bddf267]{margin-top:24px;display:flex;align-items:center;justify-content:flex-end}.keyblade-pro-image-upload-cropper-dialog-footer-left[data-v-1bddf267]{display:flex;align-items:center;justify-content:flex-start;margin-right:12px}.keyblade-pro-image-upload-cropper-dialog-footer-right[data-v-1bddf267]{flex:1;display:flex;align-items:center;justify-content:flex-end}.keyblade-pro-date-range-picker[data-v-
|
|
1
|
+
.keyblade-pro-page-header{background:var(--color-bg-2);padding:16px 32px}.keyblade-pro-page-header .keyblade-pro-page-header-section-breadcrumb .arco-breadcrumb-item:first-child{padding-left:0}.keyblade-pro-page-header .keyblade-pro-page-header-title.arco-typography{padding-top:4px;margin-top:0}.keyblade-pro-layout{width:100%;height:100%}.keyblade-pro-layout .keyblade-pro-layout-header{position:fixed;top:0;left:0;width:100%;height:var(--4a477a1a);z-index:100;display:flex;align-items:center;justify-content:space-between;padding:0 20px;background-color:var(--color-bg-2);border-bottom:1px solid var(--color-border);transition:all .2s cubic-bezier(.34,.69,.1,1)}.keyblade-pro-layout .keyblade-pro-layout-header-left{cursor:pointer;display:flex;align-items:center}.keyblade-pro-layout .keyblade-pro-layout-header-left-logo-img{width:28px;height:28px}.keyblade-pro-layout .keyblade-pro-layout-header-left-logo-title.arco-typography{margin:0;font-size:18px}.keyblade-pro-layout .keyblade-pro-layout-header-center{flex:1}.keyblade-pro-layout .keyblade-pro-layout-sider{padding-top:var(--4a477a1a);position:fixed;top:0;left:0;z-index:99;height:100%;transition:all .2s cubic-bezier(.34,.69,.1,1)}.keyblade-pro-layout .keyblade-pro-layout-sider-content{position:relative;height:100%;overflow:auto}.keyblade-pro-layout .keyblade-pro-layout-sider-collapse-btn.arco-btn{position:absolute;right:12px;bottom:12px}.keyblade-pro-layout .keyblade-pro-layout-body{padding-top:var(--4a477a1a);padding-left:var(--3599ef93);min-height:100vh;overflow-y:hidden;background-color:var(--color-fill-2);transition:padding .2s cubic-bezier(.34,.69,.1,1)}.keyblade-pro-layout .keyblade-pro-layout-body-hide-sider{padding-left:0}.keyblade-pro-layout .keyblade-pro-layout-body-affix .arco-affix{z-index:98}.keyblade-pro-layout .keyblade-pro-layout-body-footer{display:flex;align-items:center;justify-content:center;height:40px;color:var(--color-text-2);text-align:center}.keyblade-pro-layout .keyblade-pro-layout-body-collapsed{padding-left:var(--5b478c92)}.keyblade-pro-layout-side .keyblade-pro-layout-header{z-index:98;left:var(--3599ef93);width:calc(100% - var(--3599ef93))}.keyblade-pro-layout-side .keyblade-pro-layout-header-collapsed{left:var(--5b478c92);width:calc(100% - var(--5b478c92))}.keyblade-pro-layout-side .keyblade-pro-layout-sider{padding-top:0}.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-logo{position:relative;display:flex;align-items:center;padding:16px;cursor:pointer;transition:padding .3s cubic-bezier(.645,.045,.355,1)}.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-logo-img{width:28px;height:28px}.keyblade-pro-layout-side .keyblade-pro-layout-sider-content-logo-title.arco-typography{margin:0;font-size:18px}.keyblade-pro-layout-side .keyblade-pro-layout-sider-collapsed .keyblade-pro-layout-sider-content-logo{padding:16px 10px}.keyblade-pro-menu .keyblade-pro-menu-item-img{width:14px;height:auto}.keyblade-pro-reuse-tabs{position:relative;background-color:var(--color-bg-2);padding:4px 20px}.keyblade-pro-page-container .keyblade-pro-page-container-content{padding:20px}.keyblade-pro-page-container-with-footer-bar .keyblade-pro-page-container-content{padding-bottom:84px}.keyblade-pro-footer-bar[data-v-f9d45b25]{z-index:11;position:fixed;width:100%;bottom:0;right:0;padding:16px 20px;background-color:var(--color-bg-3);display:flex;justify-content:flex-end;box-shadow:0 -2px 5px #0000000d}[arco-theme=dark] .keyblade-pro-footer-bar[data-v-f9d45b25]{border-top:1px solid var(--color-neutral-3)}.keyblade-pro-image-upload-cropper-dialog-cropper-wrapper[data-v-1bddf267]{width:100%;height:400px}.keyblade-pro-image-upload-cropper-dialog-operate[data-v-1bddf267]{margin-top:24px;display:flex;align-items:center;justify-content:center}.keyblade-pro-image-upload-cropper-dialog-footer[data-v-1bddf267]{margin-top:24px;display:flex;align-items:center;justify-content:flex-end}.keyblade-pro-image-upload-cropper-dialog-footer-left[data-v-1bddf267]{display:flex;align-items:center;justify-content:flex-start;margin-right:12px}.keyblade-pro-image-upload-cropper-dialog-footer-right[data-v-1bddf267]{flex:1;display:flex;align-items:center;justify-content:flex-end}.keyblade-pro-date-range-picker[data-v-26a58e45]{display:flex;align-items:flex-start}.keyblade-pro-date-range-picker[data-v-26a58e45] .arco-form-item{margin-right:8px;margin-bottom:0}.keyblade-pro-date-range-picker[data-v-26a58e45] .arco-form-item .arco-picker:not(.arco-picker-error){background-color:var(--color-bg-1);border-color:var(--color-border-1)}.keyblade-pro-date-range-picker[data-v-26a58e45] .arco-form-item .arco-picker:not(.arco-picker-error):hover{border-color:rgb(var(--primary-6))}.keyblade-pro-table .keyblade-pro-table-header{min-height:32px;margin-bottom:12px;display:flex;align-items:center}.keyblade-pro-table .arco-table .arco-table-pagination>:first-child:not(.arco-pagination){flex:1}.keyblade-pro-textarea-word-limit[data-v-8721e63b]{overflow:inherit}.keyblade-pro-textarea-word-limit[data-v-8721e63b] .arco-textarea-word-limit{bottom:-20px}.keyblade-pro-textarea[data-v-8721e63b]:not(.arco-textarea-error){background-color:var(--color-bg-1);border:1px solid var(--color-border-1);border-radius:4px}.keyblade-pro-textarea[data-v-8721e63b]:not(.arco-textarea-error):hover{border-color:rgb(var(--primary-6))}
|
package/package.json
CHANGED