@guoyg578/k-ui 0.1.0 → 0.1.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/README.md +66 -22
- package/dist/components/KAlert.vue.d.ts +1 -1
- package/dist/components/{KAlert.js → KAlert.vue.js} +2 -2
- package/dist/components/KAlert.vue_vue_type_script_setup_true_lang.js +35 -32
- package/dist/components/{KAvatar.js → KAvatar.vue.js} +1 -1
- package/dist/components/{KAvatarGroup.js → KAvatarGroup.vue.js} +1 -1
- package/dist/components/KBreadcrumb.vue.d.ts +30 -1
- package/dist/components/{KBreadcrumb.js → KBreadcrumb.vue.js} +2 -2
- package/dist/components/KBreadcrumb.vue_vue_type_script_setup_true_lang.js +36 -21
- package/dist/components/KButton.vue.d.ts +17 -2
- package/dist/components/{KButton.js → KButton.vue.js} +2 -2
- package/dist/components/KButton.vue_vue_type_script_setup_true_lang.js +51 -17
- package/dist/components/KCard.vue.d.ts +5 -3
- package/dist/components/{KCard.js → KCard.vue.js} +2 -2
- package/dist/components/KCard.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/{KCarousel.js → KCarousel.vue.js} +1 -1
- package/dist/components/{KCheckbox.js → KCheckbox.vue.js} +1 -1
- package/dist/components/{KCheckboxGroup.js → KCheckboxGroup.vue.js} +1 -1
- package/dist/components/KColorPicker.vue.d.ts +40 -0
- package/dist/components/KColorPicker.vue.js +7 -0
- package/dist/components/KColorPicker.vue_vue_type_script_setup_true_lang.js +96 -0
- package/dist/components/{KCombobox.js → KCombobox.vue.js} +2 -2
- package/dist/components/{KCommandPalette.js → KCommandPalette.vue.js} +1 -1
- package/dist/components/KConfigProvider.vue.d.ts +26 -0
- package/dist/components/KConfigProvider.vue.js +5 -0
- package/dist/components/KConfigProvider.vue_vue_type_script_setup_true_lang.js +17 -0
- package/dist/components/{KConfirmDialog.js → KConfirmDialog.vue.js} +1 -1
- package/dist/components/KDataTable.vue.d.ts +33 -10
- package/dist/components/{KDataTable.js → KDataTable.vue.js} +2 -2
- package/dist/components/KDataTable.vue_vue_type_script_setup_true_lang.js +128 -30
- package/dist/components/{KDatePicker.js → KDatePicker.vue.js} +1 -1
- package/dist/components/KDatePicker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/KDescriptions.vue.d.ts +30 -0
- package/dist/components/KDescriptions.vue.js +6 -0
- package/dist/components/KDescriptions.vue_vue_type_script_setup_true_lang.js +30 -0
- package/dist/components/KDescriptionsItem.vue.d.ts +17 -0
- package/dist/components/KDescriptionsItem.vue.js +5 -0
- package/dist/components/KDescriptionsItem.vue_vue_type_script_setup_true_lang.js +17 -0
- package/dist/components/KDialog.vue.d.ts +1 -0
- package/dist/components/{KDialog.js → KDialog.vue.js} +2 -2
- package/dist/components/KDialog.vue_vue_type_script_setup_true_lang.js +45 -38
- package/dist/components/{KDiff.js → KDiff.vue.js} +1 -1
- package/dist/components/KDrawer.vue.d.ts +7 -3
- package/dist/components/{KDrawer.js → KDrawer.vue.js} +2 -2
- package/dist/components/KDrawer.vue_vue_type_script_setup_true_lang.js +41 -29
- package/dist/components/KDropdown.vue.d.ts +7 -4
- package/dist/components/{KDropdown.js → KDropdown.vue.js} +2 -2
- package/dist/components/KDropdown.vue_vue_type_script_setup_true_lang.js +40 -38
- package/dist/components/KEmpty.vue.d.ts +8 -4
- package/dist/components/KEmpty.vue_vue_type_script_setup_true_lang.js +17 -14
- package/dist/components/KForm.vue.d.ts +12 -6
- package/dist/components/{KForm.js → KForm.vue.js} +2 -2
- package/dist/components/KForm.vue_vue_type_script_setup_true_lang.js +31 -15
- package/dist/components/KFormField.vue.d.ts +3 -2
- package/dist/components/{KFormField.js → KFormField.vue.js} +2 -2
- package/dist/components/KFormField.vue_vue_type_script_setup_true_lang.js +41 -28
- package/dist/components/KIcon.vue.d.ts +22 -0
- package/dist/components/KIcon.vue.js +7 -0
- package/dist/components/KIcon.vue_vue_type_script_setup_true_lang.js +31 -0
- package/dist/components/KImage.vue.d.ts +3 -3
- package/dist/components/{KImage.js → KImage.vue.js} +1 -1
- package/dist/components/KImage.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/{KImageViewer.js → KImageViewer.vue.js} +1 -1
- package/dist/components/KInput.vue.d.ts +11 -5
- package/dist/components/{KInput.js → KInput.vue.js} +2 -2
- package/dist/components/KInput.vue_vue_type_script_setup_true_lang.js +62 -38
- package/dist/components/KInputNumber.vue.d.ts +18 -4
- package/dist/components/{KInputNumber.js → KInputNumber.vue.js} +2 -2
- package/dist/components/KInputNumber.vue_vue_type_script_setup_true_lang.js +80 -62
- package/dist/components/{KLoadingOverlay.js → KLoadingOverlay.vue.js} +1 -1
- package/dist/components/KMessage.js +1 -1
- package/dist/components/{KMessageContainer.js → KMessageContainer.vue.js} +1 -1
- package/dist/components/KNotification.d.ts +36 -0
- package/dist/components/KNotification.js +55 -0
- package/dist/components/KNotificationContainer.vue.d.ts +20 -0
- package/dist/components/KNotificationContainer.vue.js +7 -0
- package/dist/components/KNotificationContainer.vue_vue_type_script_setup_true_lang.js +63 -0
- package/dist/components/KNotificationProvider.vue.d.ts +13 -0
- package/dist/components/KNotificationProvider.vue.js +10 -0
- package/dist/components/{KPagination.js → KPagination.vue.js} +1 -1
- package/dist/components/KPopconfirm.vue.d.ts +46 -0
- package/dist/components/KPopconfirm.vue.js +6 -0
- package/dist/components/KPopconfirm.vue_vue_type_script_setup_true_lang.js +81 -0
- package/dist/components/{KPopover.js → KPopover.vue.js} +1 -1
- package/dist/components/KProgress.vue.d.ts +3 -2
- package/dist/components/{KProgress.js → KProgress.vue.js} +2 -2
- package/dist/components/KProgress.vue_vue_type_script_setup_true_lang.js +23 -20
- package/dist/components/{KRadio.js → KRadio.vue.js} +1 -1
- package/dist/components/{KRadioGroup.js → KRadioGroup.vue.js} +1 -1
- package/dist/components/{KResizablePanel.js → KResizablePanel.vue.js} +1 -1
- package/dist/components/{KResult.js → KResult.vue.js} +1 -1
- package/dist/components/KSelect.vue.d.ts +10 -3
- package/dist/components/{KSelect.js → KSelect.vue.js} +4 -4
- package/dist/components/KSelect.vue_vue_type_script_setup_true_lang.js +89 -48
- package/dist/components/{KSkeleton.js → KSkeleton.vue.js} +1 -1
- package/dist/components/KSlider.vue.d.ts +24 -0
- package/dist/components/KSlider.vue.js +7 -0
- package/dist/components/KSlider.vue_vue_type_script_setup_true_lang.js +82 -0
- package/dist/components/KSpin.vue.d.ts +23 -0
- package/dist/components/KSpin.vue.js +7 -0
- package/dist/components/KSpin.vue_vue_type_script_setup_true_lang.js +35 -0
- package/dist/components/KSteps.vue.d.ts +1 -1
- package/dist/components/{KSteps.js → KSteps.vue.js} +1 -1
- package/dist/components/KSwitch.vue.d.ts +2 -2
- package/dist/components/{KSwitch.js → KSwitch.vue.js} +2 -2
- package/dist/components/KSwitch.vue_vue_type_script_setup_true_lang.js +12 -11
- package/dist/components/KTabs.vue.d.ts +10 -5
- package/dist/components/{KTabs.js → KTabs.vue.js} +2 -2
- package/dist/components/KTabs.vue_vue_type_script_setup_true_lang.js +31 -21
- package/dist/components/KTag.vue.d.ts +3 -3
- package/dist/components/{KTag.js → KTag.vue.js} +2 -2
- package/dist/components/KTag.vue_vue_type_script_setup_true_lang.js +14 -13
- package/dist/components/KTextarea.vue.d.ts +17 -2
- package/dist/components/{KTextarea.js → KTextarea.vue.js} +2 -2
- package/dist/components/KTextarea.vue_vue_type_script_setup_true_lang.js +51 -22
- package/dist/components/{KThemeToggleButton.js → KThemeToggleButton.vue.js} +1 -1
- package/dist/components/{KTooltip.js → KTooltip.vue.js} +1 -1
- package/dist/components/{KTreeNode.js → KTreeNode.vue.js} +1 -1
- package/dist/components/{KTreeView.js → KTreeView.vue.js} +1 -1
- package/dist/components/KTreeView.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/KUpload.vue.d.ts +100 -4
- package/dist/components/{KUpload.js → KUpload.vue.js} +2 -2
- package/dist/components/KUpload.vue_vue_type_script_setup_true_lang.js +189 -94
- package/dist/components/KUploadDragger.vue.d.ts +13 -0
- package/dist/components/KUploadDragger.vue.js +7 -0
- package/dist/components/KUploadDragger.vue_vue_type_script_setup_true_lang.js +12 -0
- package/dist/components/{KVirtualList.js → KVirtualList.vue.js} +1 -1
- package/dist/components/form-context.d.ts +7 -3
- package/dist/components/upload-context.d.ts +6 -0
- package/dist/components/upload-context.js +4 -0
- package/dist/index.d.ts +17 -3
- package/dist/index.js +66 -55
- package/dist/k-ui.css +1 -1
- package/package.json +6 -12
- /package/dist/components/{KEmpty.js → KEmpty.vue.js} +0 -0
- /package/dist/components/{KGridSkeleton.js → KGridSkeleton.vue.js} +0 -0
- /package/dist/components/{KListSkeleton.js → KListSkeleton.vue.js} +0 -0
- /package/dist/components/{KRefetchOverlay.js → KRefetchOverlay.vue.js} +0 -0
- /package/dist/components/{KSearchBar.js → KSearchBar.vue.js} +0 -0
|
@@ -7,23 +7,28 @@ type __VLS_Props = {
|
|
|
7
7
|
modelValue: string;
|
|
8
8
|
items?: TabItem[];
|
|
9
9
|
variant?: 'line' | 'segment';
|
|
10
|
-
|
|
10
|
+
type?: 'line' | 'bar' | 'card' | 'segment';
|
|
11
|
+
size?: 'sm' | 'md' | 'medium' | 'lg' | 'large';
|
|
12
|
+
lazy?: boolean;
|
|
11
13
|
};
|
|
12
|
-
declare var __VLS_22: {}, __VLS_24: {},
|
|
14
|
+
declare var __VLS_22: {}, __VLS_24: {}, __VLS_26: {}, __VLS_35: `tab-${string}`, __VLS_36: {};
|
|
13
15
|
type __VLS_Slots = {} & {
|
|
14
|
-
[K in NonNullable<typeof
|
|
16
|
+
[K in NonNullable<typeof __VLS_35>]?: (props: typeof __VLS_36) => any;
|
|
15
17
|
} & {
|
|
16
18
|
triggers?: (props: typeof __VLS_22) => any;
|
|
17
19
|
} & {
|
|
18
|
-
|
|
20
|
+
suffix?: (props: typeof __VLS_24) => any;
|
|
21
|
+
} & {
|
|
22
|
+
default?: (props: typeof __VLS_26) => any;
|
|
19
23
|
};
|
|
20
24
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
21
25
|
"update:modelValue": (v: string) => any;
|
|
22
26
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
23
27
|
"onUpdate:modelValue"?: ((v: string) => any) | undefined;
|
|
24
28
|
}>, {
|
|
25
|
-
size: "sm" | "md";
|
|
29
|
+
size: "sm" | "md" | "medium" | "lg" | "large";
|
|
26
30
|
variant: "line" | "segment";
|
|
31
|
+
lazy: boolean;
|
|
27
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
33
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
29
34
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
2
|
import t from "./KTabs.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
-
/* empty css
|
|
3
|
+
/* empty css */
|
|
4
4
|
//#region components/KTabs.vue
|
|
5
|
-
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-
|
|
5
|
+
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-5a3d38e2"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { n as default };
|
|
@@ -1,47 +1,57 @@
|
|
|
1
|
-
import { Fragment as e,
|
|
2
|
-
import { TabsContent 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, normalizeClass as l, openBlock as u, renderList as d, renderSlot as f, toDisplayString as p, unref as m, withCtx as h } from "vue";
|
|
2
|
+
import { TabsContent as g, TabsList as _, TabsRoot as v, TabsTrigger as y } from "reka-ui";
|
|
3
3
|
//#region components/KTabs.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var
|
|
4
|
+
var b = { class: "k-tabs__bar" }, x = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "k-tabs__suffix"
|
|
7
|
+
}, S = /* @__PURE__ */ c({
|
|
5
8
|
__name: "KTabs",
|
|
6
9
|
props: {
|
|
7
10
|
modelValue: {},
|
|
8
11
|
items: {},
|
|
9
12
|
variant: { default: "line" },
|
|
10
|
-
|
|
13
|
+
type: {},
|
|
14
|
+
size: { default: "md" },
|
|
15
|
+
lazy: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: !0
|
|
18
|
+
}
|
|
11
19
|
},
|
|
12
20
|
emits: ["update:modelValue"],
|
|
13
|
-
setup(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
21
|
+
setup(c) {
|
|
22
|
+
let S = c, C = t(() => S.type === "segment" || S.type === "bar" ? "segment" : S.variant), w = t(() => S.size === "lg" || S.size === "large" ? "lg" : S.size === "sm" ? "sm" : "md");
|
|
23
|
+
return (t, S) => (u(), n(m(v), {
|
|
24
|
+
"model-value": c.modelValue,
|
|
25
|
+
class: l(["k-tabs", [`k-tabs--${C.value}`, `k-tabs--${w.value}`]]),
|
|
26
|
+
"onUpdate:modelValue": S[0] ||= (e) => t.$emit("update:modelValue", String(e))
|
|
18
27
|
}, {
|
|
19
|
-
default:
|
|
20
|
-
|
|
21
|
-
default:
|
|
28
|
+
default: h(() => [
|
|
29
|
+
a("div", b, [s(m(_), { class: "k-tabs__list" }, {
|
|
30
|
+
default: h(() => [(u(!0), i(e, null, d(c.items, (e) => (u(), n(m(y), {
|
|
22
31
|
key: e.key,
|
|
23
32
|
value: e.key,
|
|
24
33
|
disabled: e.disabled,
|
|
25
34
|
class: "k-tabs__trigger"
|
|
26
35
|
}, {
|
|
27
|
-
default:
|
|
36
|
+
default: h(() => [o(p(e.label), 1)]),
|
|
28
37
|
_: 2
|
|
29
|
-
}, 1032, ["value", "disabled"]))), 128)),
|
|
38
|
+
}, 1032, ["value", "disabled"]))), 128)), f(t.$slots, "triggers", {}, void 0, !0)]),
|
|
30
39
|
_: 3
|
|
31
|
-
}),
|
|
32
|
-
|
|
33
|
-
(
|
|
40
|
+
}), t.$slots.suffix ? (u(), i("div", x, [f(t.$slots, "suffix", {}, void 0, !0)])) : r("", !0)]),
|
|
41
|
+
f(t.$slots, "default", {}, void 0, !0),
|
|
42
|
+
(u(!0), i(e, null, d(c.items, (e) => (u(), n(m(g), {
|
|
34
43
|
key: e.key,
|
|
35
44
|
value: e.key,
|
|
36
|
-
class: "k-tabs__content"
|
|
45
|
+
class: "k-tabs__content",
|
|
46
|
+
"force-mount": c.lazy
|
|
37
47
|
}, {
|
|
38
|
-
default:
|
|
48
|
+
default: h(() => [f(t.$slots, `tab-${e.key}`, {}, void 0, !0)]),
|
|
39
49
|
_: 2
|
|
40
|
-
}, 1032, ["value"]))), 128))
|
|
50
|
+
}, 1032, ["value", "force-mount"]))), 128))
|
|
41
51
|
]),
|
|
42
52
|
_: 3
|
|
43
53
|
}, 8, ["model-value", "class"]));
|
|
44
54
|
}
|
|
45
55
|
});
|
|
46
56
|
//#endregion
|
|
47
|
-
export {
|
|
57
|
+
export { S as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
type KTagType = 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'neutral';
|
|
2
|
-
type KTagSize = 'sm' | 'md';
|
|
1
|
+
type KTagType = 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'error' | 'info' | 'neutral';
|
|
2
|
+
type KTagSize = 'tiny' | 'xs' | 'small' | 'sm' | 'medium' | 'md' | 'large' | 'lg';
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
type?: KTagType;
|
|
5
5
|
size?: KTagSize;
|
|
@@ -18,9 +18,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
18
18
|
}>, {
|
|
19
19
|
type: KTagType;
|
|
20
20
|
size: KTagSize;
|
|
21
|
+
round: boolean;
|
|
21
22
|
bordered: boolean;
|
|
22
23
|
closable: boolean;
|
|
23
|
-
round: boolean;
|
|
24
24
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
25
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
26
26
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
2
|
import t from "./KTag.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
-
/* empty css
|
|
3
|
+
/* empty css */
|
|
4
4
|
//#region components/KTag.vue
|
|
5
|
-
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-
|
|
5
|
+
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-28f3cd8b"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { n as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { X as
|
|
1
|
+
import { computed as e, createCommentVNode as t, createElementBlock as n, createVNode as r, defineComponent as i, normalizeClass as a, openBlock as o, renderSlot as s, unref as c } from "vue";
|
|
2
|
+
import { X as l } from "lucide-vue-next";
|
|
3
3
|
//#region components/KTag.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var
|
|
4
|
+
var u = /* @__PURE__ */ i({
|
|
5
5
|
__name: "KTag",
|
|
6
6
|
props: {
|
|
7
7
|
type: { default: "default" },
|
|
@@ -20,21 +20,22 @@ var l = /* @__PURE__ */ r({
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
emits: ["close"],
|
|
23
|
-
setup(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
`k-tag--${
|
|
23
|
+
setup(i) {
|
|
24
|
+
let u = i, d = e(() => u.type === "error" ? "danger" : u.type), f = e(() => u.size === "tiny" || u.size === "xs" ? "xs" : u.size === "small" || u.size === "sm" ? "sm" : u.size === "large" || u.size === "lg" ? "lg" : "md");
|
|
25
|
+
return (e, u) => (o(), n("span", { class: a(["k-tag", [
|
|
26
|
+
`k-tag--${d.value}`,
|
|
27
|
+
`k-tag--${f.value}`,
|
|
27
28
|
{
|
|
28
|
-
"k-tag--borderless": !
|
|
29
|
-
"k-tag--round":
|
|
29
|
+
"k-tag--borderless": !i.bordered,
|
|
30
|
+
"k-tag--round": i.round
|
|
30
31
|
}
|
|
31
|
-
]]) }, [
|
|
32
|
+
]]) }, [s(e.$slots, "default", {}, void 0, !0), i.closable ? (o(), n("button", {
|
|
32
33
|
key: 0,
|
|
33
34
|
type: "button",
|
|
34
35
|
class: "k-tag__close",
|
|
35
|
-
onClick: u[0] ||= (
|
|
36
|
-
}, [
|
|
36
|
+
onClick: u[0] ||= (t) => e.$emit("close", t)
|
|
37
|
+
}, [r(c(l), { size: 10 })])) : t("", !0)], 2));
|
|
37
38
|
}
|
|
38
39
|
});
|
|
39
40
|
//#endregion
|
|
40
|
-
export {
|
|
41
|
+
export { u as default };
|
|
@@ -1,21 +1,36 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
modelValue?: string;
|
|
3
|
+
value?: string;
|
|
3
4
|
rows?: number;
|
|
4
5
|
placeholder?: string;
|
|
5
6
|
disabled?: boolean;
|
|
6
7
|
readonly?: boolean;
|
|
7
8
|
error?: boolean;
|
|
8
9
|
resize?: 'none' | 'vertical' | 'horizontal' | 'both';
|
|
10
|
+
autosize?: boolean | {
|
|
11
|
+
minRows?: number;
|
|
12
|
+
maxRows?: number;
|
|
13
|
+
};
|
|
9
14
|
};
|
|
10
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
15
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
16
|
+
textareaElRef: import("vue").Ref<HTMLTextAreaElement | null, HTMLTextAreaElement | null>;
|
|
17
|
+
focus: () => void | undefined;
|
|
18
|
+
blur: () => void | undefined;
|
|
19
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
11
20
|
"update:modelValue": (v: string) => any;
|
|
21
|
+
"update:value": (v: string) => any;
|
|
22
|
+
blur: (ev: FocusEvent) => any;
|
|
23
|
+
focus: (ev: FocusEvent) => any;
|
|
12
24
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
25
|
"onUpdate:modelValue"?: ((v: string) => any) | undefined;
|
|
26
|
+
"onUpdate:value"?: ((v: string) => any) | undefined;
|
|
27
|
+
onBlur?: ((ev: FocusEvent) => any) | undefined;
|
|
28
|
+
onFocus?: ((ev: FocusEvent) => any) | undefined;
|
|
14
29
|
}>, {
|
|
30
|
+
error: boolean;
|
|
15
31
|
disabled: boolean;
|
|
16
32
|
modelValue: string;
|
|
17
33
|
readonly: boolean;
|
|
18
|
-
error: boolean;
|
|
19
34
|
rows: number;
|
|
20
35
|
resize: "none" | "vertical" | "horizontal" | "both";
|
|
21
36
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
2
|
import t from "./KTextarea.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
-
/* empty css
|
|
3
|
+
/* empty css */
|
|
4
4
|
//#region components/KTextarea.vue
|
|
5
|
-
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-
|
|
5
|
+
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-cbba0863"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { n as default };
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { computed as e, createElementBlock as t, defineComponent as n, nextTick as r, normalizeClass as i, normalizeStyle as a, openBlock as o, ref as s, watch as c } from "vue";
|
|
2
2
|
//#region components/KTextarea.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
-
var
|
|
3
|
+
var l = [
|
|
4
4
|
"value",
|
|
5
5
|
"rows",
|
|
6
6
|
"placeholder",
|
|
7
7
|
"disabled",
|
|
8
8
|
"readonly"
|
|
9
|
-
],
|
|
9
|
+
], u = /* @__PURE__ */ n({
|
|
10
10
|
__name: "KTextarea",
|
|
11
11
|
props: {
|
|
12
12
|
modelValue: { default: "" },
|
|
13
|
+
value: {},
|
|
13
14
|
rows: { default: 3 },
|
|
14
15
|
placeholder: {},
|
|
15
16
|
disabled: {
|
|
@@ -24,28 +25,56 @@ var a = [
|
|
|
24
25
|
type: Boolean,
|
|
25
26
|
default: !1
|
|
26
27
|
},
|
|
27
|
-
resize: { default: "vertical" }
|
|
28
|
+
resize: { default: "vertical" },
|
|
29
|
+
autosize: { type: [Boolean, Object] }
|
|
28
30
|
},
|
|
29
|
-
emits: [
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
emits: [
|
|
32
|
+
"update:modelValue",
|
|
33
|
+
"update:value",
|
|
34
|
+
"blur",
|
|
35
|
+
"focus"
|
|
36
|
+
],
|
|
37
|
+
setup(n, { expose: u, emit: d }) {
|
|
38
|
+
let f = n, p = d, m = s(null), h = e(() => f.value ?? f.modelValue ?? ""), g = e(() => !f.autosize || f.autosize === !0 ? {
|
|
39
|
+
minRows: f.rows,
|
|
40
|
+
maxRows: void 0
|
|
41
|
+
} : {
|
|
42
|
+
minRows: f.autosize.minRows ?? f.rows,
|
|
43
|
+
maxRows: f.autosize.maxRows
|
|
44
|
+
});
|
|
45
|
+
function _() {
|
|
46
|
+
if (!f.autosize || !m.value) return;
|
|
47
|
+
let e = m.value, t = window.getComputedStyle(e), n = Number.parseFloat(t.lineHeight) || 20, r = Number.parseFloat(t.paddingTop) + Number.parseFloat(t.paddingBottom);
|
|
48
|
+
e.style.height = "auto";
|
|
49
|
+
let i = g.value.minRows * n + r, a = g.value.maxRows ? g.value.maxRows * n + r : Infinity;
|
|
50
|
+
e.style.height = `${Math.max(i, Math.min(e.scrollHeight, a))}px`, e.style.overflowY = e.scrollHeight > a ? "auto" : "hidden";
|
|
34
51
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
52
|
+
function v(e) {
|
|
53
|
+
let t = e.target.value;
|
|
54
|
+
p("update:modelValue", t), p("update:value", t), r(_);
|
|
55
|
+
}
|
|
56
|
+
return c(h, () => r(_), { immediate: !0 }), u({
|
|
57
|
+
textareaElRef: m,
|
|
58
|
+
focus: () => m.value?.focus(),
|
|
59
|
+
blur: () => m.value?.blur()
|
|
60
|
+
}), (e, r) => (o(), t("textarea", {
|
|
61
|
+
ref_key: "textareaElRef",
|
|
62
|
+
ref: m,
|
|
63
|
+
class: i(["k-textarea", {
|
|
64
|
+
"k-textarea--error": n.error,
|
|
65
|
+
"k-textarea--disabled": n.disabled
|
|
39
66
|
}]),
|
|
40
|
-
value:
|
|
41
|
-
rows:
|
|
42
|
-
placeholder:
|
|
43
|
-
disabled:
|
|
44
|
-
readonly:
|
|
45
|
-
style:
|
|
46
|
-
onInput:
|
|
47
|
-
|
|
67
|
+
value: h.value,
|
|
68
|
+
rows: n.rows,
|
|
69
|
+
placeholder: n.placeholder,
|
|
70
|
+
disabled: n.disabled,
|
|
71
|
+
readonly: n.readonly,
|
|
72
|
+
style: a({ resize: n.resize }),
|
|
73
|
+
onInput: v,
|
|
74
|
+
onFocus: r[0] ||= (e) => p("focus", e),
|
|
75
|
+
onBlur: r[1] ||= (e) => p("blur", e)
|
|
76
|
+
}, null, 46, l));
|
|
48
77
|
}
|
|
49
78
|
});
|
|
50
79
|
//#endregion
|
|
51
|
-
export {
|
|
80
|
+
export { u as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
2
|
import t from "./KThemeToggleButton.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
-
/* empty css
|
|
3
|
+
/* empty css */
|
|
4
4
|
//#region components/KThemeToggleButton.vue
|
|
5
5
|
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-88b80661"]]);
|
|
6
6
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
2
|
import t from "./KTreeNode.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
-
/* empty css
|
|
3
|
+
/* empty css */
|
|
4
4
|
//#region components/KTreeNode.vue
|
|
5
5
|
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-69ce0363"]]);
|
|
6
6
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
2
|
import t from "./KTreeView.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
-
/* empty css
|
|
3
|
+
/* empty css */
|
|
4
4
|
//#region components/KTreeView.vue
|
|
5
5
|
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-92c28a8c"]]);
|
|
6
6
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { kTreeContextKey as e } from "./tree-context.js";
|
|
2
|
-
import t from "./KTreeNode.js";
|
|
2
|
+
import t from "./KTreeNode.vue.js";
|
|
3
3
|
import { Fragment as n, computed as r, createBlock as i, createElementBlock as a, defineComponent as o, openBlock as s, provide as c, ref as l, renderList as u, watch as d } from "vue";
|
|
4
4
|
//#region components/KTreeView.vue?vue&type=script&setup=true&lang.ts
|
|
5
5
|
var f = {
|
|
@@ -7,21 +7,78 @@ export interface UploadFile {
|
|
|
7
7
|
url?: string;
|
|
8
8
|
error?: string;
|
|
9
9
|
raw?: File;
|
|
10
|
+
/** naive-ui compatible raw File alias */
|
|
11
|
+
file?: File;
|
|
12
|
+
}
|
|
13
|
+
export interface UploadFileInfo {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
status: UploadFile['status'];
|
|
17
|
+
percentage: number;
|
|
18
|
+
file?: File;
|
|
19
|
+
url?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface UploadCustomRequestOptions {
|
|
22
|
+
file: UploadFileInfo;
|
|
23
|
+
onProgress: (event: {
|
|
24
|
+
percent: number;
|
|
25
|
+
}) => void;
|
|
26
|
+
onFinish: () => void;
|
|
27
|
+
onError: (error?: any) => void;
|
|
10
28
|
}
|
|
11
29
|
type __VLS_Props = {
|
|
12
30
|
multiple?: boolean;
|
|
13
31
|
accept?: string;
|
|
14
32
|
/** bytes */
|
|
15
33
|
maxSize?: number;
|
|
16
|
-
/** 用户自定义上传函数; 不传则文件保持 pending */
|
|
17
34
|
uploader?: (file: File, onProgress: (p: number) => void) => Promise<{
|
|
18
35
|
url?: string;
|
|
19
36
|
}>;
|
|
37
|
+
/** naive-ui compatible */
|
|
38
|
+
customRequest?: (options: UploadCustomRequestOptions) => void;
|
|
39
|
+
beforeUpload?: (file: File | {
|
|
40
|
+
file: UploadFileInfo;
|
|
41
|
+
}) => boolean | void | Promise<boolean | void>;
|
|
42
|
+
/** Vue listener compatibility for @before-upload */
|
|
43
|
+
onBeforeUpload?: (options: {
|
|
44
|
+
file: UploadFileInfo;
|
|
45
|
+
}) => boolean | void | Promise<boolean | void>;
|
|
46
|
+
autoUpload?: boolean;
|
|
47
|
+
/** naive-ui alias; false means local selection only */
|
|
48
|
+
defaultUpload?: boolean;
|
|
49
|
+
showList?: boolean;
|
|
50
|
+
/** naive-ui alias */
|
|
51
|
+
showFileList?: boolean;
|
|
52
|
+
buttonText?: string;
|
|
20
53
|
drag?: boolean;
|
|
54
|
+
disabled?: boolean;
|
|
21
55
|
};
|
|
22
56
|
declare function addFiles(list: FileList | File[]): Promise<void>;
|
|
57
|
+
declare function onSelect(): void;
|
|
23
58
|
declare function remove(id: string): void;
|
|
24
|
-
declare
|
|
59
|
+
declare var __VLS_1: {
|
|
60
|
+
isDragOver: boolean;
|
|
61
|
+
open: typeof onSelect;
|
|
62
|
+
}, __VLS_3: {
|
|
63
|
+
isDragOver: boolean;
|
|
64
|
+
open: typeof onSelect;
|
|
65
|
+
}, __VLS_10: {
|
|
66
|
+
isDragOver: boolean;
|
|
67
|
+
open: typeof onSelect;
|
|
68
|
+
}, __VLS_12: {
|
|
69
|
+
isDragOver: boolean;
|
|
70
|
+
open: typeof onSelect;
|
|
71
|
+
};
|
|
72
|
+
type __VLS_Slots = {} & {
|
|
73
|
+
trigger?: (props: typeof __VLS_1) => any;
|
|
74
|
+
} & {
|
|
75
|
+
default?: (props: typeof __VLS_3) => any;
|
|
76
|
+
} & {
|
|
77
|
+
trigger?: (props: typeof __VLS_10) => any;
|
|
78
|
+
} & {
|
|
79
|
+
default?: (props: typeof __VLS_12) => any;
|
|
80
|
+
};
|
|
81
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
25
82
|
files: import("vue").Ref<{
|
|
26
83
|
id: string;
|
|
27
84
|
name: string;
|
|
@@ -42,6 +99,18 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
|
42
99
|
stream: () => ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
43
100
|
text: () => Promise<string>;
|
|
44
101
|
} | undefined;
|
|
102
|
+
file?: {
|
|
103
|
+
readonly lastModified: number;
|
|
104
|
+
readonly name: string;
|
|
105
|
+
readonly webkitRelativePath: string;
|
|
106
|
+
readonly size: number;
|
|
107
|
+
readonly type: string;
|
|
108
|
+
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
109
|
+
bytes: () => Promise<Uint8Array<ArrayBuffer>>;
|
|
110
|
+
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
111
|
+
stream: () => ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
112
|
+
text: () => Promise<string>;
|
|
113
|
+
} | undefined;
|
|
45
114
|
}[], UploadFile[] | {
|
|
46
115
|
id: string;
|
|
47
116
|
name: string;
|
|
@@ -62,20 +131,47 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
|
62
131
|
stream: () => ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
63
132
|
text: () => Promise<string>;
|
|
64
133
|
} | undefined;
|
|
134
|
+
file?: {
|
|
135
|
+
readonly lastModified: number;
|
|
136
|
+
readonly name: string;
|
|
137
|
+
readonly webkitRelativePath: string;
|
|
138
|
+
readonly size: number;
|
|
139
|
+
readonly type: string;
|
|
140
|
+
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
141
|
+
bytes: () => Promise<Uint8Array<ArrayBuffer>>;
|
|
142
|
+
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
143
|
+
stream: () => ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
144
|
+
text: () => Promise<string>;
|
|
145
|
+
} | undefined;
|
|
65
146
|
}[]>;
|
|
66
147
|
remove: typeof remove;
|
|
67
148
|
addFiles: typeof addFiles;
|
|
149
|
+
open: typeof onSelect;
|
|
68
150
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
151
|
+
success: (file: UploadFile) => any;
|
|
69
152
|
error: (file: UploadFile, error: any) => any;
|
|
153
|
+
select: (files: File[]) => any;
|
|
70
154
|
change: (files: UploadFile[]) => any;
|
|
71
|
-
success: (file: UploadFile) => any;
|
|
72
155
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
156
|
+
onSuccess?: ((file: UploadFile) => any) | undefined;
|
|
73
157
|
onError?: ((file: UploadFile, error: any) => any) | undefined;
|
|
158
|
+
onSelect?: ((files: File[]) => any) | undefined;
|
|
74
159
|
onChange?: ((files: UploadFile[]) => any) | undefined;
|
|
75
|
-
onSuccess?: ((file: UploadFile) => any) | undefined;
|
|
76
160
|
}>, {
|
|
161
|
+
disabled: boolean;
|
|
77
162
|
multiple: boolean;
|
|
78
163
|
drag: boolean;
|
|
164
|
+
autoUpload: boolean;
|
|
165
|
+
defaultUpload: boolean;
|
|
166
|
+
showList: boolean;
|
|
167
|
+
showFileList: boolean;
|
|
168
|
+
buttonText: string;
|
|
79
169
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
170
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
80
171
|
declare const _default: typeof __VLS_export;
|
|
81
172
|
export default _default;
|
|
173
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
174
|
+
new (): {
|
|
175
|
+
$slots: S;
|
|
176
|
+
};
|
|
177
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
2
|
import t from "./KUpload.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
-
/* empty css
|
|
3
|
+
/* empty css */
|
|
4
4
|
//#region components/KUpload.vue
|
|
5
|
-
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-
|
|
5
|
+
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-cc65d4de"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { n as default };
|