@guoyg578/k-ui 0.1.0 → 0.1.2
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 +75 -29
- package/dist/components/KAffix.vue.d.ts +17 -0
- package/dist/components/KAffix.vue.js +7 -0
- package/dist/components/KAffix.vue_vue_type_script_setup_true_lang.js +18 -0
- 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/KAnchor.vue.d.ts +14 -0
- package/dist/components/KAnchor.vue.js +7 -0
- package/dist/components/KAnchor.vue_vue_type_script_setup_true_lang.js +40 -0
- package/dist/components/KAutoComplete.vue.d.ts +26 -0
- package/dist/components/KAutoComplete.vue.js +8 -0
- package/dist/components/KAutoComplete.vue_vue_type_script_setup_true_lang.js +58 -0
- package/dist/components/{KAvatar.js → KAvatar.vue.js} +1 -1
- package/dist/components/{KAvatarGroup.js → KAvatarGroup.vue.js} +1 -1
- package/dist/components/KBackTop.vue.d.ts +24 -0
- package/dist/components/KBackTop.vue.js +7 -0
- package/dist/components/KBackTop.vue_vue_type_script_setup_true_lang.js +56 -0
- package/dist/components/KBadge.vue.d.ts +31 -0
- package/dist/components/KBadge.vue.js +7 -0
- package/dist/components/KBadge.vue_vue_type_script_setup_true_lang.js +48 -0
- 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/KButtonGroup.vue.d.ts +18 -0
- package/dist/components/KButtonGroup.vue.js +6 -0
- package/dist/components/KButtonGroup.vue_vue_type_script_setup_true_lang.js +14 -0
- package/dist/components/KCalendar.vue.d.ts +33 -0
- package/dist/components/KCalendar.vue.js +7 -0
- package/dist/components/KCalendar.vue_vue_type_script_setup_true_lang.js +78 -0
- 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/KCascader.vue.d.ts +29 -0
- package/dist/components/KCascader.vue.js +8 -0
- package/dist/components/KCascader.vue_vue_type_script_setup_true_lang.js +114 -0
- package/dist/components/{KCheckbox.js → KCheckbox.vue.js} +1 -1
- package/dist/components/{KCheckboxGroup.js → KCheckboxGroup.vue.js} +1 -1
- package/dist/components/KCode.vue.d.ts +27 -0
- package/dist/components/KCode.vue.js +7 -0
- package/dist/components/KCode.vue_vue_type_script_setup_true_lang.js +42 -0
- package/dist/components/KCollapse.vue.d.ts +25 -0
- package/dist/components/KCollapse.vue.js +7 -0
- package/dist/components/KCollapse.vue_vue_type_script_setup_true_lang.js +35 -0
- package/dist/components/KCollapseItem.vue.d.ts +22 -0
- package/dist/components/KCollapseItem.vue.js +7 -0
- package/dist/components/KCollapseItem.vue_vue_type_script_setup_true_lang.js +46 -0
- 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/KCountdown.vue.d.ts +15 -0
- package/dist/components/KCountdown.vue.js +7 -0
- package/dist/components/KCountdown.vue_vue_type_script_setup_true_lang.js +36 -0
- 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/KDivider.vue.d.ts +21 -0
- package/dist/components/KDivider.vue.js +7 -0
- package/dist/components/KDivider.vue_vue_type_script_setup_true_lang.js +33 -0
- 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 +8 -5
- 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/KDynamicInput.vue.d.ts +33 -0
- package/dist/components/KDynamicInput.vue.js +7 -0
- package/dist/components/KDynamicInput.vue_vue_type_script_setup_true_lang.js +81 -0
- package/dist/components/KDynamicTags.vue.d.ts +20 -0
- package/dist/components/KDynamicTags.vue.js +7 -0
- package/dist/components/KDynamicTags.vue_vue_type_script_setup_true_lang.js +60 -0
- 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/KGrid.vue.d.ts +29 -0
- package/dist/components/KGrid.vue.js +7 -0
- package/dist/components/KGrid.vue_vue_type_script_setup_true_lang.js +33 -0
- package/dist/components/KGridItem.vue.d.ts +20 -0
- package/dist/components/KGridItem.vue.js +7 -0
- package/dist/components/KGridItem.vue_vue_type_script_setup_true_lang.js +18 -0
- 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/KLayout.vue.d.ts +19 -0
- package/dist/components/KLayout.vue.js +7 -0
- package/dist/components/KLayout.vue_vue_type_script_setup_true_lang.js +14 -0
- package/dist/components/KLayoutContent.vue.d.ts +17 -0
- package/dist/components/KLayoutContent.vue.js +7 -0
- package/dist/components/KLayoutContent.vue_vue_type_script_setup_true_lang.js +11 -0
- package/dist/components/KLayoutHeader.vue.d.ts +19 -0
- package/dist/components/KLayoutHeader.vue.js +7 -0
- package/dist/components/KLayoutHeader.vue_vue_type_script_setup_true_lang.js +14 -0
- package/dist/components/KLayoutSider.vue.d.ts +28 -0
- package/dist/components/KLayoutSider.vue.js +7 -0
- package/dist/components/KLayoutSider.vue_vue_type_script_setup_true_lang.js +34 -0
- package/dist/components/KList.vue.d.ts +24 -0
- package/dist/components/KList.vue.js +7 -0
- package/dist/components/KList.vue_vue_type_script_setup_true_lang.js +39 -0
- package/dist/components/KListItem.vue.d.ts +17 -0
- package/dist/components/KListItem.vue.js +7 -0
- package/dist/components/KListItem.vue_vue_type_script_setup_true_lang.js +22 -0
- package/dist/components/{KLoadingOverlay.js → KLoadingOverlay.vue.js} +1 -1
- package/dist/components/KMention.vue.d.ts +27 -0
- package/dist/components/KMention.vue.js +8 -0
- package/dist/components/KMention.vue_vue_type_script_setup_true_lang.js +73 -0
- package/dist/components/KMenu.vue.d.ts +30 -0
- package/dist/components/KMenu.vue.js +9 -0
- package/dist/components/KMenu.vue_vue_type_script_setup_true_lang.js +134 -0
- package/dist/components/KMenuItem.vue.d.ts +10 -0
- package/dist/components/KMenuItem.vue.js +7 -0
- package/dist/components/KMenuItem.vue_vue_type_script_setup_true_lang.js +58 -0
- 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/KNumberAnimation.vue.d.ts +33 -0
- package/dist/components/KNumberAnimation.vue.js +7 -0
- package/dist/components/KNumberAnimation.vue_vue_type_script_setup_true_lang.js +45 -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.vue.d.ts +1 -1
- 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.vue.d.ts +4 -2
- package/dist/components/{KRadio.js → KRadio.vue.js} +2 -2
- package/dist/components/KRadio.vue_vue_type_script_setup_true_lang.js +24 -11
- package/dist/components/KRadioGroup.vue.d.ts +3 -0
- package/dist/components/{KRadioGroup.js → KRadioGroup.vue.js} +2 -2
- package/dist/components/KRadioGroup.vue_vue_type_script_setup_true_lang.js +17 -12
- package/dist/components/KRate.vue.d.ts +25 -0
- package/dist/components/KRate.vue.js +7 -0
- package/dist/components/KRate.vue_vue_type_script_setup_true_lang.js +77 -0
- 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/KSpace.vue.d.ts +32 -0
- package/dist/components/KSpace.vue.js +7 -0
- package/dist/components/KSpace.vue_vue_type_script_setup_true_lang.js +52 -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/KStatistic.vue.d.ts +23 -0
- package/dist/components/KStatistic.vue.js +7 -0
- package/dist/components/KStatistic.vue_vue_type_script_setup_true_lang.js +27 -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/KText.vue.d.ts +26 -0
- package/dist/components/KText.vue.js +7 -0
- package/dist/components/KText.vue_vue_type_script_setup_true_lang.js +31 -0
- 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/KTime.vue.d.ts +14 -0
- package/dist/components/KTime.vue.js +7 -0
- package/dist/components/KTime.vue_vue_type_script_setup_true_lang.js +56 -0
- package/dist/components/KTimePicker.vue.d.ts +19 -0
- package/dist/components/KTimePicker.vue.js +8 -0
- package/dist/components/KTimePicker.vue_vue_type_script_setup_true_lang.js +116 -0
- package/dist/components/KTimeline.vue.d.ts +13 -0
- package/dist/components/KTimeline.vue.js +7 -0
- package/dist/components/KTimeline.vue_vue_type_script_setup_true_lang.js +10 -0
- package/dist/components/KTimelineItem.vue.d.ts +29 -0
- package/dist/components/KTimelineItem.vue.js +7 -0
- package/dist/components/KTimelineItem.vue_vue_type_script_setup_true_lang.js +37 -0
- package/dist/components/{KTooltip.js → KTooltip.vue.js} +1 -1
- package/dist/components/KTransfer.vue.d.ts +24 -0
- package/dist/components/KTransfer.vue.js +7 -0
- package/dist/components/KTransfer.vue_vue_type_script_setup_true_lang.js +114 -0
- package/dist/components/{KTreeNode.js → KTreeNode.vue.js} +1 -1
- package/dist/components/KTreeSelect.vue.d.ts +22 -0
- package/dist/components/KTreeSelect.vue.js +8 -0
- package/dist/components/KTreeSelect.vue_vue_type_script_setup_true_lang.js +100 -0
- 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/KTypography.vue.d.ts +13 -0
- package/dist/components/KTypography.vue.js +7 -0
- package/dist/components/KTypography.vue_vue_type_script_setup_true_lang.js +10 -0
- 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/KWatermark.vue.d.ts +27 -0
- package/dist/components/KWatermark.vue.js +7 -0
- package/dist/components/KWatermark.vue_vue_type_script_setup_true_lang.js +28 -0
- package/dist/components/form-context.d.ts +7 -3
- package/dist/components/list-context.d.ts +6 -0
- package/dist/components/list-context.js +4 -0
- package/dist/components/menu-context.d.ts +26 -0
- package/dist/components/menu-context.js +4 -0
- package/dist/components/radio-context.d.ts +6 -0
- package/dist/components/radio-context.js +4 -0
- package/dist/components/upload-context.d.ts +6 -0
- package/dist/components/upload-context.js +4 -0
- package/dist/index.d.ts +60 -3
- package/dist/index.js +104 -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
|
@@ -6,14 +6,18 @@ type __VLS_Props = {
|
|
|
6
6
|
placement?: 'right' | 'left' | 'top' | 'bottom';
|
|
7
7
|
closable?: boolean;
|
|
8
8
|
maskClosable?: boolean;
|
|
9
|
+
width?: string | number;
|
|
10
|
+
height?: string | number;
|
|
9
11
|
};
|
|
10
|
-
declare var __VLS_36: {},
|
|
12
|
+
declare var __VLS_36: {}, __VLS_44: {}, __VLS_57: {}, __VLS_59: {};
|
|
11
13
|
type __VLS_Slots = {} & {
|
|
12
14
|
title?: (props: typeof __VLS_36) => any;
|
|
13
15
|
} & {
|
|
14
|
-
|
|
16
|
+
'header-extra'?: (props: typeof __VLS_44) => any;
|
|
15
17
|
} & {
|
|
16
|
-
|
|
18
|
+
default?: (props: typeof __VLS_57) => any;
|
|
19
|
+
} & {
|
|
20
|
+
footer?: (props: typeof __VLS_59) => any;
|
|
17
21
|
};
|
|
18
22
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
19
23
|
close: () => any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
2
|
import t from "./KDrawer.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
-
/* empty css
|
|
3
|
+
/* empty css */
|
|
4
4
|
//#region components/KDrawer.vue
|
|
5
|
-
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-
|
|
5
|
+
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-2ba8be6b"]]);
|
|
6
6
|
//#endregion
|
|
7
7
|
export { n as default };
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import { createBlock as e, createCommentVNode as t, createElementBlock as n, createElementVNode as r, createTextVNode as i, createVNode as a, defineComponent as o, normalizeClass as s,
|
|
2
|
-
import { X as
|
|
3
|
-
import { DialogClose as
|
|
1
|
+
import { createBlock as e, createCommentVNode as t, createElementBlock as n, createElementVNode as r, createTextVNode as i, createVNode as a, defineComponent as o, normalizeClass as s, normalizeStyle as c, openBlock as l, renderSlot as u, toDisplayString as d, unref as f, withCtx as p } from "vue";
|
|
2
|
+
import { X as m } from "lucide-vue-next";
|
|
3
|
+
import { DialogClose as h, DialogContent as g, DialogDescription as _, DialogOverlay as v, DialogPortal as y, DialogRoot as b, DialogTitle as x } from "reka-ui";
|
|
4
4
|
//#region components/KDrawer.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var
|
|
5
|
+
var S = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "k-drawer__header"
|
|
8
|
-
},
|
|
8
|
+
}, C = { class: "k-drawer__title-wrap" }, w = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "k-drawer__header-actions"
|
|
11
|
+
}, T = { class: "k-drawer__body" }, E = {
|
|
9
12
|
key: 1,
|
|
10
13
|
class: "k-drawer__footer"
|
|
11
|
-
},
|
|
14
|
+
}, D = /* @__PURE__ */ o({
|
|
12
15
|
__name: "KDrawer",
|
|
13
16
|
props: {
|
|
14
17
|
open: { type: Boolean },
|
|
@@ -23,54 +26,63 @@ var x = {
|
|
|
23
26
|
maskClosable: {
|
|
24
27
|
type: Boolean,
|
|
25
28
|
default: !0
|
|
26
|
-
}
|
|
29
|
+
},
|
|
30
|
+
width: {},
|
|
31
|
+
height: {}
|
|
27
32
|
},
|
|
28
33
|
emits: ["update:open", "close"],
|
|
29
|
-
setup(o, { emit:
|
|
30
|
-
let
|
|
31
|
-
function
|
|
32
|
-
|
|
34
|
+
setup(o, { emit: D }) {
|
|
35
|
+
let O = D;
|
|
36
|
+
function k(e) {
|
|
37
|
+
O("update:open", e), e || O("close");
|
|
38
|
+
}
|
|
39
|
+
function A(e) {
|
|
40
|
+
if (!(e == null || e === "")) return typeof e == "number" ? `${e}px` : e;
|
|
33
41
|
}
|
|
34
|
-
return (
|
|
42
|
+
return (D, O) => (l(), e(f(b), {
|
|
35
43
|
open: o.open,
|
|
36
|
-
"onUpdate:open":
|
|
44
|
+
"onUpdate:open": k
|
|
37
45
|
}, {
|
|
38
|
-
default:
|
|
39
|
-
default:
|
|
46
|
+
default: p(() => [a(f(y), null, {
|
|
47
|
+
default: p(() => [a(f(v), { class: "k-drawer__overlay" }), a(f(g), {
|
|
40
48
|
class: s(["k-drawer", [`k-drawer--${o.placement}`, `k-drawer--${o.size}`]]),
|
|
41
|
-
|
|
49
|
+
style: c({
|
|
50
|
+
width: A(o.width),
|
|
51
|
+
height: A(o.height)
|
|
52
|
+
}),
|
|
53
|
+
onPointerDownOutside: O[0] ||= (e) => {
|
|
42
54
|
o.maskClosable || e.preventDefault();
|
|
43
55
|
},
|
|
44
|
-
onEscapeKeyDown:
|
|
56
|
+
onEscapeKeyDown: O[1] ||= (e) => {
|
|
45
57
|
o.closable || e.preventDefault();
|
|
46
58
|
}
|
|
47
59
|
}, {
|
|
48
|
-
default:
|
|
49
|
-
o.title ||
|
|
60
|
+
default: p(() => [
|
|
61
|
+
o.title || D.$slots.title || o.closable ? (l(), n("header", S, [r("div", C, [o.title || D.$slots.title ? (l(), e(f(x), {
|
|
50
62
|
key: 0,
|
|
51
63
|
class: "k-drawer__title"
|
|
52
64
|
}, {
|
|
53
|
-
default:
|
|
65
|
+
default: p(() => [u(D.$slots, "title", {}, () => [i(d(o.title), 1)], !0)]),
|
|
54
66
|
_: 3
|
|
55
|
-
})) : t("", !0), o.subtitle ? (
|
|
67
|
+
})) : t("", !0), o.subtitle ? (l(), e(f(_), {
|
|
56
68
|
key: 1,
|
|
57
69
|
class: "k-drawer__subtitle"
|
|
58
70
|
}, {
|
|
59
|
-
default:
|
|
71
|
+
default: p(() => [i(d(o.subtitle), 1)]),
|
|
60
72
|
_: 1
|
|
61
|
-
})) : t("", !0)]), o.closable ? (
|
|
73
|
+
})) : t("", !0)]), D.$slots["header-extra"] || o.closable ? (l(), n("div", w, [u(D.$slots, "header-extra", {}, void 0, !0), o.closable ? (l(), e(f(h), {
|
|
62
74
|
key: 0,
|
|
63
75
|
class: "k-drawer__close",
|
|
64
76
|
"aria-label": "关闭"
|
|
65
77
|
}, {
|
|
66
|
-
default:
|
|
78
|
+
default: p(() => [a(f(m), { size: 18 })]),
|
|
67
79
|
_: 1
|
|
68
|
-
})) : t("", !0)])) : t("", !0),
|
|
69
|
-
r("div",
|
|
70
|
-
|
|
80
|
+
})) : t("", !0)])) : t("", !0)])) : t("", !0),
|
|
81
|
+
r("div", T, [u(D.$slots, "default", {}, void 0, !0)]),
|
|
82
|
+
D.$slots.footer ? (l(), n("footer", E, [u(D.$slots, "footer", {}, void 0, !0)])) : t("", !0)
|
|
71
83
|
]),
|
|
72
84
|
_: 3
|
|
73
|
-
}, 8, ["class"])]),
|
|
85
|
+
}, 8, ["class", "style"])]),
|
|
74
86
|
_: 3
|
|
75
87
|
})]),
|
|
76
88
|
_: 3
|
|
@@ -78,4 +90,4 @@ var x = {
|
|
|
78
90
|
}
|
|
79
91
|
});
|
|
80
92
|
//#endregion
|
|
81
|
-
export {
|
|
93
|
+
export { D as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Component } from 'vue';
|
|
2
2
|
export interface DropdownItem {
|
|
3
3
|
/** 唯一标识,select 事件回传 */
|
|
4
|
-
key: string;
|
|
4
|
+
key: string | number;
|
|
5
5
|
label?: string;
|
|
6
6
|
/** lucide 图标组件,可选 */
|
|
7
7
|
icon?: Component;
|
|
@@ -16,7 +16,10 @@ export interface DropdownItem {
|
|
|
16
16
|
type?: 'item' | 'separator' | 'label';
|
|
17
17
|
}
|
|
18
18
|
type __VLS_Props = {
|
|
19
|
-
items
|
|
19
|
+
items?: DropdownItem[];
|
|
20
|
+
/** naive-ui alias */
|
|
21
|
+
options?: DropdownItem[];
|
|
22
|
+
trigger?: 'click' | 'hover' | 'focus' | 'manual';
|
|
20
23
|
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
21
24
|
align?: 'start' | 'center' | 'end';
|
|
22
25
|
sideOffset?: number;
|
|
@@ -36,15 +39,15 @@ type __VLS_Slots = {} & {
|
|
|
36
39
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
37
40
|
"update:open": (value: boolean | undefined) => any;
|
|
38
41
|
} & {
|
|
39
|
-
select: (key: string, item: DropdownItem) => any;
|
|
42
|
+
select: (key: string | number, item: DropdownItem) => any;
|
|
40
43
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
41
|
-
onSelect?: ((key: string, item: DropdownItem) => any) | undefined;
|
|
44
|
+
onSelect?: ((key: string | number, item: DropdownItem) => any) | undefined;
|
|
42
45
|
"onUpdate:open"?: ((value: boolean | undefined) => any) | undefined;
|
|
43
46
|
}>, {
|
|
44
47
|
disabled: boolean;
|
|
48
|
+
align: "start" | "center" | "end";
|
|
45
49
|
side: "top" | "right" | "bottom" | "left";
|
|
46
50
|
sideOffset: number;
|
|
47
|
-
align: "start" | "center" | "end";
|
|
48
51
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
49
52
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
50
53
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { Fragment as e,
|
|
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, normalizeClass as u, openBlock as d, renderList as f, renderSlot as p, resolveDynamicComponent as m, toDisplayString as h, unref as g, useModel as _, withCtx as v } from "vue";
|
|
2
|
+
import { DropdownMenuContent as y, DropdownMenuItem as b, DropdownMenuLabel as x, DropdownMenuPortal as S, DropdownMenuRoot as C, DropdownMenuSeparator as w, DropdownMenuTrigger as T } from "reka-ui";
|
|
3
3
|
//#region components/KDropdown.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
-
var
|
|
4
|
+
var E = { class: "k-dropdown-item__label" }, D = {
|
|
5
5
|
key: 1,
|
|
6
6
|
class: "k-dropdown-item__shortcut"
|
|
7
|
-
},
|
|
7
|
+
}, O = /* @__PURE__ */ c({
|
|
8
8
|
__name: "KDropdown",
|
|
9
|
-
props: /* @__PURE__ */
|
|
9
|
+
props: /* @__PURE__ */ l({
|
|
10
10
|
items: {},
|
|
11
|
+
options: {},
|
|
12
|
+
trigger: {},
|
|
11
13
|
side: { default: "bottom" },
|
|
12
14
|
align: { default: "end" },
|
|
13
15
|
sideOffset: { default: 6 },
|
|
@@ -20,62 +22,62 @@ var T = { class: "k-dropdown-item__label" }, E = {
|
|
|
20
22
|
open: { type: Boolean },
|
|
21
23
|
openModifiers: {}
|
|
22
24
|
}),
|
|
23
|
-
emits: /* @__PURE__ */
|
|
24
|
-
setup(
|
|
25
|
-
let
|
|
26
|
-
function
|
|
27
|
-
e.disabled ||
|
|
25
|
+
emits: /* @__PURE__ */ l(["select"], ["update:open"]),
|
|
26
|
+
setup(c, { emit: l }) {
|
|
27
|
+
let O = c, k = _(c, "open"), A = l, j = t(() => O.items ?? O.options ?? []);
|
|
28
|
+
function M(e) {
|
|
29
|
+
e.disabled || A("select", e.key, e);
|
|
28
30
|
}
|
|
29
|
-
return (
|
|
30
|
-
open:
|
|
31
|
-
"onUpdate:open":
|
|
31
|
+
return (t, l) => (d(), n(g(C), {
|
|
32
|
+
open: k.value,
|
|
33
|
+
"onUpdate:open": l[0] ||= (e) => k.value = e
|
|
32
34
|
}, {
|
|
33
|
-
default:
|
|
35
|
+
default: v(() => [s(g(T), {
|
|
34
36
|
"as-child": "",
|
|
35
|
-
disabled:
|
|
37
|
+
disabled: c.disabled
|
|
36
38
|
}, {
|
|
37
|
-
default:
|
|
39
|
+
default: v(() => [a("span", { class: u(["k-dropdown-trigger", { "k-dropdown-trigger--disabled": c.disabled }]) }, [p(t.$slots, "default")], 2)]),
|
|
38
40
|
_: 3
|
|
39
|
-
}, 8, ["disabled"]),
|
|
40
|
-
default:
|
|
41
|
-
class:
|
|
42
|
-
side:
|
|
43
|
-
align:
|
|
44
|
-
"side-offset":
|
|
41
|
+
}, 8, ["disabled"]), s(g(S), null, {
|
|
42
|
+
default: v(() => [s(g(y), {
|
|
43
|
+
class: u(["k-dropdown-content k-menu-surface", c.contentClass]),
|
|
44
|
+
side: c.side,
|
|
45
|
+
align: c.align,
|
|
46
|
+
"side-offset": c.sideOffset
|
|
45
47
|
}, {
|
|
46
|
-
default:
|
|
48
|
+
default: v(() => [(d(!0), i(e, null, f(j.value, (t, s) => (d(), i(e, { key: t.key || `_${s}` }, [t.type === "separator" ? (d(), n(g(w), {
|
|
47
49
|
key: 0,
|
|
48
50
|
class: "k-dropdown-sep"
|
|
49
|
-
})) :
|
|
51
|
+
})) : t.type === "label" ? (d(), n(g(x), {
|
|
50
52
|
key: 1,
|
|
51
53
|
class: "k-dropdown-label"
|
|
52
54
|
}, {
|
|
53
|
-
default:
|
|
55
|
+
default: v(() => [o(h(t.label), 1)]),
|
|
54
56
|
_: 2
|
|
55
|
-
}, 1024)) : (
|
|
57
|
+
}, 1024)) : (d(), n(g(b), {
|
|
56
58
|
key: 2,
|
|
57
|
-
class:
|
|
58
|
-
"k-dropdown-item--danger":
|
|
59
|
-
"k-dropdown-item--active":
|
|
59
|
+
class: u(["k-dropdown-item k-menu-item", {
|
|
60
|
+
"k-dropdown-item--danger": t.danger,
|
|
61
|
+
"k-dropdown-item--active": t.active
|
|
60
62
|
}]),
|
|
61
|
-
disabled:
|
|
62
|
-
onSelect: (e) =>
|
|
63
|
+
disabled: t.disabled,
|
|
64
|
+
onSelect: (e) => M(t)
|
|
63
65
|
}, {
|
|
64
|
-
default:
|
|
65
|
-
|
|
66
|
+
default: v(() => [
|
|
67
|
+
t.icon ? (d(), n(m(t.icon), {
|
|
66
68
|
key: 0,
|
|
67
69
|
size: 15,
|
|
68
70
|
class: "k-dropdown-item__icon"
|
|
69
|
-
})) :
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
})) : r("", !0),
|
|
72
|
+
a("span", E, h(t.label), 1),
|
|
73
|
+
t.shortcut ? (d(), i("span", D, h(t.shortcut), 1)) : r("", !0)
|
|
72
74
|
]),
|
|
73
75
|
_: 2
|
|
74
76
|
}, 1032, [
|
|
75
77
|
"class",
|
|
76
78
|
"disabled",
|
|
77
79
|
"onSelect"
|
|
78
|
-
]))], 64))), 128)),
|
|
80
|
+
]))], 64))), 128)), p(t.$slots, "extra")]),
|
|
79
81
|
_: 3
|
|
80
82
|
}, 8, [
|
|
81
83
|
"class",
|
|
@@ -90,4 +92,4 @@ var T = { class: "k-dropdown-item__label" }, E = {
|
|
|
90
92
|
}
|
|
91
93
|
});
|
|
92
94
|
//#endregion
|
|
93
|
-
export {
|
|
95
|
+
export { O as default };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue?: any[];
|
|
3
|
+
min?: number;
|
|
4
|
+
max?: number;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
/** 新增行的默认值工厂 */
|
|
7
|
+
onCreate?: () => any;
|
|
8
|
+
};
|
|
9
|
+
declare var __VLS_1: {
|
|
10
|
+
value: any;
|
|
11
|
+
index: number;
|
|
12
|
+
update: (v: any) => void;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_Slots = {} & {
|
|
15
|
+
default?: (props: typeof __VLS_1) => any;
|
|
16
|
+
};
|
|
17
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
18
|
+
"update:modelValue": (v: any[]) => any;
|
|
19
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
20
|
+
"onUpdate:modelValue"?: ((v: any[]) => any) | undefined;
|
|
21
|
+
}>, {
|
|
22
|
+
min: number;
|
|
23
|
+
modelValue: any[];
|
|
24
|
+
placeholder: string;
|
|
25
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
27
|
+
declare const _default: typeof __VLS_export;
|
|
28
|
+
export default _default;
|
|
29
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
30
|
+
new (): {
|
|
31
|
+
$slots: S;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "./KDynamicInput.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region components/KDynamicInput.vue
|
|
5
|
+
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-455e370f"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import e from "./KButton.vue.js";
|
|
2
|
+
import t from "./KInput.vue.js";
|
|
3
|
+
import { Fragment as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, openBlock as u, renderList as d, renderSlot as f, unref as p, withCtx as m } from "vue";
|
|
4
|
+
import { Plus as h, Trash2 as g } from "lucide-vue-next";
|
|
5
|
+
//#region components/KDynamicInput.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var _ = { class: "k-dinput" }, v = { class: "k-dinput__field" }, y = { class: "k-dinput__ops" }, b = /* @__PURE__ */ l({
|
|
7
|
+
__name: "KDynamicInput",
|
|
8
|
+
props: {
|
|
9
|
+
modelValue: { default: () => [] },
|
|
10
|
+
min: { default: 0 },
|
|
11
|
+
max: {},
|
|
12
|
+
placeholder: { default: "请输入" },
|
|
13
|
+
onCreate: {}
|
|
14
|
+
},
|
|
15
|
+
emits: ["update:modelValue"],
|
|
16
|
+
setup(l, { emit: b }) {
|
|
17
|
+
let x = l, S = b;
|
|
18
|
+
function C() {
|
|
19
|
+
return x.onCreate ? x.onCreate() : "";
|
|
20
|
+
}
|
|
21
|
+
function w(e) {
|
|
22
|
+
if (x.max != null && x.modelValue.length >= x.max) return;
|
|
23
|
+
let t = x.modelValue.slice();
|
|
24
|
+
t.splice(e == null ? t.length : e + 1, 0, C()), S("update:modelValue", t);
|
|
25
|
+
}
|
|
26
|
+
function T(e) {
|
|
27
|
+
if (x.modelValue.length <= x.min) return;
|
|
28
|
+
let t = x.modelValue.slice();
|
|
29
|
+
t.splice(e, 1), S("update:modelValue", t);
|
|
30
|
+
}
|
|
31
|
+
function E(e, t) {
|
|
32
|
+
let n = x.modelValue.slice();
|
|
33
|
+
n[e] = t, S("update:modelValue", n);
|
|
34
|
+
}
|
|
35
|
+
return (b, x) => (u(), a("div", _, [(u(!0), a(n, null, d(l.modelValue, (n, r) => (u(), a("div", {
|
|
36
|
+
key: r,
|
|
37
|
+
class: "k-dinput__row"
|
|
38
|
+
}, [o("div", v, [f(b.$slots, "default", {
|
|
39
|
+
value: n,
|
|
40
|
+
index: r,
|
|
41
|
+
update: (e) => E(r, e)
|
|
42
|
+
}, () => [c(t, {
|
|
43
|
+
"model-value": n,
|
|
44
|
+
placeholder: l.placeholder,
|
|
45
|
+
"onUpdate:modelValue": (e) => E(r, e)
|
|
46
|
+
}, null, 8, [
|
|
47
|
+
"model-value",
|
|
48
|
+
"placeholder",
|
|
49
|
+
"onUpdate:modelValue"
|
|
50
|
+
])], !0)]), o("div", y, [c(e, {
|
|
51
|
+
size: "sm",
|
|
52
|
+
quaternary: "",
|
|
53
|
+
circle: "",
|
|
54
|
+
disabled: l.modelValue.length <= l.min,
|
|
55
|
+
onClick: (e) => T(r)
|
|
56
|
+
}, {
|
|
57
|
+
icon: m(() => [c(p(g), { size: 15 })]),
|
|
58
|
+
_: 1
|
|
59
|
+
}, 8, ["disabled", "onClick"]), c(e, {
|
|
60
|
+
size: "sm",
|
|
61
|
+
quaternary: "",
|
|
62
|
+
circle: "",
|
|
63
|
+
disabled: l.max != null && l.modelValue.length >= l.max,
|
|
64
|
+
onClick: (e) => w(r)
|
|
65
|
+
}, {
|
|
66
|
+
icon: m(() => [c(p(h), { size: 15 })]),
|
|
67
|
+
_: 1
|
|
68
|
+
}, 8, ["disabled", "onClick"])])]))), 128)), l.modelValue.length === 0 ? (u(), r(e, {
|
|
69
|
+
key: 0,
|
|
70
|
+
size: "sm",
|
|
71
|
+
disabled: l.max != null && l.modelValue.length >= l.max,
|
|
72
|
+
onClick: x[0] ||= (e) => w()
|
|
73
|
+
}, {
|
|
74
|
+
icon: m(() => [c(p(h), { size: 15 })]),
|
|
75
|
+
default: m(() => [x[1] ||= s(" 添加一行 ", -1)]),
|
|
76
|
+
_: 1
|
|
77
|
+
}, 8, ["disabled"])) : i("", !0)]));
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
//#endregion
|
|
81
|
+
export { b as default };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue?: string[];
|
|
3
|
+
max?: number;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
/** 是否允许重复值 */
|
|
6
|
+
allowDuplicate?: boolean;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
10
|
+
"update:modelValue": (v: string[]) => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
+
"onUpdate:modelValue"?: ((v: string[]) => any) | undefined;
|
|
13
|
+
}>, {
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
modelValue: string[];
|
|
16
|
+
placeholder: string;
|
|
17
|
+
allowDuplicate: boolean;
|
|
18
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "./KDynamicTags.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region components/KDynamicTags.vue
|
|
5
|
+
var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-084ffc13"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Fragment as e, computed as t, createCommentVNode as n, createElementBlock as r, createTextVNode as i, createVNode as a, defineComponent as o, nextTick as s, normalizeClass as c, openBlock as l, ref as u, renderList as d, toDisplayString as f, unref as p, vModelText as m, withDirectives as h, withKeys as g, withModifiers as _ } from "vue";
|
|
2
|
+
import { Plus as v, X as y } from "lucide-vue-next";
|
|
3
|
+
//#region components/KDynamicTags.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var b = ["onClick"], x = ["placeholder", "onKeydown"], S = /* @__PURE__ */ o({
|
|
5
|
+
__name: "KDynamicTags",
|
|
6
|
+
props: {
|
|
7
|
+
modelValue: { default: () => [] },
|
|
8
|
+
max: {},
|
|
9
|
+
disabled: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: !1
|
|
12
|
+
},
|
|
13
|
+
allowDuplicate: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: !1
|
|
16
|
+
},
|
|
17
|
+
placeholder: { default: "输入后回车" }
|
|
18
|
+
},
|
|
19
|
+
emits: ["update:modelValue"],
|
|
20
|
+
setup(o, { emit: S }) {
|
|
21
|
+
let C = o, w = S, T = u(!1), E = u(""), D = u(null), O = t(() => C.max != null && C.modelValue.length >= C.max);
|
|
22
|
+
async function k() {
|
|
23
|
+
C.disabled || O.value || (T.value = !0, await s(), D.value?.focus());
|
|
24
|
+
}
|
|
25
|
+
function A() {
|
|
26
|
+
let e = E.value.trim();
|
|
27
|
+
e && (C.allowDuplicate || !C.modelValue.includes(e)) && w("update:modelValue", [...C.modelValue, e]), E.value = "", T.value = !1;
|
|
28
|
+
}
|
|
29
|
+
function j(e) {
|
|
30
|
+
if (C.disabled) return;
|
|
31
|
+
let t = C.modelValue.slice();
|
|
32
|
+
t.splice(e, 1), w("update:modelValue", t);
|
|
33
|
+
}
|
|
34
|
+
return (t, s) => (l(), r("div", { class: c(["k-dtags", { "k-dtags--disabled": o.disabled }]) }, [(l(!0), r(e, null, d(o.modelValue, (e, t) => (l(), r("span", {
|
|
35
|
+
key: `${e}-${t}`,
|
|
36
|
+
class: "k-dtags__tag"
|
|
37
|
+
}, [i(f(e) + " ", 1), o.disabled ? n("", !0) : (l(), r("button", {
|
|
38
|
+
key: 0,
|
|
39
|
+
type: "button",
|
|
40
|
+
class: "k-dtags__close",
|
|
41
|
+
onClick: (e) => j(t)
|
|
42
|
+
}, [a(p(y), { size: 12 })], 8, b))]))), 128)), T.value ? h((l(), r("input", {
|
|
43
|
+
key: 0,
|
|
44
|
+
ref_key: "inputEl",
|
|
45
|
+
ref: D,
|
|
46
|
+
"onUpdate:modelValue": s[0] ||= (e) => E.value = e,
|
|
47
|
+
class: "k-dtags__input",
|
|
48
|
+
placeholder: o.placeholder,
|
|
49
|
+
onKeydown: g(_(A, ["prevent"]), ["enter"]),
|
|
50
|
+
onBlur: A
|
|
51
|
+
}, null, 40, x)), [[m, E.value]]) : !o.disabled && !O.value ? (l(), r("button", {
|
|
52
|
+
key: 1,
|
|
53
|
+
type: "button",
|
|
54
|
+
class: "k-dtags__add",
|
|
55
|
+
onClick: k
|
|
56
|
+
}, [a(p(v), { size: 13 }), s[1] ||= i(" 添加 ", -1)])) : n("", !0)], 2));
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
//#endregion
|
|
60
|
+
export { S as default };
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import type { Component } from 'vue';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
icon?: Component;
|
|
4
|
-
title
|
|
4
|
+
title?: string;
|
|
5
5
|
description?: string;
|
|
6
6
|
compact?: boolean;
|
|
7
7
|
};
|
|
8
|
-
declare var __VLS_6: {}, __VLS_8: {};
|
|
8
|
+
declare var __VLS_6: {}, __VLS_8: {}, __VLS_10: {}, __VLS_12: {};
|
|
9
9
|
type __VLS_Slots = {} & {
|
|
10
|
-
|
|
10
|
+
title?: (props: typeof __VLS_6) => any;
|
|
11
11
|
} & {
|
|
12
|
-
|
|
12
|
+
default?: (props: typeof __VLS_8) => any;
|
|
13
|
+
} & {
|
|
14
|
+
actions?: (props: typeof __VLS_10) => any;
|
|
15
|
+
} & {
|
|
16
|
+
extra?: (props: typeof __VLS_12) => any;
|
|
13
17
|
};
|
|
14
18
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
19
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { createBlock as e, createCommentVNode as t, createElementBlock as n,
|
|
1
|
+
import { createBlock as e, createCommentVNode as t, createElementBlock as n, createTextVNode as r, defineComponent as i, normalizeClass as a, openBlock as o, renderSlot as s, resolveDynamicComponent as c, toDisplayString as l } from "vue";
|
|
2
2
|
//#region components/KEmpty.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
-
var
|
|
4
|
-
key:
|
|
3
|
+
var u = {
|
|
4
|
+
key: 3,
|
|
5
5
|
class: "mt-3 flex flex-wrap items-center justify-center gap-2"
|
|
6
|
-
},
|
|
6
|
+
}, d = /* @__PURE__ */ i({
|
|
7
7
|
__name: "KEmpty",
|
|
8
8
|
props: {
|
|
9
9
|
icon: {},
|
|
@@ -11,20 +11,23 @@ var d = {
|
|
|
11
11
|
description: {},
|
|
12
12
|
compact: { type: Boolean }
|
|
13
13
|
},
|
|
14
|
-
setup(
|
|
15
|
-
return (
|
|
16
|
-
|
|
14
|
+
setup(i) {
|
|
15
|
+
return (d, f) => (o(), n("div", { class: a(["grid place-items-center rounded-2xl border border-dashed border-ink-200 bg-white text-center", i.compact ? "px-4 py-10" : "px-6 py-20"]) }, [
|
|
16
|
+
i.icon ? (o(), e(c(i.icon), {
|
|
17
17
|
key: 0,
|
|
18
|
-
class:
|
|
18
|
+
class: a(["text-ink-300", i.compact ? "size-7" : "size-10"])
|
|
19
19
|
}, null, 8, ["class"])) : t("", !0),
|
|
20
|
-
|
|
21
|
-
f.$slots.default || a.description ? (s(), n("p", {
|
|
20
|
+
i.title || d.$slots.title ? (o(), n("p", {
|
|
22
21
|
key: 1,
|
|
23
|
-
class:
|
|
24
|
-
}, [
|
|
25
|
-
|
|
22
|
+
class: a(["mt-3 font-medium text-ink-700", i.compact ? "text-xs" : "text-sm"])
|
|
23
|
+
}, [s(d.$slots, "title", {}, () => [r(l(i.title), 1)])], 2)) : t("", !0),
|
|
24
|
+
d.$slots.default || i.description ? (o(), n("p", {
|
|
25
|
+
key: 2,
|
|
26
|
+
class: a(["mt-1 text-ink-400", i.compact ? "text-[11px]" : "text-xs"])
|
|
27
|
+
}, [s(d.$slots, "default", {}, () => [r(l(i.description), 1)])], 2)) : t("", !0),
|
|
28
|
+
d.$slots.actions || d.$slots.extra ? (o(), n("div", u, [s(d.$slots, "actions", {}, () => [s(d.$slots, "extra")])])) : t("", !0)
|
|
26
29
|
], 2));
|
|
27
30
|
}
|
|
28
31
|
});
|
|
29
32
|
//#endregion
|
|
30
|
-
export {
|
|
33
|
+
export { d as default };
|