@guoyg578/k-ui 0.1.3 → 0.1.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/dist/components/KCascader.vue.js +1 -1
- package/dist/components/KCascader.vue_vue_type_script_setup_true_lang.js +43 -42
- package/dist/components/KCombobox.vue.js +1 -1
- package/dist/components/KCombobox.vue_vue_type_script_setup_true_lang.js +48 -47
- package/dist/components/KDialog.vue.js +1 -1
- package/dist/components/KDialog.vue_vue_type_script_setup_true_lang.js +40 -39
- package/dist/components/KDrawer.vue.js +1 -1
- package/dist/components/KDrawer.vue_vue_type_script_setup_true_lang.js +36 -35
- package/dist/components/KDropdown.vue_vue_type_script_setup_true_lang.js +28 -27
- package/dist/components/KImageViewer.vue.js +1 -1
- package/dist/components/KImageViewer.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/KPopover.vue_vue_type_script_setup_true_lang.js +15 -14
- package/dist/components/KSelect.vue.js +1 -1
- package/dist/components/KSelect.vue_vue_type_script_setup_true_lang.js +60 -59
- package/dist/components/KTimePicker.vue.js +1 -1
- package/dist/components/KTimePicker.vue_vue_type_script_setup_true_lang.js +45 -44
- package/dist/components/KTooltip.vue_vue_type_script_setup_true_lang.js +13 -12
- package/dist/components/KTreeSelect.vue.js +1 -1
- package/dist/components/KTreeSelect.vue_vue_type_script_setup_true_lang.js +7 -6
- package/dist/k-ui.css +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, mergeModels as l,
|
|
2
|
-
import { DropdownMenuContent as
|
|
1
|
+
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, mergeModels as l, mergeProps as u, normalizeClass as d, openBlock as f, renderList as p, renderSlot as m, resolveDynamicComponent as h, toDisplayString as g, unref as _, useModel as v, withCtx as y } from "vue";
|
|
2
|
+
import { DropdownMenuContent as b, DropdownMenuItem as x, DropdownMenuLabel as S, DropdownMenuPortal as C, DropdownMenuRoot as w, DropdownMenuSeparator as T, DropdownMenuTrigger as E } from "reka-ui";
|
|
3
3
|
//#region components/KDropdown.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var
|
|
4
|
+
var D = { class: "k-dropdown-item__label" }, O = {
|
|
5
5
|
key: 1,
|
|
6
6
|
class: "k-dropdown-item__shortcut"
|
|
7
|
-
},
|
|
7
|
+
}, k = /* @__PURE__ */ c({
|
|
8
|
+
inheritAttrs: !1,
|
|
8
9
|
__name: "KDropdown",
|
|
9
10
|
props: /* @__PURE__ */ l({
|
|
10
11
|
items: {},
|
|
@@ -24,60 +25,60 @@ var E = { class: "k-dropdown-item__label" }, D = {
|
|
|
24
25
|
}),
|
|
25
26
|
emits: /* @__PURE__ */ l(["select"], ["update:open"]),
|
|
26
27
|
setup(c, { emit: l }) {
|
|
27
|
-
let
|
|
28
|
-
function
|
|
29
|
-
e.disabled ||
|
|
28
|
+
let k = c, A = v(c, "open"), j = l, M = t(() => k.items ?? k.options ?? []);
|
|
29
|
+
function N(e) {
|
|
30
|
+
e.disabled || j("select", e.key, e);
|
|
30
31
|
}
|
|
31
|
-
return (t, l) => (
|
|
32
|
-
open:
|
|
33
|
-
"onUpdate:open": l[0] ||= (e) =>
|
|
32
|
+
return (t, l) => (f(), n(_(w), {
|
|
33
|
+
open: A.value,
|
|
34
|
+
"onUpdate:open": l[0] ||= (e) => A.value = e
|
|
34
35
|
}, {
|
|
35
|
-
default:
|
|
36
|
+
default: y(() => [s(_(E), {
|
|
36
37
|
"as-child": "",
|
|
37
38
|
disabled: c.disabled
|
|
38
39
|
}, {
|
|
39
|
-
default:
|
|
40
|
+
default: y(() => [a("span", u(t.$attrs, { class: ["k-dropdown-trigger", { "k-dropdown-trigger--disabled": c.disabled }] }), [m(t.$slots, "default")], 16)]),
|
|
40
41
|
_: 3
|
|
41
|
-
}, 8, ["disabled"]), s(
|
|
42
|
-
default:
|
|
43
|
-
class:
|
|
42
|
+
}, 8, ["disabled"]), s(_(C), null, {
|
|
43
|
+
default: y(() => [s(_(b), {
|
|
44
|
+
class: d(["k-dropdown-content k-menu-surface", c.contentClass]),
|
|
44
45
|
side: c.side,
|
|
45
46
|
align: c.align,
|
|
46
47
|
"side-offset": c.sideOffset
|
|
47
48
|
}, {
|
|
48
|
-
default:
|
|
49
|
+
default: y(() => [(f(!0), i(e, null, p(M.value, (t, s) => (f(), i(e, { key: t.key || `_${s}` }, [t.type === "separator" ? (f(), n(_(T), {
|
|
49
50
|
key: 0,
|
|
50
51
|
class: "k-dropdown-sep"
|
|
51
|
-
})) : t.type === "label" ? (
|
|
52
|
+
})) : t.type === "label" ? (f(), n(_(S), {
|
|
52
53
|
key: 1,
|
|
53
54
|
class: "k-dropdown-label"
|
|
54
55
|
}, {
|
|
55
|
-
default:
|
|
56
|
+
default: y(() => [o(g(t.label), 1)]),
|
|
56
57
|
_: 2
|
|
57
|
-
}, 1024)) : (
|
|
58
|
+
}, 1024)) : (f(), n(_(x), {
|
|
58
59
|
key: 2,
|
|
59
|
-
class:
|
|
60
|
+
class: d(["k-dropdown-item k-menu-item", {
|
|
60
61
|
"k-dropdown-item--danger": t.danger,
|
|
61
62
|
"k-dropdown-item--active": t.active
|
|
62
63
|
}]),
|
|
63
64
|
disabled: t.disabled,
|
|
64
|
-
onSelect: (e) =>
|
|
65
|
+
onSelect: (e) => N(t)
|
|
65
66
|
}, {
|
|
66
|
-
default:
|
|
67
|
-
t.icon ? (
|
|
67
|
+
default: y(() => [
|
|
68
|
+
t.icon ? (f(), n(h(t.icon), {
|
|
68
69
|
key: 0,
|
|
69
70
|
size: 15,
|
|
70
71
|
class: "k-dropdown-item__icon"
|
|
71
72
|
})) : r("", !0),
|
|
72
|
-
a("span",
|
|
73
|
-
t.shortcut ? (
|
|
73
|
+
a("span", D, g(t.label), 1),
|
|
74
|
+
t.shortcut ? (f(), i("span", O, g(t.shortcut), 1)) : r("", !0)
|
|
74
75
|
]),
|
|
75
76
|
_: 2
|
|
76
77
|
}, 1032, [
|
|
77
78
|
"class",
|
|
78
79
|
"disabled",
|
|
79
80
|
"onSelect"
|
|
80
|
-
]))], 64))), 128)),
|
|
81
|
+
]))], 64))), 128)), m(t.$slots, "extra")]),
|
|
81
82
|
_: 3
|
|
82
83
|
}, 8, [
|
|
83
84
|
"class",
|
|
@@ -92,4 +93,4 @@ var E = { class: "k-dropdown-item__label" }, D = {
|
|
|
92
93
|
}
|
|
93
94
|
});
|
|
94
95
|
//#endregion
|
|
95
|
-
export {
|
|
96
|
+
export { k as default };
|
|
@@ -2,6 +2,6 @@ import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
|
2
2
|
import t from "./KImageViewer.vue_vue_type_script_setup_true_lang.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
//#region components/KImageViewer.vue
|
|
5
|
-
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-
|
|
5
|
+
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-2a679196"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { n as default };
|
|
@@ -22,9 +22,9 @@ var w = ["disabled"], T = [
|
|
|
22
22
|
h(() => j.open, (e) => {
|
|
23
23
|
if (e) {
|
|
24
24
|
let e = Math.max(0, j.images.length - 1);
|
|
25
|
-
N.value = Math.min(Math.max(0, j.initial), e), P.value = 1, F.value = 0, window.addEventListener("keydown", W);
|
|
26
|
-
} else window.removeEventListener("keydown", W);
|
|
27
|
-
}), u(() => window.removeEventListener("keydown", W));
|
|
25
|
+
N.value = Math.min(Math.max(0, j.initial), e), P.value = 1, F.value = 0, window.addEventListener("keydown", W, !0);
|
|
26
|
+
} else window.removeEventListener("keydown", W, !0);
|
|
27
|
+
}), u(() => window.removeEventListener("keydown", W, !0));
|
|
28
28
|
function I() {
|
|
29
29
|
M("update:open", !1);
|
|
30
30
|
}
|
|
@@ -51,7 +51,7 @@ var w = ["disabled"], T = [
|
|
|
51
51
|
P.value = Math.min(4, Math.max(.5, +(P.value + t).toFixed(2)));
|
|
52
52
|
}
|
|
53
53
|
function W(e) {
|
|
54
|
-
j.open && (e.key === "Escape" ? I() : e.key === "ArrowLeft" ? L() : e.key === "ArrowRight" && R());
|
|
54
|
+
j.open && (e.key === "Escape" ? (e.stopPropagation(), I()) : e.key === "ArrowLeft" ? (e.stopPropagation(), L()) : e.key === "ArrowRight" && (e.stopPropagation(), R()));
|
|
55
55
|
}
|
|
56
56
|
let G = n(() => ({ transform: `scale(${P.value}) rotate(${F.value}deg)` }));
|
|
57
57
|
return (n, u) => (d(), r(e, { to: "body" }, [s(t, { name: "k-viewer" }, {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { createBlock as e, createCommentVNode as t, createVNode as n, defineComponent as r, mergeModels as i,
|
|
2
|
-
import { PopoverArrow as
|
|
1
|
+
import { createBlock as e, createCommentVNode as t, createVNode as n, defineComponent as r, mergeModels as i, mergeProps as a, normalizeClass as o, openBlock as s, renderSlot as c, unref as l, useModel as u, withCtx as d } from "vue";
|
|
2
|
+
import { PopoverArrow as f, PopoverContent as p, PopoverPortal as m, PopoverRoot as h, PopoverTrigger as g } from "reka-ui";
|
|
3
3
|
//#region components/KPopover.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var
|
|
4
|
+
var _ = /* @__PURE__ */ r({
|
|
5
|
+
inheritAttrs: !1,
|
|
5
6
|
__name: "KPopover",
|
|
6
7
|
props: /* @__PURE__ */ i({
|
|
7
8
|
side: { default: "bottom" },
|
|
@@ -22,25 +23,25 @@ var g = /* @__PURE__ */ r({
|
|
|
22
23
|
}),
|
|
23
24
|
emits: ["update:open"],
|
|
24
25
|
setup(r) {
|
|
25
|
-
let i =
|
|
26
|
-
return (
|
|
26
|
+
let i = u(r, "open");
|
|
27
|
+
return (u, _) => (s(), e(l(h), {
|
|
27
28
|
open: i.value,
|
|
28
|
-
"onUpdate:open":
|
|
29
|
+
"onUpdate:open": _[0] ||= (e) => i.value = e
|
|
29
30
|
}, {
|
|
30
|
-
default:
|
|
31
|
+
default: d(() => [n(l(g), a(u.$attrs, {
|
|
31
32
|
"as-child": "",
|
|
32
33
|
disabled: r.disabled
|
|
33
|
-
}, {
|
|
34
|
-
default:
|
|
34
|
+
}), {
|
|
35
|
+
default: d(() => [c(u.$slots, "default")]),
|
|
35
36
|
_: 3
|
|
36
|
-
},
|
|
37
|
-
default:
|
|
38
|
-
class:
|
|
37
|
+
}, 16, ["disabled"]), n(l(m), null, {
|
|
38
|
+
default: d(() => [n(l(p), {
|
|
39
|
+
class: o(["k-popover-content", r.contentClass]),
|
|
39
40
|
side: r.side,
|
|
40
41
|
align: r.align,
|
|
41
42
|
"side-offset": r.sideOffset
|
|
42
43
|
}, {
|
|
43
|
-
default:
|
|
44
|
+
default: d(() => [c(u.$slots, "content", { close: () => i.value = !1 }), r.showArrow ? (s(), e(l(f), {
|
|
44
45
|
key: 0,
|
|
45
46
|
class: "k-popover-arrow",
|
|
46
47
|
width: 11,
|
|
@@ -60,4 +61,4 @@ var g = /* @__PURE__ */ r({
|
|
|
60
61
|
}
|
|
61
62
|
});
|
|
62
63
|
//#endregion
|
|
63
|
-
export {
|
|
64
|
+
export { _ as default };
|
|
@@ -4,6 +4,6 @@ import t from "./KSelect.vue_vue_type_script_setup_true_lang.js";
|
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
6
|
//#region components/KSelect.vue
|
|
7
|
-
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-
|
|
7
|
+
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-fa7ff6ee"]]);
|
|
8
8
|
//#endregion
|
|
9
9
|
export { n as default };
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c,
|
|
2
|
-
import { Check as
|
|
3
|
-
import { SelectContent as
|
|
1
|
+
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, mergeProps as l, normalizeClass as u, openBlock as d, ref as f, renderList as p, toDisplayString as m, unref as h, vModelText as g, withCtx as _, withDirectives as v, withModifiers as y } from "vue";
|
|
2
|
+
import { Check as b, ChevronDown as x, X as S } from "lucide-vue-next";
|
|
3
|
+
import { SelectContent as C, SelectIcon as w, SelectItem as T, SelectItemIndicator as E, SelectItemText as D, SelectPortal as O, SelectRoot as k, SelectTrigger as A, SelectValue as j, SelectViewport as M } from "reka-ui";
|
|
4
4
|
//#region components/KSelect.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var
|
|
5
|
+
var N = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "k-select-search"
|
|
8
|
-
},
|
|
8
|
+
}, P = ["placeholder"], F = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "k-select-hint"
|
|
11
|
-
},
|
|
11
|
+
}, I = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "k-select-empty"
|
|
14
|
-
},
|
|
14
|
+
}, L = /* @__PURE__ */ c({
|
|
15
|
+
inheritAttrs: !1,
|
|
15
16
|
__name: "KSelect",
|
|
16
17
|
props: {
|
|
17
18
|
modelValue: {},
|
|
@@ -33,96 +34,96 @@ var M = {
|
|
|
33
34
|
filterPlaceholder: { default: "搜索" }
|
|
34
35
|
},
|
|
35
36
|
emits: ["update:modelValue"],
|
|
36
|
-
setup(c, { emit:
|
|
37
|
-
let
|
|
38
|
-
function
|
|
37
|
+
setup(c, { emit: L }) {
|
|
38
|
+
let R = c, z = L, B = t(() => R.modelValue == null || R.modelValue === "" ? "__none__" : String(R.modelValue)), V = t(() => R.size === "tiny" || R.size === "xs" || R.size === "small" || R.size === "sm" ? "sm" : R.size === "large" || R.size === "lg" ? "lg" : "md");
|
|
39
|
+
function H(e) {
|
|
39
40
|
let t = e === "__none__" ? "" : e ?? "";
|
|
40
|
-
typeof
|
|
41
|
+
typeof R.modelValue == "number" && t !== "" && /^-?\d+(\.\d+)?$/.test(t) ? z("update:modelValue", Number(t)) : z("update:modelValue", t);
|
|
41
42
|
}
|
|
42
|
-
let
|
|
43
|
-
let e =
|
|
44
|
-
return
|
|
45
|
-
}),
|
|
46
|
-
let e =
|
|
47
|
-
return !
|
|
48
|
-
}),
|
|
43
|
+
let U = t(() => {
|
|
44
|
+
let e = R.modelValue == null ? "" : String(R.modelValue);
|
|
45
|
+
return R.options.find((t) => String(t.value) === e)?.label ?? R.placeholder ?? "请选择";
|
|
46
|
+
}), W = f(""), G = t(() => {
|
|
47
|
+
let e = W.value.trim().toLowerCase();
|
|
48
|
+
return !R.filterable || !e ? R.options : R.options.filter((t) => `${t.label} ${t.value} ${t.hint ?? ""}`.toLowerCase().includes(e));
|
|
49
|
+
}), K = t(() => G.value.some((e) => e.value === "") ? G.value.map((e) => e.value === "" ? {
|
|
49
50
|
...e,
|
|
50
51
|
value: "__none__"
|
|
51
|
-
} : e) :
|
|
52
|
-
function q() {
|
|
53
|
-
K.value = !1, U.value = "";
|
|
54
|
-
}
|
|
52
|
+
} : e) : G.value), q = f(!1);
|
|
55
53
|
function J() {
|
|
56
|
-
|
|
54
|
+
q.value = !1, W.value = "";
|
|
55
|
+
}
|
|
56
|
+
function Y() {
|
|
57
|
+
q.value = !0;
|
|
57
58
|
}
|
|
58
|
-
function
|
|
59
|
-
e.preventDefault(), e.stopPropagation(),
|
|
59
|
+
function X(e) {
|
|
60
|
+
e.preventDefault(), e.stopPropagation(), z("update:modelValue", "");
|
|
60
61
|
}
|
|
61
|
-
let
|
|
62
|
-
return (t,
|
|
63
|
-
"model-value":
|
|
62
|
+
let Z = t(() => R.clearable && !R.disabled && R.modelValue !== null && R.modelValue !== void 0 && R.modelValue !== "");
|
|
63
|
+
return (t, f) => (d(), n(h(k), {
|
|
64
|
+
"model-value": B.value,
|
|
64
65
|
disabled: c.disabled,
|
|
65
|
-
"onUpdate:open":
|
|
66
|
-
"onUpdate:modelValue":
|
|
66
|
+
"onUpdate:open": J,
|
|
67
|
+
"onUpdate:modelValue": f[4] ||= (e) => H(e)
|
|
67
68
|
}, {
|
|
68
|
-
default:
|
|
69
|
-
default:
|
|
70
|
-
s(
|
|
71
|
-
default:
|
|
69
|
+
default: _(() => [s(h(A), l(t.$attrs, { class: ["k-select-trigger", [`k-select-trigger--${V.value}`, { "k-select-trigger--disabled": c.disabled }]] }), {
|
|
70
|
+
default: _(() => [
|
|
71
|
+
s(h(j), null, {
|
|
72
|
+
default: _(() => [o(m(U.value), 1)]),
|
|
72
73
|
_: 1
|
|
73
74
|
}),
|
|
74
|
-
|
|
75
|
+
Z.value ? (d(), i("span", {
|
|
75
76
|
key: 0,
|
|
76
77
|
role: "button",
|
|
77
78
|
class: "k-select-clear",
|
|
78
79
|
tabindex: "-1",
|
|
79
80
|
"aria-label": "清空",
|
|
80
|
-
onPointerdown:
|
|
81
|
-
onClick:
|
|
82
|
-
}, [s(
|
|
83
|
-
s(
|
|
84
|
-
default:
|
|
81
|
+
onPointerdown: f[0] ||= y(() => {}, ["stop", "prevent"]),
|
|
82
|
+
onClick: X
|
|
83
|
+
}, [s(h(S), { size: 11 })], 32)) : r("", !0),
|
|
84
|
+
s(h(w), { class: "k-select-icon" }, {
|
|
85
|
+
default: _(() => [s(h(x), { size: 14 })]),
|
|
85
86
|
_: 1
|
|
86
87
|
})
|
|
87
88
|
]),
|
|
88
89
|
_: 1
|
|
89
|
-
},
|
|
90
|
-
default:
|
|
91
|
-
class:
|
|
90
|
+
}, 16, ["class"]), s(h(O), null, {
|
|
91
|
+
default: _(() => [s(h(C), {
|
|
92
|
+
class: u(["k-select-content k-menu-surface", { "k-select-content--navigating": q.value }]),
|
|
92
93
|
position: "popper",
|
|
93
94
|
"side-offset": 6,
|
|
94
95
|
align: "start",
|
|
95
96
|
"body-lock": !1,
|
|
96
97
|
"disable-outside-pointer-events": !1,
|
|
97
|
-
onPointermove:
|
|
98
|
-
onKeydown:
|
|
98
|
+
onPointermove: Y,
|
|
99
|
+
onKeydown: Y
|
|
99
100
|
}, {
|
|
100
|
-
default:
|
|
101
|
-
"onUpdate:modelValue":
|
|
101
|
+
default: _(() => [c.filterable ? (d(), i("div", N, [v(a("input", {
|
|
102
|
+
"onUpdate:modelValue": f[1] ||= (e) => W.value = e,
|
|
102
103
|
class: "k-select-search__input",
|
|
103
104
|
placeholder: c.filterPlaceholder,
|
|
104
|
-
onKeydown:
|
|
105
|
-
onPointerdown:
|
|
106
|
-
}, null, 40,
|
|
107
|
-
default:
|
|
105
|
+
onKeydown: f[2] ||= y(() => {}, ["stop"]),
|
|
106
|
+
onPointerdown: f[3] ||= y(() => {}, ["stop"])
|
|
107
|
+
}, null, 40, P), [[g, W.value]])])) : r("", !0), s(h(M), { class: "k-select-viewport" }, {
|
|
108
|
+
default: _(() => [(d(!0), i(e, null, p(K.value, (e) => (d(), n(h(T), {
|
|
108
109
|
key: e.value,
|
|
109
110
|
value: String(e.value),
|
|
110
111
|
disabled: e.disabled,
|
|
111
112
|
class: "k-select-item k-menu-item"
|
|
112
113
|
}, {
|
|
113
|
-
default:
|
|
114
|
-
s(
|
|
115
|
-
default:
|
|
114
|
+
default: _(() => [
|
|
115
|
+
s(h(E), { class: "k-select-indicator" }, {
|
|
116
|
+
default: _(() => [s(h(b), { size: 12 })]),
|
|
116
117
|
_: 1
|
|
117
118
|
}),
|
|
118
|
-
s(
|
|
119
|
-
default:
|
|
119
|
+
s(h(D), null, {
|
|
120
|
+
default: _(() => [o(m(e.label), 1)]),
|
|
120
121
|
_: 2
|
|
121
122
|
}, 1024),
|
|
122
|
-
e.hint ? (
|
|
123
|
+
e.hint ? (d(), i("span", F, m(e.hint), 1)) : r("", !0)
|
|
123
124
|
]),
|
|
124
125
|
_: 2
|
|
125
|
-
}, 1032, ["value", "disabled"]))), 128)),
|
|
126
|
+
}, 1032, ["value", "disabled"]))), 128)), K.value.length === 0 ? (d(), i("div", I, " 无匹配项 ")) : r("", !0)]),
|
|
126
127
|
_: 1
|
|
127
128
|
})]),
|
|
128
129
|
_: 1
|
|
@@ -134,4 +135,4 @@ var M = {
|
|
|
134
135
|
}
|
|
135
136
|
});
|
|
136
137
|
//#endregion
|
|
137
|
-
export {
|
|
138
|
+
export { L as default };
|
|
@@ -3,6 +3,6 @@ import t from "./KTimePicker.vue_vue_type_script_setup_true_lang.js";
|
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
//#region components/KTimePicker.vue
|
|
6
|
-
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-
|
|
6
|
+
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-e7dc0de0"]]);
|
|
7
7
|
//#endregion
|
|
8
8
|
export { n as default };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createVNode as o, defineComponent as s,
|
|
2
|
-
import { Clock as
|
|
3
|
-
import { PopoverContent as
|
|
1
|
+
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createVNode as o, defineComponent as s, mergeProps as c, normalizeClass as l, openBlock as u, ref as d, renderList as f, toDisplayString as p, unref as m, withCtx as h } from "vue";
|
|
2
|
+
import { Clock as g, X as _ } from "lucide-vue-next";
|
|
3
|
+
import { PopoverContent as v, PopoverPortal as y, PopoverRoot as b, PopoverTrigger as x } from "reka-ui";
|
|
4
4
|
//#region components/KTimePicker.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var
|
|
5
|
+
var S = ["disabled"], C = { class: "k-tp-field__text" }, w = { class: "k-tp-col" }, T = ["onClick"], E = { class: "k-tp-col" }, D = ["onClick"], O = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "k-tp-col"
|
|
8
|
-
},
|
|
8
|
+
}, k = ["onClick"], A = /* @__PURE__ */ s({
|
|
9
|
+
inheritAttrs: !1,
|
|
9
10
|
__name: "KTimePicker",
|
|
10
11
|
props: {
|
|
11
12
|
modelValue: {},
|
|
@@ -24,9 +25,9 @@ var x = ["disabled"], S = { class: "k-tp-field__text" }, C = { class: "k-tp-col"
|
|
|
24
25
|
placeholder: { default: "选择时间" }
|
|
25
26
|
},
|
|
26
27
|
emits: ["update:modelValue"],
|
|
27
|
-
setup(s, { emit:
|
|
28
|
-
let
|
|
29
|
-
let e =
|
|
28
|
+
setup(s, { emit: A }) {
|
|
29
|
+
let j = s, M = A, N = d(!1), P = (e) => String(e).padStart(2, "0"), F = Array.from({ length: 24 }, (e, t) => t), I = Array.from({ length: 60 }, (e, t) => t), L = Array.from({ length: 60 }, (e, t) => t), R = t(() => {
|
|
30
|
+
let e = j.modelValue;
|
|
30
31
|
if (!e) return {
|
|
31
32
|
h: null,
|
|
32
33
|
m: null,
|
|
@@ -39,70 +40,70 @@ var x = ["disabled"], S = { class: "k-tp-field__text" }, C = { class: "k-tp-col"
|
|
|
39
40
|
s: Number.isNaN(r) ? null : r
|
|
40
41
|
};
|
|
41
42
|
});
|
|
42
|
-
function
|
|
43
|
-
|
|
43
|
+
function z(e, t, n) {
|
|
44
|
+
M("update:modelValue", j.useSeconds ? `${P(e ?? 0)}:${P(t ?? 0)}:${P(n ?? 0)}` : `${P(e ?? 0)}:${P(t ?? 0)}`);
|
|
44
45
|
}
|
|
45
|
-
function
|
|
46
|
-
let n =
|
|
47
|
-
|
|
46
|
+
function B(e, t) {
|
|
47
|
+
let n = R.value;
|
|
48
|
+
z(e === "h" ? t : n.h, e === "m" ? t : n.m, e === "s" ? t : n.s);
|
|
48
49
|
}
|
|
49
|
-
function
|
|
50
|
-
e.stopPropagation(),
|
|
50
|
+
function V(e) {
|
|
51
|
+
e.stopPropagation(), M("update:modelValue", null);
|
|
51
52
|
}
|
|
52
|
-
return (t,
|
|
53
|
-
open:
|
|
54
|
-
"onUpdate:open":
|
|
53
|
+
return (t, d) => (u(), n(m(b), {
|
|
54
|
+
open: N.value,
|
|
55
|
+
"onUpdate:open": d[0] ||= (e) => N.value = e
|
|
55
56
|
}, {
|
|
56
|
-
default:
|
|
57
|
+
default: h(() => [o(m(x), {
|
|
57
58
|
"as-child": "",
|
|
58
59
|
disabled: s.disabled
|
|
59
60
|
}, {
|
|
60
|
-
default:
|
|
61
|
+
default: h(() => [a("button", c(t.$attrs, {
|
|
61
62
|
type: "button",
|
|
62
|
-
class:
|
|
63
|
+
class: ["k-tp-field", {
|
|
63
64
|
"k-tp-field--disabled": s.disabled,
|
|
64
65
|
"k-tp-field--placeholder": !s.modelValue
|
|
65
|
-
}]
|
|
66
|
+
}],
|
|
66
67
|
disabled: s.disabled
|
|
67
|
-
}, [
|
|
68
|
-
o(
|
|
68
|
+
}), [
|
|
69
|
+
o(m(g), {
|
|
69
70
|
size: 15,
|
|
70
71
|
class: "k-tp-field__icon"
|
|
71
72
|
}),
|
|
72
|
-
a("span",
|
|
73
|
-
s.clearable && s.modelValue && !s.disabled ? (
|
|
73
|
+
a("span", C, p(s.modelValue || s.placeholder), 1),
|
|
74
|
+
s.clearable && s.modelValue && !s.disabled ? (u(), n(m(_), {
|
|
74
75
|
key: 0,
|
|
75
76
|
size: 14,
|
|
76
77
|
class: "k-tp-field__clear",
|
|
77
|
-
onClick:
|
|
78
|
+
onClick: V
|
|
78
79
|
})) : r("", !0)
|
|
79
|
-
],
|
|
80
|
+
], 16, S)]),
|
|
80
81
|
_: 1
|
|
81
|
-
}, 8, ["disabled"]), o(
|
|
82
|
-
default:
|
|
82
|
+
}, 8, ["disabled"]), o(m(y), null, {
|
|
83
|
+
default: h(() => [o(m(v), {
|
|
83
84
|
class: "k-menu-surface k-tp-panel",
|
|
84
85
|
"side-offset": 6,
|
|
85
86
|
align: "start"
|
|
86
87
|
}, {
|
|
87
|
-
default:
|
|
88
|
-
a("div",
|
|
88
|
+
default: h(() => [
|
|
89
|
+
a("div", w, [(u(!0), i(e, null, f(m(F), (e) => (u(), i("button", {
|
|
89
90
|
key: `h${e}`,
|
|
90
91
|
type: "button",
|
|
91
|
-
class:
|
|
92
|
-
onClick: (t) =>
|
|
93
|
-
},
|
|
94
|
-
a("div",
|
|
92
|
+
class: l(["k-tp-cell", { "k-tp-cell--active": R.value.h === e }]),
|
|
93
|
+
onClick: (t) => B("h", e)
|
|
94
|
+
}, p(P(e)), 11, T))), 128))]),
|
|
95
|
+
a("div", E, [(u(!0), i(e, null, f(m(I), (e) => (u(), i("button", {
|
|
95
96
|
key: `m${e}`,
|
|
96
97
|
type: "button",
|
|
97
|
-
class:
|
|
98
|
-
onClick: (t) =>
|
|
99
|
-
},
|
|
100
|
-
s.useSeconds ? (
|
|
98
|
+
class: l(["k-tp-cell", { "k-tp-cell--active": R.value.m === e }]),
|
|
99
|
+
onClick: (t) => B("m", e)
|
|
100
|
+
}, p(P(e)), 11, D))), 128))]),
|
|
101
|
+
s.useSeconds ? (u(), i("div", O, [(u(!0), i(e, null, f(m(L), (e) => (u(), i("button", {
|
|
101
102
|
key: `s${e}`,
|
|
102
103
|
type: "button",
|
|
103
|
-
class:
|
|
104
|
-
onClick: (t) =>
|
|
105
|
-
},
|
|
104
|
+
class: l(["k-tp-cell", { "k-tp-cell--active": R.value.s === e }]),
|
|
105
|
+
onClick: (t) => B("s", e)
|
|
106
|
+
}, p(P(e)), 11, k))), 128))])) : r("", !0)
|
|
106
107
|
]),
|
|
107
108
|
_: 1
|
|
108
109
|
})]),
|
|
@@ -113,4 +114,4 @@ var x = ["disabled"], S = { class: "k-tp-field__text" }, C = { class: "k-tp-col"
|
|
|
113
114
|
}
|
|
114
115
|
});
|
|
115
116
|
//#endregion
|
|
116
|
-
export {
|
|
117
|
+
export { A as default };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { createBlock as e, createTextVNode as t, createVNode as n, defineComponent as r,
|
|
2
|
-
import { TooltipArrow as
|
|
1
|
+
import { createBlock as e, createTextVNode as t, createVNode as n, defineComponent as r, mergeProps as i, openBlock as a, renderSlot as o, toDisplayString as s, unref as c, withCtx as l } from "vue";
|
|
2
|
+
import { TooltipArrow as u, TooltipContent as d, TooltipPortal as f, TooltipProvider as p, TooltipRoot as m, TooltipTrigger as h } from "reka-ui";
|
|
3
3
|
//#region components/KTooltip.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var
|
|
4
|
+
var g = /* @__PURE__ */ r({
|
|
5
|
+
inheritAttrs: !1,
|
|
5
6
|
__name: "KTooltip",
|
|
6
7
|
props: {
|
|
7
8
|
label: {},
|
|
@@ -13,24 +14,24 @@ var h = /* @__PURE__ */ r({
|
|
|
13
14
|
}
|
|
14
15
|
},
|
|
15
16
|
setup(r) {
|
|
16
|
-
return (
|
|
17
|
+
return (g, _) => (a(), e(c(p), {
|
|
17
18
|
"delay-duration": r.delayMs,
|
|
18
19
|
"skip-delay-duration": 200
|
|
19
20
|
}, {
|
|
20
|
-
default:
|
|
21
|
-
default:
|
|
21
|
+
default: l(() => [n(c(m), null, {
|
|
22
|
+
default: l(() => [n(c(h), i(g.$attrs, {
|
|
22
23
|
"as-child": "",
|
|
23
24
|
disabled: r.disabled
|
|
24
|
-
}, {
|
|
25
|
-
default:
|
|
25
|
+
}), {
|
|
26
|
+
default: l(() => [o(g.$slots, "default")]),
|
|
26
27
|
_: 3
|
|
27
|
-
},
|
|
28
|
-
default:
|
|
28
|
+
}, 16, ["disabled"]), n(c(f), null, {
|
|
29
|
+
default: l(() => [n(c(d), {
|
|
29
30
|
side: r.side,
|
|
30
31
|
"side-offset": 6,
|
|
31
32
|
class: "k-tooltip pointer-events-none z-50 select-none rounded-md bg-ink-900 px-2 py-1 text-[11px] font-medium text-ink-50 shadow-md will-change-[transform,opacity]"
|
|
32
33
|
}, {
|
|
33
|
-
default:
|
|
34
|
+
default: l(() => [t(s(r.label) + " ", 1), n(c(u), {
|
|
34
35
|
class: "fill-ink-900",
|
|
35
36
|
width: 8,
|
|
36
37
|
height: 4
|
|
@@ -46,4 +47,4 @@ var h = /* @__PURE__ */ r({
|
|
|
46
47
|
}
|
|
47
48
|
});
|
|
48
49
|
//#endregion
|
|
49
|
-
export {
|
|
50
|
+
export { g as default };
|
|
@@ -3,6 +3,6 @@ import t from "./KTreeSelect.vue_vue_type_script_setup_true_lang.js";
|
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
//#region components/KTreeSelect.vue
|
|
6
|
-
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-
|
|
6
|
+
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-b172871d"]]);
|
|
7
7
|
//#endregion
|
|
8
8
|
export { n as default };
|