@sdata/web-vue 1.11.1 → 1.12.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/dist/sd.css +177 -6
- package/dist/sd.min.css +1 -1
- package/es/_components/select-view/style/index.css +13 -6
- package/es/_components/virtual-list/virtual-list.vue_vue_type_script_lang.js +2 -2
- package/es/_hooks/use-allow-search.d.ts +10 -0
- package/es/_hooks/use-allow-search.js +31 -0
- package/es/_hooks/use-scrollbar.js +1 -1
- package/es/_utils/color.js +1 -1
- package/es/_utils/date.js +7 -1
- package/es/_utils/dom.js +1 -1
- package/es/_utils/global-config.js +1 -1
- package/es/_utils/omit.js +1 -1
- package/es/_utils/responsive-observe.js +1 -1
- package/es/_utils/virtual-dropdown.js +1 -1
- package/es/_utils/vue-utils.js +4 -18
- package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/asyncToGenerator.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/defineProperty.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/extends.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/objectDestructuringEmpty.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/objectSpread2.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/objectWithoutProperties.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/objectWithoutPropertiesLoose.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/toPrimitive.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/toPropertyKey.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/typeof.js +1 -1
- package/es/affix/affix.vue_vue_type_script_lang.js +31 -3
- package/es/alert/alert.vue_vue_type_script_lang.js +55 -0
- package/es/anchor/anchor-link.vue_vue_type_script_lang.js +8 -0
- package/es/anchor/anchor.vue_vue_type_script_lang.js +32 -0
- package/es/auto-complete/auto-complete.js +102 -0
- package/es/avatar/avatar-group.js +31 -0
- package/es/avatar/avatar.vue_vue_type_script_lang.js +51 -1
- package/es/back-top/back-top.vue_vue_type_script_lang.js +16 -0
- package/es/badge/badge.js +34 -1
- package/es/breadcrumb/breadcrumb-item.js +27 -0
- package/es/breadcrumb/breadcrumb.js +39 -0
- package/es/button/button-group.vue_vue_type_script_lang.js +22 -0
- package/es/button/button.vue_vue_type_script_lang.js +58 -1
- package/es/calendar/calendar.js +47 -0
- package/es/calendar/month.js +1 -1
- package/es/calendar/year.js +1 -1
- package/es/card/card-grid.vue_vue_type_script_lang.js +6 -1
- package/es/card/card-meta.js +23 -0
- package/es/card/card.js +54 -0
- package/es/carousel/carousel.js +68 -1
- package/es/cascader/cascader-panel.js +2 -28
- package/es/cascader/cascader-panel.vue.d.ts +24 -306
- package/es/cascader/{cascader-panel.vue_vue_type_script_lang.js → cascader-panel.vue_vue_type_script_setup_true_lang.js} +92 -101
- package/es/cascader/cascader.js +2 -145
- package/es/cascader/cascader.vue.d.ts +53 -1289
- package/es/cascader/{cascader.vue_vue_type_script_lang.js → cascader.vue_vue_type_script_setup_true_lang.js} +236 -172
- package/es/cascader/index.d.ts +4 -2986
- package/es/cascader/types.d.ts +79 -0
- package/es/checkbox/checkbox-group.js +48 -0
- package/es/checkbox/checkbox.js +35 -0
- package/es/collapse/collapse-item.js +36 -0
- package/es/collapse/collapse.vue_vue_type_script_lang.js +47 -0
- package/es/color-picker/color-picker.js +90 -1
- package/es/color-picker/panel.js +5 -2
- package/es/color-picker/utils.js +1 -1
- package/es/comment/comment.js +47 -1
- package/es/components.d.ts +132 -127
- package/es/config-provider/config-provider.vue.d.ts +9 -0
- package/es/config-provider/config-provider.vue_vue_type_script_lang.js +72 -1
- package/es/config-provider/context.d.ts +1 -0
- package/es/config-provider/index.d.ts +15 -0
- package/es/config-provider/theme-provider.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/config-provider/theme.js +1 -1
- package/es/copy/copy.js +5 -0
- package/es/copy/copy.vue.d.ts +15 -0
- package/es/copy/copy.vue_vue_type_script_setup_true_lang.js +95 -0
- package/es/copy/index.d.ts +15 -0
- package/es/copy/index.js +10 -0
- package/es/copy/style/css.js +2 -0
- package/es/copy/style/index.css +25 -0
- package/es/copy/style/index.d.ts +2 -0
- package/es/copy/style/index.js +2 -0
- package/es/copy/style/index.scss +15 -0
- package/es/copy/style/token.scss +3 -0
- package/es/copy/types.d.ts +21 -0
- package/es/cropper/cropper.js +5 -0
- package/es/cropper/cropper.vue.d.ts +45 -0
- package/es/cropper/cropper.vue_vue_type_script_setup_true_lang.js +266 -0
- package/es/cropper/index.d.ts +130 -0
- package/es/cropper/index.js +10 -0
- package/es/cropper/interface.d.ts +59 -0
- package/es/cropper/style/css.js +2 -0
- package/es/cropper/style/index.css +51 -0
- package/es/cropper/style/index.d.ts +2 -0
- package/es/cropper/style/index.js +2 -0
- package/es/cropper/style/index.scss +43 -0
- package/es/cropper/style/token.scss +8 -0
- package/es/date-picker/hooks/use-range-time-picker-value.js +1 -1
- package/es/date-picker/index.d.ts +54 -576
- package/es/date-picker/panels/date/index.js +1 -1
- package/es/date-picker/panels/date/index.vue_vue_type_script_lang.js +1 -1
- package/es/date-picker/panels/footer.vue.d.ts +55 -577
- package/es/date-picker/panels/footer.vue_vue_type_script_lang.js +1 -1
- package/es/date-picker/panels/month/index.js +1 -1
- package/es/date-picker/panels/quarter/index.js +1 -1
- package/es/date-picker/panels/year/index.js +1 -1
- package/es/date-picker/picker-panel.vue.d.ts +54 -576
- package/es/date-picker/picker.js +1 -1
- package/es/date-picker/picker.vue.d.ts +54 -576
- package/es/date-picker/picker.vue_vue_type_script_lang.js +193 -1
- package/es/date-picker/pickers/date-picker.js +42 -0
- package/es/date-picker/pickers/month-picker.js +12 -0
- package/es/date-picker/pickers/quarter-picker.js +17 -0
- package/es/date-picker/pickers/week-picker.js +23 -0
- package/es/date-picker/pickers/year-picker.js +12 -0
- package/es/date-picker/range-picker-panel.vue.d.ts +54 -576
- package/es/date-picker/range-picker-panel.vue_vue_type_script_lang.js +1 -1
- package/es/date-picker/range-picker.js +1 -1
- package/es/date-picker/range-picker.vue.d.ts +54 -576
- package/es/date-picker/range-picker.vue_vue_type_script_lang.js +120 -1
- package/es/descriptions/descriptions-item.vue_vue_type_script_lang.js +16 -0
- package/es/descriptions/descriptions.js +65 -1
- package/es/divider/divider.js +24 -0
- package/es/drawer/drawer.vue_vue_type_script_lang.js +161 -2
- package/es/drawer/index.js +2 -2
- package/es/dropdown/dropdown-button.vue_vue_type_script_lang.js +70 -0
- package/es/dropdown/dropdown-group.vue_vue_type_script_lang.js +12 -1
- package/es/dropdown/dropdown-option.vue_vue_type_script_lang.js +20 -1
- package/es/dropdown/dropdown-submenu.vue_vue_type_script_lang.js +57 -0
- package/es/dropdown/dropdown.vue_vue_type_script_lang.js +55 -0
- package/es/ellipsis/ellipsis.vue_vue_type_script_lang.js +25 -2
- package/es/ellipsis/performant-ellipsis.vue_vue_type_script_lang.js +24 -1
- package/es/empty/empty.js +18 -0
- package/es/form/form-item.vue_vue_type_script_lang.js +146 -3
- package/es/form/form.vue_vue_type_script_lang.js +108 -0
- package/es/grid/grid-col.vue_vue_type_script_lang.js +42 -1
- package/es/grid/grid-item.vue_vue_type_script_lang.js +13 -1
- package/es/grid/grid-row.vue_vue_type_script_lang.js +21 -0
- package/es/grid/grid.vue_vue_type_script_lang.js +20 -0
- package/es/icon.js +5 -5
- package/es/image/image.js +1 -1
- package/es/image/image.vue_vue_type_script_lang.js +82 -0
- package/es/image/preview-action.js +8 -0
- package/es/image/preview-group.js +1 -1
- package/es/image/preview-group.vue_vue_type_script_lang.js +48 -0
- package/es/image/preview-toolbar.vue_vue_type_script_lang.js +1 -0
- package/es/image/preview.vue_vue_type_script_lang.js +56 -1
- package/es/index.css +177 -6
- package/es/index.d.ts +9 -1
- package/es/index.js +6 -2
- package/es/index.scss +4 -0
- package/es/input/input-password.vue_vue_type_script_lang.js +13 -0
- package/es/input/input-search.js +35 -1
- package/es/input/input.js +129 -1
- package/es/input-number/index.d.ts +35 -23
- package/es/input-number/input-number.d.ts +19 -10
- package/es/input-number/input-number.js +205 -23
- package/es/input-tag/input-tag.js +137 -1
- package/es/input-tag/style/index.css +13 -6
- package/es/input-tag/utils.js +1 -1
- package/es/layout/content.js +5 -0
- package/es/layout/footer.js +5 -0
- package/es/layout/header.js +5 -0
- package/es/layout/layout.vue_vue_type_script_lang.js +6 -1
- package/es/layout/sider.vue_vue_type_script_lang.js +46 -0
- package/es/link/index.d.ts +44 -564
- package/es/link/interface.d.ts +15 -0
- package/es/link/link.js +2 -17
- package/es/link/link.vue.d.ts +31 -286
- package/es/link/link.vue_vue_type_script_setup_true_lang.js +112 -0
- package/es/link/style/index.css +6 -0
- package/es/link/style/index.scss +10 -0
- package/es/list/list-item-meta.vue_vue_type_script_lang.js +23 -0
- package/es/list/list-item.js +21 -1
- package/es/list/list.js +104 -2
- package/es/mention/mention.js +87 -1
- package/es/menu/base-menu.vue_vue_type_script_lang.js +102 -0
- package/es/menu/item-group.vue_vue_type_script_lang.js +11 -1
- package/es/menu/item.d.ts +1 -1
- package/es/menu/item.js +13 -2
- package/es/menu/menu.js +2 -1
- package/es/menu/sub-menu-pop.vue.d.ts +1 -1
- package/es/menu/sub-menu.js +40 -1
- package/es/message/index.js +1 -1
- package/es/modal/index.js +2 -2
- package/es/modal/modal.vue_vue_type_script_lang.js +193 -2
- package/es/notification/index.js +1 -1
- package/es/overflow-list/overflow-list.js +25 -1
- package/es/page-header/page-header.vue_vue_type_script_lang.js +38 -0
- package/es/pagination/page-jumper.vue.d.ts +35 -22
- package/es/pagination/pagination.js +122 -0
- package/es/popconfirm/popconfirm.vue_vue_type_script_lang.js +95 -1
- package/es/popover/popover.vue_vue_type_script_lang.js +62 -0
- package/es/progress/line.vue_vue_type_script_lang.js +1 -1
- package/es/progress/progress.vue_vue_type_script_lang.js +48 -0
- package/es/radio/radio-group.js +53 -0
- package/es/radio/radio.js +36 -0
- package/es/rate/rate.js +54 -0
- package/es/resize-box/resize-box.vue_vue_type_script_lang.js +47 -1
- package/es/result/result.vue_vue_type_script_lang.js +40 -0
- package/es/scrollbar/scrollbar.vue_vue_type_script_lang.js +108 -2
- package/es/sd-vue.js +10 -2
- package/es/secret/index.d.ts +48 -0
- package/es/secret/index.js +10 -0
- package/es/secret/secret.js +5 -0
- package/es/secret/secret.vue.d.ts +17 -0
- package/es/secret/secret.vue_vue_type_script_setup_true_lang.js +64 -0
- package/es/secret/style/css.js +2 -0
- package/es/secret/style/index.css +54 -0
- package/es/secret/style/index.d.ts +2 -0
- package/es/secret/style/index.js +2 -0
- package/es/secret/style/index.scss +48 -0
- package/es/secret/style/token.scss +9 -0
- package/es/select/hooks/use-options.js +1 -1
- package/es/select/optgroup.vue_vue_type_script_lang.js +12 -1
- package/es/select/option.vue_vue_type_script_lang.js +27 -0
- package/es/select/select.js +8 -6
- package/es/select/utils.js +1 -1
- package/es/skeleton/line.vue_vue_type_script_lang.js +16 -0
- package/es/skeleton/shape.vue_vue_type_script_lang.js +10 -0
- package/es/skeleton/skeleton.vue_vue_type_script_lang.js +8 -0
- package/es/slider/index.d.ts +66 -42
- package/es/slider/slider-input.vue.d.ts +33 -21
- package/es/slider/slider.vue.d.ts +33 -21
- package/es/slider/slider.vue_vue_type_script_lang.js +55 -0
- package/es/space/space.js +27 -0
- package/es/spin/spin.js +35 -0
- package/es/split/split.vue_vue_type_script_lang.js +62 -1
- package/es/statistic/countdown.vue_vue_type_script_lang.js +36 -1
- package/es/statistic/statistic.vue_vue_type_script_lang.js +74 -0
- package/es/steps/step.vue_vue_type_script_lang.js +36 -0
- package/es/steps/steps.vue_vue_type_script_lang.js +47 -0
- package/es/switch/switch.vue_vue_type_script_lang.js +98 -1
- package/es/table/table-column.js +115 -0
- package/es/table/table-operation-td.js +1 -1
- package/es/table/table-operation-th.js +1 -1
- package/es/table/table-td.js +1 -1
- package/es/table/table-th.js +1 -1
- package/es/table/table.js +442 -3
- package/es/table/utils.js +1 -1
- package/es/tabs/tab-pane.vue_vue_type_script_lang.js +23 -1
- package/es/tabs/tabs.js +104 -0
- package/es/tag/index.d.ts +29237 -74
- package/es/tag/interface.d.ts +9 -1
- package/es/tag/style/index.css +13 -6
- package/es/tag/style/index.scss +16 -4
- package/es/tag/tag.js +26 -5
- package/es/tag/tag.vue.d.ts +11688 -7
- package/es/tag/tag.vue_vue_type_script_lang.js +139 -3
- package/es/tag-group/index.d.ts +64 -0
- package/es/tag-group/index.js +10 -0
- package/es/tag-group/interface.d.ts +18 -0
- package/es/tag-group/style/css.js +2 -0
- package/es/tag-group/style/index.css +92 -0
- package/es/tag-group/style/index.d.ts +2 -0
- package/es/tag-group/style/index.js +2 -0
- package/es/tag-group/style/index.scss +108 -0
- package/es/tag-group/style/token.scss +6 -0
- package/es/tag-group/tag-group.js +5 -0
- package/es/tag-group/tag-group.vue.d.ts +46 -0
- package/es/tag-group/tag-group.vue_vue_type_script_setup_true_lang.js +360 -0
- package/es/textarea/textarea.vue_vue_type_script_lang.js +90 -1
- package/es/time-picker/range-panel.js +1 -1
- package/es/time-picker/time-picker.js +1 -1
- package/es/time-picker/time-picker.vue_vue_type_script_lang.js +132 -0
- package/es/timeline/item.vue_vue_type_script_lang.js +38 -1
- package/es/timeline/timeline.js +28 -0
- package/es/tooltip/tooltip.vue_vue_type_script_lang.js +61 -1
- package/es/transfer/transfer.vue_vue_type_script_lang.js +136 -0
- package/es/tree/base-node.vue_vue_type_script_lang.js +7 -0
- package/es/tree/node.js +1 -1
- package/es/tree/tree.vue_vue_type_script_lang.js +287 -2
- package/es/tree/utils/tree-data.js +1 -1
- package/es/tree-select/hooks/use-selected-state.js +1 -1
- package/es/tree-select/panel.js +1 -1
- package/es/tree-select/tree-select.js +1 -1
- package/es/tree-select/tree-select.vue_vue_type_script_lang.js +281 -8
- package/es/trigger/trigger.js +161 -1
- package/es/trigger/utils.js +1 -1
- package/es/typography/base.d.ts +7 -0
- package/es/typography/base.js +127 -3
- package/es/typography/interface.d.ts +2 -0
- package/es/typography/operations.js +30 -0
- package/es/typography/paragraph.js +8 -0
- package/es/typography/title.js +6 -1
- package/es/upload/upload.js +279 -2
- package/es/verification-code/verification-code.js +59 -0
- package/es/watermark/hooks/use-mutation-observer.js +1 -1
- package/es/watermark/watermark.js +58 -1
- package/es/web-vue.css +24 -24
- package/json/vetur-attributes.json +134 -218
- package/json/vetur-tags.json +58 -67
- package/json/web-types.json +304 -493
- package/package.json +9 -7
- package/es/_utils/clipboard.d.ts +0 -1
- package/es/_utils/clipboard.js +0 -35
- package/es/link/link.vue_vue_type_script_lang.js +0 -56
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.130.0/helpers/objectSpread2.js";
|
|
2
2
|
import { isNull, isUndefined } from "../_utils/is.js";
|
|
3
3
|
import { KEYBOARD_KEY, getKeyDownHandler } from "../_utils/keyboard.js";
|
|
4
4
|
import { cascaderInjectionKey } from "./context.js";
|
|
5
5
|
import { getCheckedStatus, getLeafOptionInfos, getLeafOptionKeys, getOptionInfos, getValidValues, getValueKey } from "./utils.js";
|
|
6
6
|
import base_cascader_panel_default from "./base-cascader-panel.js";
|
|
7
7
|
import { useSelectedPath } from "./hooks/use-selected-path.js";
|
|
8
|
-
import { computed, defineComponent, provide, reactive, ref, toRefs, watch } from "vue";
|
|
9
|
-
//#region components/cascader/cascader-panel.vue?vue&type=script&lang.ts
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
if (pathMode) return;
|
|
13
|
-
return "";
|
|
14
|
-
};
|
|
15
|
-
var cascader_panel_vue_vue_type_script_lang_default = defineComponent({
|
|
16
|
-
name: "CascaderPanel",
|
|
17
|
-
components: { BaseCascaderPanel: base_cascader_panel_default },
|
|
8
|
+
import { computed, createBlock, createSlots, defineComponent, openBlock, provide, reactive, ref, renderSlot, toRefs, unref, useSlots, watch, withCtx } from "vue";
|
|
9
|
+
//#region components/cascader/cascader-panel.vue?vue&type=script&setup=true&lang.ts
|
|
10
|
+
var cascader_panel_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent(_objectSpread2(_objectSpread2({}, { name: "CascaderPanel" }), {}, {
|
|
11
|
+
__name: "cascader-panel",
|
|
18
12
|
props: {
|
|
19
13
|
pathMode: {
|
|
20
14
|
type: Boolean,
|
|
@@ -24,58 +18,40 @@ var cascader_panel_vue_vue_type_script_lang_default = defineComponent({
|
|
|
24
18
|
type: Boolean,
|
|
25
19
|
default: false
|
|
26
20
|
},
|
|
27
|
-
modelValue: {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
] },
|
|
33
|
-
value: { type: [
|
|
34
|
-
String,
|
|
35
|
-
Number,
|
|
36
|
-
Object,
|
|
37
|
-
Array
|
|
38
|
-
] },
|
|
39
|
-
defaultValue: {
|
|
40
|
-
type: [
|
|
41
|
-
String,
|
|
42
|
-
Number,
|
|
43
|
-
Object,
|
|
44
|
-
Array
|
|
45
|
-
],
|
|
46
|
-
default: (props) => getDefaultValue(Boolean(props.multiple), Boolean(props.pathMode))
|
|
47
|
-
},
|
|
48
|
-
options: {
|
|
49
|
-
type: Array,
|
|
50
|
-
default: () => []
|
|
51
|
-
},
|
|
52
|
-
expandTrigger: {
|
|
53
|
-
type: String,
|
|
54
|
-
default: "click"
|
|
55
|
-
},
|
|
21
|
+
modelValue: {},
|
|
22
|
+
value: {},
|
|
23
|
+
defaultValue: {},
|
|
24
|
+
options: { default: () => [] },
|
|
25
|
+
expandTrigger: { default: "click" },
|
|
56
26
|
checkStrictly: {
|
|
57
27
|
type: Boolean,
|
|
58
28
|
default: false
|
|
59
29
|
},
|
|
60
|
-
loadMore: {
|
|
61
|
-
fieldNames: {
|
|
62
|
-
valueKey: {
|
|
63
|
-
type: String,
|
|
64
|
-
default: "value"
|
|
65
|
-
},
|
|
30
|
+
loadMore: {},
|
|
31
|
+
fieldNames: {},
|
|
32
|
+
valueKey: { default: "value" },
|
|
66
33
|
expandChild: {
|
|
67
34
|
type: Boolean,
|
|
68
35
|
default: false
|
|
69
36
|
}
|
|
70
37
|
},
|
|
71
|
-
emits:
|
|
72
|
-
"update:modelValue"
|
|
73
|
-
"update:value"
|
|
74
|
-
"change"
|
|
75
|
-
|
|
76
|
-
setup(
|
|
77
|
-
|
|
78
|
-
const
|
|
38
|
+
emits: [
|
|
39
|
+
"update:modelValue",
|
|
40
|
+
"update:value",
|
|
41
|
+
"change"
|
|
42
|
+
],
|
|
43
|
+
setup(__props, { emit: __emit }) {
|
|
44
|
+
var _props$defaultValue;
|
|
45
|
+
const props = __props;
|
|
46
|
+
const emit = __emit;
|
|
47
|
+
const slots = useSlots();
|
|
48
|
+
const getDefaultValue = (multiple, pathMode) => {
|
|
49
|
+
if (multiple) return [];
|
|
50
|
+
if (pathMode) return;
|
|
51
|
+
return "";
|
|
52
|
+
};
|
|
53
|
+
const { options, checkStrictly, loadMore, modelValue, value: valueProp, valueKey, expandChild, expandTrigger, multiple, pathMode } = toRefs(props);
|
|
54
|
+
const _value = ref((_props$defaultValue = props.defaultValue) !== null && _props$defaultValue !== void 0 ? _props$defaultValue : getDefaultValue(props.multiple, props.pathMode));
|
|
79
55
|
watch([modelValue, valueProp], ([nextModelValue, nextValue]) => {
|
|
80
56
|
const mergedValue = nextModelValue !== null && nextModelValue !== void 0 ? nextModelValue : nextValue;
|
|
81
57
|
if (isUndefined(mergedValue) || isNull(mergedValue)) _value.value = getDefaultValue(props.multiple, props.pathMode);
|
|
@@ -181,53 +157,68 @@ var cascader_panel_vue_vue_type_script_lang_default = defineComponent({
|
|
|
181
157
|
valueMap: computedValueMap,
|
|
182
158
|
expandTrigger: expandTrigger.value
|
|
183
159
|
}));
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
160
|
+
const handleKeyDown = getKeyDownHandler(new Map([
|
|
161
|
+
[KEYBOARD_KEY.ENTER, (_ev) => {
|
|
162
|
+
if (activeOption.value) {
|
|
163
|
+
let checked;
|
|
164
|
+
if (props.checkStrictly || activeOption.value.isLeaf) checked = !computedValueMap.value.has(activeOption.value.key);
|
|
165
|
+
else checked = !getCheckedStatus(activeOption.value, computedValueMap.value).checked;
|
|
166
|
+
setSelectedPath(activeOption.value.key);
|
|
167
|
+
handleClickOption(activeOption.value, checked);
|
|
168
|
+
}
|
|
169
|
+
}],
|
|
170
|
+
[KEYBOARD_KEY.ARROW_DOWN, (ev) => {
|
|
171
|
+
ev.preventDefault();
|
|
172
|
+
const activeNode = getNextActiveNode("next");
|
|
173
|
+
setActiveKey(activeNode === null || activeNode === void 0 ? void 0 : activeNode.key);
|
|
174
|
+
}],
|
|
175
|
+
[KEYBOARD_KEY.ARROW_UP, (ev) => {
|
|
176
|
+
ev.preventDefault();
|
|
177
|
+
const activeNode = getNextActiveNode("preview");
|
|
178
|
+
setActiveKey(activeNode === null || activeNode === void 0 ? void 0 : activeNode.key);
|
|
179
|
+
}],
|
|
180
|
+
[KEYBOARD_KEY.ARROW_RIGHT, (ev) => {
|
|
181
|
+
var _activeOption$value;
|
|
182
|
+
ev.preventDefault();
|
|
183
|
+
if ((_activeOption$value = activeOption.value) === null || _activeOption$value === void 0 ? void 0 : _activeOption$value.children) {
|
|
184
|
+
var _activeOption$value$c;
|
|
185
|
+
setSelectedPath(activeOption.value.key);
|
|
186
|
+
setActiveKey((_activeOption$value$c = activeOption.value.children[0]) === null || _activeOption$value$c === void 0 ? void 0 : _activeOption$value$c.key);
|
|
187
|
+
}
|
|
188
|
+
}],
|
|
189
|
+
[KEYBOARD_KEY.ARROW_LEFT, (ev) => {
|
|
190
|
+
var _activeOption$value2;
|
|
191
|
+
ev.preventDefault();
|
|
192
|
+
if ((_activeOption$value2 = activeOption.value) === null || _activeOption$value2 === void 0 ? void 0 : _activeOption$value2.parent) {
|
|
193
|
+
setSelectedPath(activeOption.value.parent.key);
|
|
194
|
+
setActiveKey(activeOption.value.parent.key);
|
|
195
|
+
}
|
|
196
|
+
}]
|
|
197
|
+
]));
|
|
198
|
+
return (_ctx, _cache) => {
|
|
199
|
+
return openBlock(), createBlock(unref(base_cascader_panel_default), {
|
|
200
|
+
"display-columns": unref(displayColumns),
|
|
201
|
+
"selected-path": unref(selectedPath),
|
|
202
|
+
"active-key": unref(activeKey),
|
|
203
|
+
multiple: unref(multiple),
|
|
204
|
+
"total-level": totalLevel.value,
|
|
205
|
+
"check-strictly": unref(checkStrictly),
|
|
206
|
+
onKeydown: unref(handleKeyDown)
|
|
207
|
+
}, createSlots({ _: 2 }, [_ctx.$slots.empty ? {
|
|
208
|
+
name: "empty",
|
|
209
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "empty")]),
|
|
210
|
+
key: "0"
|
|
211
|
+
} : void 0]), 1032, [
|
|
212
|
+
"display-columns",
|
|
213
|
+
"selected-path",
|
|
214
|
+
"active-key",
|
|
215
|
+
"multiple",
|
|
216
|
+
"total-level",
|
|
217
|
+
"check-strictly",
|
|
218
|
+
"onKeydown"
|
|
219
|
+
]);
|
|
229
220
|
};
|
|
230
221
|
}
|
|
231
|
-
});
|
|
222
|
+
}));
|
|
232
223
|
//#endregion
|
|
233
|
-
export {
|
|
224
|
+
export { cascader_panel_vue_vue_type_script_setup_true_lang_default as default };
|
package/es/cascader/cascader.js
CHANGED
|
@@ -1,148 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import cascader_vue_vue_type_script_lang_default from "./cascader.vue_vue_type_script_lang.js";
|
|
3
|
-
import { createBlock, createSlots, createVNode, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderSlot, resolveComponent, withCtx } from "vue";
|
|
1
|
+
import cascader_vue_vue_type_script_setup_true_lang_default from "./cascader.vue_vue_type_script_setup_true_lang.js";
|
|
4
2
|
//#region components/cascader/cascader.vue
|
|
5
|
-
|
|
6
|
-
const _component_select_view = resolveComponent("select-view");
|
|
7
|
-
const _component_cascader_search_panel = resolveComponent("cascader-search-panel");
|
|
8
|
-
const _component_base_cascader_panel = resolveComponent("base-cascader-panel");
|
|
9
|
-
const _component_trigger = resolveComponent("trigger");
|
|
10
|
-
return openBlock(), createBlock(_component_trigger, mergeProps(_ctx.triggerProps, {
|
|
11
|
-
trigger: "click",
|
|
12
|
-
"animation-name": "slide-dynamic-origin",
|
|
13
|
-
"auto-fit-transform-origin": "",
|
|
14
|
-
"popup-visible": _ctx.computedPopupVisible,
|
|
15
|
-
position: "bl",
|
|
16
|
-
disabled: _ctx.mergedDisabled,
|
|
17
|
-
"popup-offset": 4,
|
|
18
|
-
"auto-fit-popup-width": _ctx.showSearchPanel,
|
|
19
|
-
"popup-container": _ctx.popupContainer,
|
|
20
|
-
"prevent-focus": true,
|
|
21
|
-
"click-to-close": !Boolean(_ctx.mergedAllowSearch),
|
|
22
|
-
onPopupVisibleChange: _ctx.handlePopupVisibleChange
|
|
23
|
-
}), {
|
|
24
|
-
content: withCtx(() => [_ctx.showSearchPanel ? (openBlock(), createBlock(_component_cascader_search_panel, {
|
|
25
|
-
key: 0,
|
|
26
|
-
options: _ctx.filteredLeafOptions,
|
|
27
|
-
"active-key": _ctx.activeKey,
|
|
28
|
-
multiple: _ctx.multiple,
|
|
29
|
-
"check-strictly": _ctx.checkStrictly,
|
|
30
|
-
loading: _ctx.loading,
|
|
31
|
-
"path-label": !_ctx.searchOptionOnlyLabel
|
|
32
|
-
}, createSlots({ _: 2 }, [_ctx.$slots.empty ? {
|
|
33
|
-
name: "empty",
|
|
34
|
-
fn: withCtx(() => [renderSlot(_ctx.$slots, "empty")]),
|
|
35
|
-
key: "0"
|
|
36
|
-
} : void 0]), 1032, [
|
|
37
|
-
"options",
|
|
38
|
-
"active-key",
|
|
39
|
-
"multiple",
|
|
40
|
-
"check-strictly",
|
|
41
|
-
"loading",
|
|
42
|
-
"path-label"
|
|
43
|
-
])) : (openBlock(), createBlock(_component_base_cascader_panel, {
|
|
44
|
-
key: 1,
|
|
45
|
-
"display-columns": _ctx.displayColumns,
|
|
46
|
-
"selected-path": _ctx.selectedPath,
|
|
47
|
-
"active-key": _ctx.activeKey,
|
|
48
|
-
multiple: _ctx.multiple,
|
|
49
|
-
"total-level": _ctx.totalLevel,
|
|
50
|
-
"check-strictly": _ctx.checkStrictly,
|
|
51
|
-
loading: _ctx.loading,
|
|
52
|
-
"virtual-list-props": _ctx.resolvedVirtualListProps,
|
|
53
|
-
dropdown: ""
|
|
54
|
-
}, createSlots({ _: 2 }, [_ctx.$slots.empty ? {
|
|
55
|
-
name: "empty",
|
|
56
|
-
fn: withCtx(() => [renderSlot(_ctx.$slots, "empty")]),
|
|
57
|
-
key: "0"
|
|
58
|
-
} : void 0]), 1032, [
|
|
59
|
-
"display-columns",
|
|
60
|
-
"selected-path",
|
|
61
|
-
"active-key",
|
|
62
|
-
"multiple",
|
|
63
|
-
"total-level",
|
|
64
|
-
"check-strictly",
|
|
65
|
-
"loading",
|
|
66
|
-
"virtual-list-props"
|
|
67
|
-
]))]),
|
|
68
|
-
default: withCtx(() => [createVNode(_component_select_view, mergeProps({
|
|
69
|
-
"model-value": _ctx.selectViewValue,
|
|
70
|
-
"input-value": _ctx.computedInputValue,
|
|
71
|
-
disabled: _ctx.mergedDisabled,
|
|
72
|
-
error: _ctx.error,
|
|
73
|
-
multiple: _ctx.multiple,
|
|
74
|
-
"allow-clear": _ctx.mergedAllowClear,
|
|
75
|
-
"allow-search": Boolean(_ctx.mergedAllowSearch),
|
|
76
|
-
size: _ctx.size,
|
|
77
|
-
opened: _ctx.computedPopupVisible,
|
|
78
|
-
placeholder: _ctx.placeholder,
|
|
79
|
-
loading: _ctx.loading,
|
|
80
|
-
"max-tag-count": _ctx.maxTagCount,
|
|
81
|
-
"tag-nowrap": _ctx.tagNowrap
|
|
82
|
-
}, _ctx.$attrs, {
|
|
83
|
-
onInputValueChange: _ctx.handleInputValueChange,
|
|
84
|
-
onClear: _ctx.handleClear,
|
|
85
|
-
onFocus: _ctx.handleFocus,
|
|
86
|
-
onBlur: _ctx.handleBlur,
|
|
87
|
-
onRemove: _ctx.handleRemove,
|
|
88
|
-
onKeydown: _ctx.handleKeyDown
|
|
89
|
-
}), createSlots({ _: 2 }, [
|
|
90
|
-
_ctx.$slots.label ? {
|
|
91
|
-
name: "label",
|
|
92
|
-
fn: withCtx((data) => [renderSlot(_ctx.$slots, "label", normalizeProps(guardReactiveProps(data)))]),
|
|
93
|
-
key: "0"
|
|
94
|
-
} : void 0,
|
|
95
|
-
_ctx.$slots.prefix ? {
|
|
96
|
-
name: "prefix",
|
|
97
|
-
fn: withCtx(() => [renderSlot(_ctx.$slots, "prefix")]),
|
|
98
|
-
key: "1"
|
|
99
|
-
} : void 0,
|
|
100
|
-
_ctx.$slots["arrow-icon"] ? {
|
|
101
|
-
name: "arrow-icon",
|
|
102
|
-
fn: withCtx(() => [renderSlot(_ctx.$slots, "arrow-icon")]),
|
|
103
|
-
key: "2"
|
|
104
|
-
} : void 0,
|
|
105
|
-
_ctx.$slots["loading-icon"] ? {
|
|
106
|
-
name: "loading-icon",
|
|
107
|
-
fn: withCtx(() => [renderSlot(_ctx.$slots, "loading-icon")]),
|
|
108
|
-
key: "3"
|
|
109
|
-
} : void 0,
|
|
110
|
-
_ctx.$slots["search-icon"] ? {
|
|
111
|
-
name: "search-icon",
|
|
112
|
-
fn: withCtx(() => [renderSlot(_ctx.$slots, "search-icon")]),
|
|
113
|
-
key: "4"
|
|
114
|
-
} : void 0
|
|
115
|
-
]), 1040, [
|
|
116
|
-
"model-value",
|
|
117
|
-
"input-value",
|
|
118
|
-
"disabled",
|
|
119
|
-
"error",
|
|
120
|
-
"multiple",
|
|
121
|
-
"allow-clear",
|
|
122
|
-
"allow-search",
|
|
123
|
-
"size",
|
|
124
|
-
"opened",
|
|
125
|
-
"placeholder",
|
|
126
|
-
"loading",
|
|
127
|
-
"max-tag-count",
|
|
128
|
-
"tag-nowrap",
|
|
129
|
-
"onInputValueChange",
|
|
130
|
-
"onClear",
|
|
131
|
-
"onFocus",
|
|
132
|
-
"onBlur",
|
|
133
|
-
"onRemove",
|
|
134
|
-
"onKeydown"
|
|
135
|
-
])]),
|
|
136
|
-
_: 3
|
|
137
|
-
}, 16, [
|
|
138
|
-
"popup-visible",
|
|
139
|
-
"disabled",
|
|
140
|
-
"auto-fit-popup-width",
|
|
141
|
-
"popup-container",
|
|
142
|
-
"click-to-close",
|
|
143
|
-
"onPopupVisibleChange"
|
|
144
|
-
]);
|
|
145
|
-
}
|
|
146
|
-
var cascader_default = /* @__PURE__ */ _plugin_vue_export_helper_default(cascader_vue_vue_type_script_lang_default, [["render", _sfc_render]]);
|
|
3
|
+
var cascader_default = cascader_vue_vue_type_script_setup_true_lang_default;
|
|
147
4
|
//#endregion
|
|
148
5
|
export { cascader_default as default };
|