hys-ui 0.1.0 → 0.2.0
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/CHANGELOG.md +137 -1
- package/README.md +18 -6
- package/dist/components/HysAccordion/HysAccordion.vue.js +1 -1
- package/dist/components/HysAccordion/HysAccordion2.vue.js +181 -47
- package/dist/components/HysAlert/HysAlert.vue.js +14 -14
- package/dist/components/HysAnimatedNumber/HysAnimatedNumber.vue.js +23 -20
- package/dist/components/HysAutocomplete/HysAutocomplete.vue.js +7 -0
- package/dist/components/HysAutocomplete/HysAutocomplete2.vue.js +627 -0
- package/dist/components/HysAvatar/HysAvatar.vue.js +5 -35
- package/dist/components/HysAvatar/HysAvatar2.vue.js +221 -2
- package/dist/components/HysAvatarGroup/HysAvatarGroup.vue.js +7 -0
- package/dist/components/HysAvatarGroup/HysAvatarGroup2.vue.js +252 -0
- package/dist/components/HysBadge/HysBadge.vue.js +2 -2
- package/dist/components/HysBadge/HysBadge2.vue.js +154 -26
- package/dist/components/HysBreadcrumb/HysBreadcrumb.vue.js +5 -38
- package/dist/components/HysBreadcrumb/HysBreadcrumb2.vue.js +74 -2
- package/dist/components/HysButton/HysButton.vue.js +2 -2
- package/dist/components/HysButton/HysButton2.vue.js +29 -28
- package/dist/components/HysCalendar/HysCalendar.vue.js +5 -84
- package/dist/components/HysCalendar/HysCalendar2.vue.js +803 -2
- package/dist/components/HysCard/HysCard.vue.js +1 -1
- package/dist/components/HysCard/HysCard2.vue.js +177 -44
- package/dist/components/HysCascader/HysCascader.vue.js +5 -182
- package/dist/components/HysCascader/HysCascader2.vue.js +760 -2
- package/dist/components/HysCascader/HysCascaderColumn.vue.js +7 -0
- package/dist/components/HysCascader/HysCascaderColumn2.vue.js +232 -0
- package/dist/components/HysCheckbox/HysCheckbox.vue.js +5 -39
- package/dist/components/HysCheckbox/HysCheckbox2.vue.js +200 -2
- package/dist/components/HysCheckboxGroup/HysCheckboxGroup.vue.js +7 -0
- package/dist/components/HysCheckboxGroup/HysCheckboxGroup2.vue.js +237 -0
- package/dist/components/HysColorPicker/HysColorPicker.vue.js +2 -2
- package/dist/components/HysColorPicker/HysColorPicker2.vue.js +107 -106
- package/dist/components/HysCommandPalette/HysCommandPalette.vue.js +52 -51
- package/dist/components/HysCommentEditor/HysCommentEditor.vue.js +17 -17
- package/dist/components/HysDataGrid/HysDataGrid.vue.js +1 -1
- package/dist/components/HysDataGrid/HysDataGrid2.vue.js +397 -390
- package/dist/components/HysDatePicker/HysDatePicker.vue.js +268 -139
- package/dist/components/HysDatePicker/HysDatePickerControl.vue.js +7 -0
- package/dist/components/HysDatePicker/HysDatePickerControl2.vue.js +807 -0
- package/dist/components/HysDatePicker/HysDatePickerPanel.vue.js +7 -0
- package/dist/components/HysDatePicker/HysDatePickerPanel2.vue.js +357 -0
- package/dist/components/HysDateRangePicker/HysDateRangePicker.vue.js +268 -158
- package/dist/components/HysDivider/HysDivider.vue.js +2 -2
- package/dist/components/HysDivider/HysDivider2.vue.js +33 -13
- package/dist/components/HysDrawer/HysDrawer.vue.js +1 -1
- package/dist/components/HysDrawer/HysDrawer2.vue.js +55 -54
- package/dist/components/HysFileManager/HysFileManager.vue.js +5 -63
- package/dist/components/HysFileManager/HysFileManager2.vue.js +86 -2
- package/dist/components/HysForm/HysForm.vue.js +3 -3
- package/dist/components/HysForm/HysForm2.vue.js +580 -92
- package/dist/components/HysFormItem/HysFormItem.vue.js +5 -69
- package/dist/components/HysFormItem/HysFormItem2.vue.js +521 -2
- package/dist/components/HysGantt/HysGantt.vue.js +5 -264
- package/dist/components/HysGantt/HysGantt2.vue.js +1399 -2
- package/dist/components/HysInput/HysInput.vue.js +2 -2
- package/dist/components/HysInput/HysInput2.vue.js +468 -120
- package/dist/components/HysMention/HysMention.vue.js +2 -2
- package/dist/components/HysMention/HysMention2.vue.js +89 -88
- package/dist/components/HysModal/HysModal.vue.js +2 -2
- package/dist/components/HysModal/HysModal2.vue.js +35 -35
- package/dist/components/HysNotificationCenter/HysNotificationCenter.vue.js +37 -36
- package/dist/components/HysNumberInput/HysNumberInput.vue.js +2 -2
- package/dist/components/HysNumberInput/HysNumberInput2.vue.js +561 -70
- package/dist/components/HysOrgTree/HysOrgTree.vue.js +41 -36
- package/dist/components/HysPagination/HysPagination.vue.js +2 -2
- package/dist/components/HysPagination/HysPagination2.vue.js +93 -91
- package/dist/components/HysPermissionMatrix/HysPermissionMatrix.vue.js +5 -41
- package/dist/components/HysPermissionMatrix/HysPermissionMatrix2.vue.js +101 -2
- package/dist/components/HysRadio/HysRadio.vue.js +7 -0
- package/dist/components/HysRadio/HysRadio2.vue.js +180 -0
- package/dist/components/HysRadioGroup/HysRadioGroup.vue.js +5 -40
- package/dist/components/HysRadioGroup/HysRadioGroup2.vue.js +205 -2
- package/dist/components/HysRating/HysRating.vue.js +1 -1
- package/dist/components/HysRating/HysRating2.vue.js +288 -68
- package/dist/components/HysResizablePanel/HysResizablePanel.vue.js +46 -28
- package/dist/components/HysRichTextEditor/HysRichTextEditor.vue.js +2 -2
- package/dist/components/HysRichTextEditor/HysRichTextEditor2.vue.js +87 -67
- package/dist/components/HysSearch/HysSearch.vue.js +50 -38
- package/dist/components/HysSegmented/HysSegmented.vue.js +5 -58
- package/dist/components/HysSegmented/HysSegmented2.vue.js +273 -2
- package/dist/components/HysSelect/HysSelect.vue.js +3 -2
- package/dist/components/HysSelect/HysSelect2.vue.js +859 -164
- package/dist/components/HysSkeleton/HysSkeleton.vue.js +2 -2
- package/dist/components/HysSkeleton/HysSkeleton2.vue.js +126 -29
- package/dist/components/HysSlider/HysSlider.vue.js +2 -2
- package/dist/components/HysSlider/HysSlider2.vue.js +532 -59
- package/dist/components/HysSlider/SliderTooltip.vue.js +7 -0
- package/dist/components/HysSlider/SliderTooltip2.vue.js +156 -0
- package/dist/components/HysSplitPane/HysSplitPane.vue.js +48 -42
- package/dist/components/HysSteps/HysSteps.vue.js +2 -2
- package/dist/components/HysSteps/HysSteps2.vue.js +111 -36
- package/dist/components/HysSwitch/HysSwitch.vue.js +2 -2
- package/dist/components/HysSwitch/HysSwitch2.vue.js +235 -42
- package/dist/components/HysTable/HysTable.vue.js +1 -1
- package/dist/components/HysTable/HysTable2.vue.js +1471 -82
- package/dist/components/HysTable/HysTableFilterOptions.vue.js +7 -0
- package/dist/components/HysTable/HysTableFilterOptions2.vue.js +133 -0
- package/dist/components/HysTabs/HysTabs.vue.js +2 -2
- package/dist/components/HysTabs/HysTabs2.vue.js +262 -66
- package/dist/components/HysTagInput/HysTagInput.vue.js +43 -42
- package/dist/components/HysTextarea/HysTextarea.vue.js +137 -66
- package/dist/components/HysToast/HysToast.vue.js +2 -2
- package/dist/components/HysToast/HysToast2.vue.js +121 -38
- package/dist/components/HysTour/HysTour.vue.js +47 -42
- package/dist/components/HysTransfer/HysTransfer.vue.js +5 -207
- package/dist/components/HysTransfer/HysTransfer2.vue.js +416 -2
- package/dist/components/HysTransfer/HysTransferPanel.vue.js +7 -0
- package/dist/components/HysTransfer/HysTransferPanel2.vue.js +454 -0
- package/dist/components/HysTree/HysTree.vue.js +2 -3
- package/dist/components/HysTree/HysTree2.vue.js +641 -301
- package/dist/components/HysTreeSelect/HysTreeSelect.vue.js +5 -129
- package/dist/components/HysTreeSelect/HysTreeSelect2.vue.js +558 -2
- package/dist/components/HysTreeSelect/HysTreeSelectPanel.vue.js +7 -0
- package/dist/components/HysTreeSelect/HysTreeSelectPanel2.vue.js +323 -0
- package/dist/components/HysUpload/HysUpload.vue.js +2 -2
- package/dist/components/HysUpload/HysUpload2.vue.js +97 -78
- package/dist/composables/autocomplete.js +50 -0
- package/dist/composables/avatar.js +57 -0
- package/dist/composables/calendar.js +96 -0
- package/dist/composables/cascader.js +79 -0
- package/dist/composables/choice.js +38 -0
- package/dist/composables/choiceModel.js +67 -0
- package/dist/composables/datePicker.js +227 -0
- package/dist/composables/formContext.js +94 -3
- package/dist/composables/formLayout.js +57 -0
- package/dist/composables/formValidation.js +240 -0
- package/dist/composables/ganttConflicts.js +143 -0
- package/dist/composables/numberInput.js +91 -0
- package/dist/composables/rating.js +16 -0
- package/dist/composables/selectOptions.js +54 -0
- package/dist/composables/table.js +150 -0
- package/dist/composables/textInput.js +34 -0
- package/dist/composables/toastEscape.js +16 -0
- package/dist/composables/transfer.js +63 -0
- package/dist/composables/tree.js +118 -0
- package/dist/composables/treeSelect.js +71 -0
- package/dist/composables/useCascader.js +438 -0
- package/dist/composables/useDatePicker.js +425 -0
- package/dist/composables/useDialog.js +16 -16
- package/dist/composables/useFloating.js +98 -52
- package/dist/composables/useGanttDependencies.js +306 -0
- package/dist/composables/useGanttHistory.js +157 -0
- package/dist/composables/useGanttLabelResize.js +100 -0
- package/dist/composables/useHysToast.js +148 -0
- package/dist/composables/useTable.js +474 -0
- package/dist/composables/useTextareaSize.js +72 -0
- package/dist/composables/useTransfer.js +257 -0
- package/dist/composables/useTree.js +439 -0
- package/dist/composables/useTreeSelect.js +361 -0
- package/dist/config.js +18 -15
- package/dist/index.js +149 -136
- package/dist/style.css +1 -1
- package/dist/types/components/HysAccordion/HysAccordion.vue.d.ts +61 -22
- package/dist/types/components/HysAutocomplete/HysAutocomplete.vue.d.ts +201 -0
- package/dist/types/components/HysAvatar/HysAvatar.vue.d.ts +28 -15
- package/dist/types/components/HysAvatarGroup/HysAvatarGroup.vue.d.ts +99 -0
- package/dist/types/components/HysBadge/HysBadge.vue.d.ts +41 -4
- package/dist/types/components/HysBreadcrumb/HysBreadcrumb.vue.d.ts +38 -10
- package/dist/types/components/HysButton/HysButton.vue.d.ts +0 -1
- package/dist/types/components/HysCalendar/HysCalendar.vue.d.ts +119 -29
- package/dist/types/components/HysCard/HysCard.vue.d.ts +57 -5
- package/dist/types/components/HysCascader/HysCascader.vue.d.ts +129 -41
- package/dist/types/components/HysCascader/HysCascaderColumn.vue.d.ts +55 -0
- package/dist/types/components/HysCheckbox/HysCheckbox.vue.d.ts +55 -27
- package/dist/types/components/HysCheckboxGroup/HysCheckboxGroup.vue.d.ts +73 -0
- package/dist/types/components/HysDataGrid/HysDataGrid.vue.d.ts +1 -1
- package/dist/types/components/HysDatePicker/HysDatePicker.vue.d.ts +66 -14
- package/dist/types/components/HysDatePicker/HysDatePickerControl.vue.d.ts +90 -0
- package/dist/types/components/HysDatePicker/HysDatePickerPanel.vue.d.ts +93 -0
- package/dist/types/components/HysDateRangePicker/HysDateRangePicker.vue.d.ts +66 -14
- package/dist/types/components/HysDivider/HysDivider.vue.d.ts +8 -3
- package/dist/types/components/HysDrawer/HysDrawer.vue.d.ts +1 -0
- package/dist/types/components/HysFileManager/HysFileManager.vue.d.ts +8 -4
- package/dist/types/components/HysForm/HysForm.vue.d.ts +110 -18
- package/dist/types/components/HysFormItem/HysFormItem.vue.d.ts +108 -2
- package/dist/types/components/HysGantt/HysGantt.vue.d.ts +88 -4
- package/dist/types/components/HysInput/HysInput.vue.d.ts +52 -29
- package/dist/types/components/HysMention/HysMention.vue.d.ts +2 -2
- package/dist/types/components/HysNumberInput/HysNumberInput.vue.d.ts +93 -33
- package/dist/types/components/HysOrgTree/HysOrgTree.vue.d.ts +4 -1
- package/dist/types/components/HysPagination/HysPagination.vue.d.ts +1 -1
- package/dist/types/components/HysPermissionMatrix/HysPermissionMatrix.vue.d.ts +8 -1
- package/dist/types/components/HysPopover/HysPopover.vue.d.ts +3 -3
- package/dist/types/components/HysProgress/HysProgress.vue.d.ts +1 -1
- package/dist/types/components/HysRadio/HysRadio.vue.d.ts +56 -0
- package/dist/types/components/HysRadioGroup/HysRadioGroup.vue.d.ts +62 -17
- package/dist/types/components/HysRating/HysRating.vue.d.ts +85 -5
- package/dist/types/components/HysResizablePanel/HysResizablePanel.vue.d.ts +6 -0
- package/dist/types/components/HysRichTextEditor/HysRichTextEditor.vue.d.ts +4 -4
- package/dist/types/components/HysSearch/HysSearch.vue.d.ts +2 -2
- package/dist/types/components/HysSegmented/HysSegmented.vue.d.ts +64 -32
- package/dist/types/components/HysSelect/HysSelect.vue.d.ts +120 -14
- package/dist/types/components/HysSkeleton/HysSkeleton.vue.d.ts +30 -2
- package/dist/types/components/HysSlider/HysSlider.vue.d.ts +66 -9
- package/dist/types/components/HysSlider/SliderTooltip.vue.d.ts +22 -0
- package/dist/types/components/HysSplitPane/HysSplitPane.vue.d.ts +6 -0
- package/dist/types/components/HysSteps/HysSteps.vue.d.ts +65 -9
- package/dist/types/components/HysSwitch/HysSwitch.vue.d.ts +76 -17
- package/dist/types/components/HysTable/HysTable.vue.d.ts +206 -32
- package/dist/types/components/HysTable/HysTableFilterOptions.vue.d.ts +18 -0
- package/dist/types/components/HysTabs/HysTabs.vue.d.ts +76 -23
- package/dist/types/components/HysTagInput/HysTagInput.vue.d.ts +5 -5
- package/dist/types/components/HysTextarea/HysTextarea.vue.d.ts +44 -27
- package/dist/types/components/HysToast/HysToast.vue.d.ts +55 -7
- package/dist/types/components/HysTour/HysTour.vue.d.ts +5 -3
- package/dist/types/components/HysTransfer/HysTransfer.vue.d.ts +55 -30
- package/dist/types/components/HysTransfer/HysTransferPanel.vue.d.ts +105 -0
- package/dist/types/components/HysTree/HysTree.vue.d.ts +140 -73
- package/dist/types/components/HysTreeSelect/HysTreeSelect.vue.d.ts +102 -23
- package/dist/types/components/HysTreeSelect/HysTreeSelectPanel.vue.d.ts +56 -0
- package/dist/types/composables/autocomplete.d.ts +106 -0
- package/dist/types/composables/avatar.d.ts +70 -0
- package/dist/types/composables/calendar.d.ts +66 -0
- package/dist/types/composables/cascader.d.ts +192 -0
- package/dist/types/composables/choice.d.ts +110 -0
- package/dist/types/composables/choiceModel.d.ts +11 -0
- package/dist/types/composables/datePicker.d.ts +247 -0
- package/dist/types/composables/formContext.d.ts +138 -8
- package/dist/types/composables/formLayout.d.ts +11 -0
- package/dist/types/composables/formValidation.d.ts +13 -0
- package/dist/types/composables/gantt.d.ts +68 -0
- package/dist/types/composables/ganttConflicts.d.ts +30 -0
- package/dist/types/composables/numberInput.d.ts +45 -0
- package/dist/types/composables/rating.d.ts +18 -0
- package/dist/types/composables/segmented.d.ts +15 -0
- package/dist/types/composables/selectOptions.d.ts +44 -0
- package/dist/types/composables/slider.d.ts +21 -0
- package/dist/types/composables/table.d.ts +309 -0
- package/dist/types/composables/textInput.d.ts +76 -0
- package/dist/types/composables/toastEscape.d.ts +1 -0
- package/dist/types/composables/transfer.d.ts +180 -0
- package/dist/types/composables/tree.d.ts +237 -0
- package/dist/types/composables/treeSelect.d.ts +167 -0
- package/dist/types/composables/useCascader.d.ts +162 -0
- package/dist/types/composables/useDatePicker.d.ts +79 -0
- package/dist/types/composables/useFloating.d.ts +8 -5
- package/dist/types/composables/useGanttDependencies.d.ts +83 -0
- package/dist/types/composables/useGanttHistory.d.ts +42 -0
- package/dist/types/composables/useGanttLabelResize.d.ts +23 -0
- package/dist/types/composables/useHysToast.d.ts +50 -0
- package/dist/types/composables/useTable.d.ts +60 -0
- package/dist/types/composables/useTextareaSize.d.ts +3 -0
- package/dist/types/composables/useTransfer.d.ts +58 -0
- package/dist/types/composables/useTree.d.ts +77 -0
- package/dist/types/composables/useTreeSelect.d.ts +117 -0
- package/dist/types/index.d.ts +38 -7
- package/package.json +47 -11
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./HysCard2.vue.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-4edda4d1"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,58 +1,191 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useHysRootAttrs as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class: "hys-ui-card-head"
|
|
6
|
-
}, f = {
|
|
1
|
+
import { defineComponent as P, useId as U, ref as A, computed as B, onDeactivated as j, onBeforeUnmount as G, onActivated as J, openBlock as l, createElementBlock as s, mergeProps as M, unref as b, renderSlot as d, createCommentVNode as r, normalizeStyle as z, normalizeClass as H, createElementVNode as L, createTextVNode as E, toDisplayString as C, Fragment as O, renderList as Q, createVNode as W, nextTick as X } from "vue";
|
|
2
|
+
import { useHysRootAttrs as Y } from "../../config.js";
|
|
3
|
+
import Z from "../HysSkeleton/HysSkeleton.vue.js";
|
|
4
|
+
const p = ["aria-busy"], _ = {
|
|
7
5
|
key: 0,
|
|
6
|
+
class: "hys-ui-card-cover"
|
|
7
|
+
}, ee = { class: "hys-ui-card-heading" }, te = { key: 0 }, ae = {
|
|
8
|
+
key: 1,
|
|
8
9
|
class: "hys-ui-muted hys-ui-small"
|
|
9
|
-
},
|
|
10
|
+
}, le = {
|
|
10
11
|
key: 0,
|
|
11
|
-
|
|
12
|
-
},
|
|
13
|
-
key:
|
|
14
|
-
class: "hys-ui-card-
|
|
15
|
-
},
|
|
12
|
+
class: "hys-ui-card-extra"
|
|
13
|
+
}, se = {
|
|
14
|
+
key: 2,
|
|
15
|
+
class: "hys-ui-card-tabs-row"
|
|
16
|
+
}, oe = ["aria-label"], ie = ["id", "aria-selected", "aria-controls", "tabindex", "disabled", "onClick"], de = {
|
|
17
|
+
key: 0,
|
|
18
|
+
class: "hys-ui-card-extra"
|
|
19
|
+
}, ne = ["id", "role", "aria-labelledby", "tabindex", "aria-busy"], re = {
|
|
20
|
+
key: 3,
|
|
21
|
+
class: "hys-ui-card-actions"
|
|
22
|
+
}, ye = /* @__PURE__ */ P({
|
|
16
23
|
__name: "HysCard",
|
|
17
24
|
props: {
|
|
18
25
|
title: {},
|
|
19
26
|
subtitle: {},
|
|
27
|
+
footer: {},
|
|
20
28
|
loading: { type: Boolean },
|
|
21
|
-
|
|
22
|
-
|
|
29
|
+
loadingText: { default: "加载中" },
|
|
30
|
+
bordered: { type: Boolean, default: !0 },
|
|
31
|
+
shadow: { default: "never" },
|
|
23
32
|
bodyStyle: {},
|
|
24
|
-
|
|
33
|
+
headerStyle: {},
|
|
34
|
+
footerStyle: {},
|
|
35
|
+
bodyClass: {},
|
|
36
|
+
headerClass: {},
|
|
37
|
+
footerClass: {},
|
|
38
|
+
size: { default: "md" },
|
|
39
|
+
hoverable: { type: Boolean },
|
|
40
|
+
type: { default: "default" },
|
|
41
|
+
tabs: {},
|
|
42
|
+
activeTab: {},
|
|
43
|
+
defaultActiveTab: {},
|
|
44
|
+
tabsLabel: { default: "卡片页签" }
|
|
25
45
|
},
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
46
|
+
emits: ["update:activeTab", "tabChange"],
|
|
47
|
+
setup(t, { expose: q, emit: x }) {
|
|
48
|
+
const c = t, N = x, F = Y(), h = U(), f = A(), V = A(), S = A(c.defaultActiveTab), i = B(
|
|
49
|
+
() => {
|
|
50
|
+
var e;
|
|
51
|
+
return ((e = c.tabs) == null ? void 0 : e.filter((o) => !o.disabled)) ?? [];
|
|
52
|
+
}
|
|
53
|
+
), n = B(
|
|
54
|
+
() => {
|
|
55
|
+
var e;
|
|
56
|
+
return c.activeTab ?? (i.value.some((o) => o.value === S.value) ? S.value : (e = i.value[0]) == null ? void 0 : e.value);
|
|
57
|
+
}
|
|
58
|
+
), T = B(
|
|
59
|
+
() => {
|
|
60
|
+
var e;
|
|
61
|
+
return ((e = c.tabs) == null ? void 0 : e.findIndex((o) => o.value === n.value)) ?? -1;
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
let m = !0, w = 0;
|
|
65
|
+
async function D(e) {
|
|
66
|
+
if (!m || c.loading || e === n.value || !i.value.some((u) => u.value === e))
|
|
67
|
+
return;
|
|
68
|
+
const o = ++w;
|
|
69
|
+
S.value = e, N("update:activeTab", e), await X(), m && o === w && n.value === e && N("tabChange", e);
|
|
70
|
+
}
|
|
71
|
+
function K(e) {
|
|
72
|
+
var $, y;
|
|
73
|
+
const o = f.value && getComputedStyle(f.value).direction === "rtl", u = o ? "ArrowLeft" : "ArrowRight", g = o ? "ArrowRight" : "ArrowLeft";
|
|
74
|
+
if (c.loading || ![u, g, "Home", "End"].includes(e.key) || !i.value.length)
|
|
75
|
+
return;
|
|
76
|
+
e.preventDefault();
|
|
77
|
+
const k = i.value.findIndex((R) => R.value === n.value), v = e.key === "Home" ? 0 : e.key === "End" ? i.value.length - 1 : (k + (e.key === u ? 1 : -1) + i.value.length) % i.value.length, a = i.value[v];
|
|
78
|
+
D(a.value), (y = ($ = f.value) == null ? void 0 : $.querySelectorAll("button:not(:disabled)")[v]) == null || y.focus();
|
|
79
|
+
}
|
|
80
|
+
function I() {
|
|
81
|
+
m = !1, w++;
|
|
82
|
+
}
|
|
83
|
+
return j(I), G(I), J(() => m = !0), q({ element: V, activeTab: n }), (e, o) => {
|
|
84
|
+
var u, g, k, v;
|
|
85
|
+
return l(), s("section", M({
|
|
86
|
+
ref_key: "element",
|
|
87
|
+
ref: V
|
|
88
|
+
}, b(F), {
|
|
89
|
+
class: ["hys-ui-card", [
|
|
90
|
+
"hys-ui-card-shadow-" + t.shadow,
|
|
91
|
+
"hys-ui-card-size-" + t.size,
|
|
92
|
+
{
|
|
93
|
+
"hys-ui-card-hoverable": t.hoverable,
|
|
94
|
+
"hys-ui-card-inner": t.type === "inner",
|
|
95
|
+
"hys-ui-card-borderless": !t.bordered
|
|
96
|
+
}
|
|
97
|
+
]],
|
|
98
|
+
"aria-busy": t.loading || void 0
|
|
99
|
+
}), [
|
|
100
|
+
e.$slots.cover ? (l(), s("div", _, [
|
|
101
|
+
d(e.$slots, "cover", {}, void 0, !0)
|
|
102
|
+
])) : r("", !0),
|
|
103
|
+
t.title || t.subtitle || e.$slots.title || e.$slots.header || e.$slots.action ? (l(), s("header", {
|
|
104
|
+
key: 1,
|
|
105
|
+
class: H(["hys-ui-card-head", t.headerClass]),
|
|
106
|
+
style: z(t.headerStyle)
|
|
107
|
+
}, [
|
|
108
|
+
d(e.$slots, "header", {}, () => [
|
|
109
|
+
L("div", ee, [
|
|
110
|
+
t.title || e.$slots.title ? (l(), s("h3", te, [
|
|
111
|
+
d(e.$slots, "title", {}, () => [
|
|
112
|
+
E(C(t.title), 1)
|
|
113
|
+
], !0)
|
|
114
|
+
])) : r("", !0),
|
|
115
|
+
t.subtitle ? (l(), s("p", ae, C(t.subtitle), 1)) : r("", !0)
|
|
116
|
+
])
|
|
117
|
+
], !0),
|
|
118
|
+
e.$slots.action ? (l(), s("div", le, [
|
|
119
|
+
d(e.$slots, "action", {}, void 0, !0)
|
|
120
|
+
])) : r("", !0)
|
|
121
|
+
], 6)) : r("", !0),
|
|
122
|
+
(u = t.tabs) != null && u.length ? (l(), s("div", se, [
|
|
123
|
+
L("div", {
|
|
124
|
+
ref_key: "nav",
|
|
125
|
+
ref: f,
|
|
126
|
+
class: "hys-ui-card-tabs",
|
|
127
|
+
role: "tablist",
|
|
128
|
+
"aria-label": t.tabsLabel,
|
|
129
|
+
onKeydown: K
|
|
130
|
+
}, [
|
|
131
|
+
(l(!0), s(O, null, Q(t.tabs, (a, $) => {
|
|
132
|
+
var y;
|
|
133
|
+
return l(), s("button", {
|
|
134
|
+
id: b(h) + "-tab-" + $,
|
|
135
|
+
key: typeof a.value + ":" + a.value,
|
|
136
|
+
type: "button",
|
|
137
|
+
role: "tab",
|
|
138
|
+
"aria-selected": n.value === a.value,
|
|
139
|
+
"aria-controls": b(h) + "-body",
|
|
140
|
+
tabindex: n.value === a.value || T.value < 0 && ((y = i.value[0]) == null ? void 0 : y.value) === a.value ? 0 : -1,
|
|
141
|
+
disabled: t.loading || a.disabled,
|
|
142
|
+
onClick: (R) => D(a.value)
|
|
143
|
+
}, [
|
|
144
|
+
d(e.$slots, "tab", {
|
|
145
|
+
tab: a,
|
|
146
|
+
active: n.value === a.value
|
|
147
|
+
}, () => [
|
|
148
|
+
E(C(a.label), 1)
|
|
149
|
+
], !0)
|
|
150
|
+
], 8, ie);
|
|
151
|
+
}), 128))
|
|
152
|
+
], 40, oe),
|
|
153
|
+
e.$slots["tab-extra"] ? (l(), s("div", de, [
|
|
154
|
+
d(e.$slots, "tab-extra", {}, void 0, !0)
|
|
155
|
+
])) : r("", !0)
|
|
156
|
+
])) : r("", !0),
|
|
157
|
+
L("div", {
|
|
158
|
+
id: b(h) + "-body",
|
|
159
|
+
class: H(["hys-ui-card-content", t.bodyClass]),
|
|
160
|
+
style: z(t.bodyStyle),
|
|
161
|
+
role: (g = t.tabs) != null && g.length ? "tabpanel" : void 0,
|
|
162
|
+
"aria-labelledby": (k = t.tabs) != null && k.length && T.value >= 0 ? b(h) + "-tab-" + T.value : void 0,
|
|
163
|
+
tabindex: (v = t.tabs) != null && v.length ? 0 : void 0,
|
|
164
|
+
"aria-busy": t.loading
|
|
165
|
+
}, [
|
|
166
|
+
t.loading ? d(e.$slots, "loading", {}, () => [
|
|
167
|
+
W(Z, {
|
|
168
|
+
"loading-text": t.loadingText,
|
|
169
|
+
lines: 3
|
|
170
|
+
}, null, 8, ["loading-text"])
|
|
171
|
+
], !0, 0) : d(e.$slots, "default", { activeTab: n.value }, void 0, !0, 1)
|
|
172
|
+
], 14, ne),
|
|
173
|
+
e.$slots.actions ? (l(), s("div", re, [
|
|
174
|
+
d(e.$slots, "actions", {}, void 0, !0)
|
|
175
|
+
])) : r("", !0),
|
|
176
|
+
t.footer || e.$slots.footer ? (l(), s("footer", {
|
|
177
|
+
key: 4,
|
|
178
|
+
class: H(["hys-ui-card-foot", t.footerClass]),
|
|
179
|
+
style: z(t.footerStyle)
|
|
180
|
+
}, [
|
|
181
|
+
d(e.$slots, "footer", {}, () => [
|
|
182
|
+
E(C(t.footer), 1)
|
|
183
|
+
], !0)
|
|
184
|
+
], 6)) : r("", !0)
|
|
185
|
+
], 16, p);
|
|
186
|
+
};
|
|
54
187
|
}
|
|
55
188
|
});
|
|
56
189
|
export {
|
|
57
|
-
|
|
190
|
+
ye as default
|
|
58
191
|
};
|
|
@@ -1,184 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
const le = ["disabled", "aria-expanded"], te = {
|
|
6
|
-
key: 1,
|
|
7
|
-
class: "hys-ui-v4-scroll"
|
|
8
|
-
}, oe = ["onClick"], ae = { key: 0 }, re = {
|
|
9
|
-
key: 2,
|
|
10
|
-
class: "hys-ui-v4-columns"
|
|
11
|
-
}, ne = ["aria-label"], se = ["disabled", "aria-current", "onClick"], pe = /* @__PURE__ */ K({
|
|
12
|
-
__name: "HysCascader",
|
|
13
|
-
props: {
|
|
14
|
-
modelValue: {},
|
|
15
|
-
options: {},
|
|
16
|
-
disabled: { type: Boolean },
|
|
17
|
-
clearable: { type: Boolean },
|
|
18
|
-
filterable: { type: Boolean },
|
|
19
|
-
changeOnSelect: { type: Boolean },
|
|
20
|
-
showAllLevels: { type: Boolean, default: !0 },
|
|
21
|
-
separator: { default: " / " },
|
|
22
|
-
placeholder: { default: "选择分类" }
|
|
23
|
-
},
|
|
24
|
-
emits: ["update:modelValue", "change", "clear"],
|
|
25
|
-
setup(y, { emit: H }) {
|
|
26
|
-
const r = y, w = H, $ = Z(), O = g(), C = g(), f = g(""), d = g([...r.modelValue]), { open: k, style: N, show: z, close: p } = ee(O, C, { matchWidth: !0 });
|
|
27
|
-
V(() => r.modelValue, (e) => d.value = [...e]), V(k, (e) => {
|
|
28
|
-
e && (d.value = [...r.modelValue], f.value = "");
|
|
29
|
-
}), V(() => r.disabled, (e) => {
|
|
30
|
-
e && p();
|
|
31
|
-
});
|
|
32
|
-
const T = x(() => {
|
|
33
|
-
var t;
|
|
34
|
-
const e = [r.options];
|
|
35
|
-
let l = r.options;
|
|
36
|
-
for (const o of d.value) {
|
|
37
|
-
const a = l.find((c) => c.value === o);
|
|
38
|
-
if (!((t = a == null ? void 0 : a.children) != null && t.length)) break;
|
|
39
|
-
l = a.children, e.push(l);
|
|
40
|
-
}
|
|
41
|
-
return e;
|
|
42
|
-
});
|
|
43
|
-
function A(e) {
|
|
44
|
-
w("update:modelValue", e), w("change", e);
|
|
45
|
-
}
|
|
46
|
-
function U(e, l) {
|
|
47
|
-
var t, o;
|
|
48
|
-
e.disabled || r.disabled || (d.value = [...d.value.slice(0, l), e.value], (r.changeOnSelect || !((t = e.children) != null && t.length)) && A(d.value), (o = e.children) != null && o.length || p(!0));
|
|
49
|
-
}
|
|
50
|
-
const _ = x(() => {
|
|
51
|
-
let e = r.options;
|
|
52
|
-
const l = r.modelValue.map((t) => {
|
|
53
|
-
const o = e.find((a) => a.value === t);
|
|
54
|
-
return e = (o == null ? void 0 : o.children) || [], (o == null ? void 0 : o.label) || t;
|
|
55
|
-
});
|
|
56
|
-
return r.showAllLevels ? l.join(r.separator) : l.at(-1);
|
|
57
|
-
}), R = x(() => {
|
|
58
|
-
const e = [];
|
|
59
|
-
function l(t, o = [], a = [], c = !1) {
|
|
60
|
-
var h;
|
|
61
|
-
for (const s of t) {
|
|
62
|
-
const v = c || s.disabled, b = [...o, s.label], j = [...a, s.value];
|
|
63
|
-
!v && (!((h = s.children) != null && h.length) || r.changeOnSelect) && b.join(r.separator).toLocaleLowerCase().includes(f.value.toLocaleLowerCase()) && e.push({ label: b.join(r.separator), path: j }), s.children && l(s.children, b, j, v);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
return l(r.options), e;
|
|
67
|
-
});
|
|
68
|
-
function F(e) {
|
|
69
|
-
var o, a, c, h;
|
|
70
|
-
if (e.key === "Escape") {
|
|
71
|
-
e.preventDefault(), p(!0);
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
const l = document.activeElement, t = l == null ? void 0 : l.closest(".hys-ui-v4-level");
|
|
75
|
-
if (["ArrowUp", "ArrowDown", "Home", "End"].includes(e.key) && t) {
|
|
76
|
-
e.preventDefault();
|
|
77
|
-
const s = Array.from(t.querySelectorAll("button:not(:disabled)")), v = s.indexOf(l), b = e.key === "Home" ? 0 : e.key === "End" ? s.length - 1 : (v + (e.key === "ArrowUp" ? -1 : 1) + s.length) % s.length;
|
|
78
|
-
(o = s[b]) == null || o.focus();
|
|
79
|
-
} else if (["ArrowLeft", "ArrowRight"].includes(e.key)) {
|
|
80
|
-
e.preventDefault();
|
|
81
|
-
const s = Array.from(((a = C.value) == null ? void 0 : a.querySelectorAll(".hys-ui-v4-level")) || []), v = s.indexOf(t);
|
|
82
|
-
(h = (c = s[v + (e.key === "ArrowRight" ? 1 : -1)]) == null ? void 0 : c.querySelector("button:not(:disabled)")) == null || h.focus();
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
return (e, l) => (n(), u("div", q(i($), { class: "hys-ui-v4-relative" }), [
|
|
86
|
-
L("button", {
|
|
87
|
-
ref_key: "trigger",
|
|
88
|
-
ref: O,
|
|
89
|
-
class: "hys-ui-v4-control hys-ui-pf-select-trigger",
|
|
90
|
-
type: "button",
|
|
91
|
-
disabled: y.disabled,
|
|
92
|
-
"aria-expanded": i(k),
|
|
93
|
-
"aria-haspopup": "dialog",
|
|
94
|
-
onClick: l[0] || (l[0] = (t) => i(k) ? i(p)() : i(z)())
|
|
95
|
-
}, [
|
|
96
|
-
L("span", null, B(_.value || y.placeholder), 1),
|
|
97
|
-
M(i(Q), {
|
|
98
|
-
size: 16,
|
|
99
|
-
class: "hys-ui-pf-select-chevron"
|
|
100
|
-
})
|
|
101
|
-
], 8, le),
|
|
102
|
-
(n(), S(P, { to: "body" }, [
|
|
103
|
-
i(k) ? (n(), u("div", q({
|
|
104
|
-
key: 0,
|
|
105
|
-
ref_key: "panel",
|
|
106
|
-
ref: C
|
|
107
|
-
}, i($), {
|
|
108
|
-
class: "hys-ui-v4-menu hys-ui-pf-select-menu",
|
|
109
|
-
style: i(N),
|
|
110
|
-
role: "dialog",
|
|
111
|
-
"aria-label": "级联选择",
|
|
112
|
-
onKeydown: F
|
|
113
|
-
}), [
|
|
114
|
-
y.filterable ? W((n(), u("input", {
|
|
115
|
-
key: 0,
|
|
116
|
-
"onUpdate:modelValue": l[1] || (l[1] = (t) => f.value = t),
|
|
117
|
-
class: "hys-ui-v4-control",
|
|
118
|
-
placeholder: "搜索分类",
|
|
119
|
-
"aria-label": "搜索分类"
|
|
120
|
-
}, null, 512)), [
|
|
121
|
-
[G, f.value]
|
|
122
|
-
]) : m("", !0),
|
|
123
|
-
f.value ? (n(), u("div", te, [
|
|
124
|
-
(n(!0), u(D, null, E(R.value, (t) => (n(), u("button", {
|
|
125
|
-
key: t.path.join("/"),
|
|
126
|
-
type: "button",
|
|
127
|
-
class: "hys-ui-v4-option",
|
|
128
|
-
onClick: (o) => {
|
|
129
|
-
A(t.path), i(p)(!0);
|
|
130
|
-
}
|
|
131
|
-
}, B(t.label), 9, oe))), 128)),
|
|
132
|
-
R.value.length ? m("", !0) : (n(), u("p", ae, "无匹配分类"))
|
|
133
|
-
])) : (n(), u("div", re, [
|
|
134
|
-
(n(!0), u(D, null, E(T.value, (t, o) => (n(), u("div", {
|
|
135
|
-
key: o,
|
|
136
|
-
class: "hys-ui-v4-scroll hys-ui-v4-level",
|
|
137
|
-
role: "group",
|
|
138
|
-
"aria-label": "第" + (o + 1) + "级"
|
|
139
|
-
}, [
|
|
140
|
-
(n(!0), u(D, null, E(t, (a) => {
|
|
141
|
-
var c;
|
|
142
|
-
return n(), u("button", {
|
|
143
|
-
key: a.value,
|
|
144
|
-
type: "button",
|
|
145
|
-
class: "hys-ui-v4-option",
|
|
146
|
-
disabled: a.disabled,
|
|
147
|
-
"aria-current": d.value[o] === a.value ? "true" : void 0,
|
|
148
|
-
onClick: (h) => U(a, o)
|
|
149
|
-
}, [
|
|
150
|
-
I(e.$slots, "option", { node: a }, () => [
|
|
151
|
-
J(B(a.label), 1)
|
|
152
|
-
]),
|
|
153
|
-
(c = a.children) != null && c.length ? (n(), S(i(X), {
|
|
154
|
-
key: 0,
|
|
155
|
-
size: 15
|
|
156
|
-
})) : d.value[o] === a.value ? (n(), S(i(Y), {
|
|
157
|
-
key: 1,
|
|
158
|
-
size: 15
|
|
159
|
-
})) : m("", !0)
|
|
160
|
-
], 8, se);
|
|
161
|
-
}), 128))
|
|
162
|
-
], 8, ne))), 128))
|
|
163
|
-
])),
|
|
164
|
-
y.clearable && y.modelValue.length ? (n(), u("button", {
|
|
165
|
-
key: 3,
|
|
166
|
-
type: "button",
|
|
167
|
-
class: "hys-ui-v4-option",
|
|
168
|
-
onClick: l[2] || (l[2] = (t) => {
|
|
169
|
-
A([]), w("clear"), i(p)(!0);
|
|
170
|
-
})
|
|
171
|
-
}, "清空选择")) : m("", !0),
|
|
172
|
-
L("button", {
|
|
173
|
-
type: "button",
|
|
174
|
-
class: "hys-ui-v4-option",
|
|
175
|
-
onClick: l[3] || (l[3] = (t) => i(p)(!0))
|
|
176
|
-
}, "关闭")
|
|
177
|
-
], 16)) : m("", !0)
|
|
178
|
-
]))
|
|
179
|
-
], 16));
|
|
180
|
-
}
|
|
181
|
-
});
|
|
1
|
+
import o from "./HysCascader2.vue.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import a from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const e = /* @__PURE__ */ a(o, [["__scopeId", "data-v-ab2e70d0"]]);
|
|
182
5
|
export {
|
|
183
|
-
|
|
6
|
+
e as default
|
|
184
7
|
};
|