@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,5 +1,5 @@
|
|
|
1
1
|
import { useFormItem } from "../_hooks/use-form-item.js";
|
|
2
|
-
import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.130.0/helpers/objectSpread2.js";
|
|
3
3
|
import { isArray, isFunction, isNull, isUndefined } from "../_utils/is.js";
|
|
4
4
|
import { useAllowClear } from "../_hooks/use-allow-clear.js";
|
|
5
5
|
import { resolveDropdownVirtualListProps } from "../_utils/virtual-dropdown.js";
|
|
@@ -7,29 +7,21 @@ import { KEYBOARD_KEY, getKeyDownHandler } from "../_utils/keyboard.js";
|
|
|
7
7
|
import Trigger from "../trigger/index.js";
|
|
8
8
|
import { useTrigger } from "../_hooks/use-trigger.js";
|
|
9
9
|
import select_view_default from "../_components/select-view/select-view.js";
|
|
10
|
+
import { useAllowSearch } from "../_hooks/use-allow-search.js";
|
|
10
11
|
import { debounce } from "../_utils/debounce.js";
|
|
11
12
|
import { cascaderInjectionKey } from "./context.js";
|
|
12
13
|
import { getCheckedStatus, getLeafOptionInfos, getLeafOptionKeys, getOptionInfos, getOptionLabel, getValidValues, getValueKey } from "./utils.js";
|
|
13
14
|
import base_cascader_panel_default from "./base-cascader-panel.js";
|
|
14
15
|
import { useSelectedPath } from "./hooks/use-selected-path.js";
|
|
15
16
|
import cascader_search_panel_default from "./cascader-search-panel.js";
|
|
16
|
-
import { computed, defineComponent, getCurrentInstance, provide, reactive, ref, toRefs, watch } from "vue";
|
|
17
|
-
//#region components/cascader/cascader.vue?vue&type=script&lang.ts
|
|
17
|
+
import { computed, createBlock, createSlots, createVNode, defineComponent, getCurrentInstance, guardReactiveProps, mergeProps, normalizeProps, openBlock, provide, reactive, ref, renderSlot, toRefs, unref, useAttrs, useSlots, watch, withCtx } from "vue";
|
|
18
|
+
//#region components/cascader/cascader.vue?vue&type=script&setup=true&lang.ts
|
|
18
19
|
var DEFAULT_CASCADER_VIRTUAL_ITEM_SIZE = 36;
|
|
19
|
-
var
|
|
20
|
-
if (multiple) return [];
|
|
21
|
-
if (pathMode) return;
|
|
22
|
-
return "";
|
|
23
|
-
};
|
|
24
|
-
var cascader_vue_vue_type_script_lang_default = defineComponent({
|
|
20
|
+
var cascader_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent(_objectSpread2(_objectSpread2({}, {
|
|
25
21
|
name: "Cascader",
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
BaseCascaderPanel: base_cascader_panel_default,
|
|
30
|
-
CascaderSearchPanel: cascader_search_panel_default
|
|
31
|
-
},
|
|
32
|
-
inheritAttrs: false,
|
|
22
|
+
inheritAttrs: false
|
|
23
|
+
}), {}, {
|
|
24
|
+
__name: "cascader",
|
|
33
25
|
props: {
|
|
34
26
|
pathMode: {
|
|
35
27
|
type: Boolean,
|
|
@@ -39,31 +31,10 @@ var cascader_vue_vue_type_script_lang_default = defineComponent({
|
|
|
39
31
|
type: Boolean,
|
|
40
32
|
default: false
|
|
41
33
|
},
|
|
42
|
-
modelValue: {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
Array
|
|
47
|
-
] },
|
|
48
|
-
value: { type: [
|
|
49
|
-
String,
|
|
50
|
-
Number,
|
|
51
|
-
Object,
|
|
52
|
-
Array
|
|
53
|
-
] },
|
|
54
|
-
defaultValue: {
|
|
55
|
-
type: [
|
|
56
|
-
String,
|
|
57
|
-
Number,
|
|
58
|
-
Object,
|
|
59
|
-
Array
|
|
60
|
-
],
|
|
61
|
-
default: (props) => getDefaultValue(Boolean(props.multiple), Boolean(props.pathMode))
|
|
62
|
-
},
|
|
63
|
-
options: {
|
|
64
|
-
type: Array,
|
|
65
|
-
default: () => []
|
|
66
|
-
},
|
|
34
|
+
modelValue: {},
|
|
35
|
+
value: {},
|
|
36
|
+
defaultValue: {},
|
|
37
|
+
options: { default: () => [] },
|
|
67
38
|
disabled: {
|
|
68
39
|
type: Boolean,
|
|
69
40
|
default: false
|
|
@@ -72,67 +43,40 @@ var cascader_vue_vue_type_script_lang_default = defineComponent({
|
|
|
72
43
|
type: Boolean,
|
|
73
44
|
default: false
|
|
74
45
|
},
|
|
75
|
-
size: {
|
|
76
|
-
allowSearch: {
|
|
77
|
-
type: Boolean,
|
|
78
|
-
default: (props) => Boolean(props.multiple)
|
|
79
|
-
},
|
|
46
|
+
size: {},
|
|
47
|
+
allowSearch: { type: Boolean },
|
|
80
48
|
filterable: { type: Boolean },
|
|
81
49
|
allowClear: {
|
|
82
50
|
type: Boolean,
|
|
83
51
|
default: false
|
|
84
52
|
},
|
|
85
53
|
clearable: { type: Boolean },
|
|
86
|
-
inputValue: {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
type: String,
|
|
92
|
-
default: ""
|
|
93
|
-
},
|
|
94
|
-
popupVisible: {
|
|
95
|
-
type: Boolean,
|
|
96
|
-
default: void 0
|
|
97
|
-
},
|
|
98
|
-
show: {
|
|
99
|
-
type: Boolean,
|
|
100
|
-
default: void 0
|
|
101
|
-
},
|
|
102
|
-
expandTrigger: {
|
|
103
|
-
type: String,
|
|
104
|
-
default: "click"
|
|
105
|
-
},
|
|
54
|
+
inputValue: {},
|
|
55
|
+
defaultInputValue: { default: "" },
|
|
56
|
+
popupVisible: { type: Boolean },
|
|
57
|
+
show: { type: Boolean },
|
|
58
|
+
expandTrigger: { default: "click" },
|
|
106
59
|
defaultPopupVisible: {
|
|
107
60
|
type: Boolean,
|
|
108
61
|
default: false
|
|
109
62
|
},
|
|
110
|
-
defaultShow: {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
},
|
|
114
|
-
|
|
115
|
-
filterOption: { type: Function },
|
|
116
|
-
popupContainer: { type: [String, Object] },
|
|
117
|
-
maxTagCount: {
|
|
118
|
-
type: [Number, String],
|
|
119
|
-
default: 0
|
|
120
|
-
},
|
|
63
|
+
defaultShow: { type: Boolean },
|
|
64
|
+
placeholder: {},
|
|
65
|
+
filterOption: {},
|
|
66
|
+
popupContainer: {},
|
|
67
|
+
maxTagCount: { default: 0 },
|
|
121
68
|
showPath: {
|
|
122
69
|
type: Boolean,
|
|
123
70
|
default: true
|
|
124
71
|
},
|
|
125
|
-
separator: {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
},
|
|
129
|
-
formatLabel: { type: Function },
|
|
130
|
-
triggerProps: { type: Object },
|
|
72
|
+
separator: { default: " / " },
|
|
73
|
+
formatLabel: {},
|
|
74
|
+
triggerProps: {},
|
|
131
75
|
checkStrictly: {
|
|
132
76
|
type: Boolean,
|
|
133
77
|
default: false
|
|
134
78
|
},
|
|
135
|
-
loadMore: {
|
|
79
|
+
loadMore: {},
|
|
136
80
|
loading: {
|
|
137
81
|
type: Boolean,
|
|
138
82
|
default: false
|
|
@@ -141,15 +85,9 @@ var cascader_vue_vue_type_script_lang_default = defineComponent({
|
|
|
141
85
|
type: Boolean,
|
|
142
86
|
default: false
|
|
143
87
|
},
|
|
144
|
-
searchDelay: {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
},
|
|
148
|
-
fieldNames: { type: Object },
|
|
149
|
-
valueKey: {
|
|
150
|
-
type: String,
|
|
151
|
-
default: "value"
|
|
152
|
-
},
|
|
88
|
+
searchDelay: { default: 500 },
|
|
89
|
+
fieldNames: {},
|
|
90
|
+
valueKey: { default: "value" },
|
|
153
91
|
fallback: {
|
|
154
92
|
type: [Boolean, Function],
|
|
155
93
|
default: true
|
|
@@ -158,37 +96,49 @@ var cascader_vue_vue_type_script_lang_default = defineComponent({
|
|
|
158
96
|
type: Boolean,
|
|
159
97
|
default: false
|
|
160
98
|
},
|
|
161
|
-
virtualListProps: {
|
|
99
|
+
virtualListProps: {},
|
|
162
100
|
tagNowrap: {
|
|
163
101
|
type: Boolean,
|
|
164
102
|
default: false
|
|
165
103
|
}
|
|
166
104
|
},
|
|
167
|
-
emits:
|
|
168
|
-
"update:modelValue"
|
|
169
|
-
"update:value"
|
|
170
|
-
"update:popupVisible"
|
|
171
|
-
"update:show"
|
|
172
|
-
"change"
|
|
173
|
-
"inputValueChange"
|
|
174
|
-
"clear"
|
|
175
|
-
"search"
|
|
176
|
-
"popupVisibleChange"
|
|
177
|
-
"showChange"
|
|
178
|
-
"focus"
|
|
179
|
-
"blur"
|
|
180
|
-
|
|
181
|
-
setup(
|
|
182
|
-
|
|
183
|
-
const
|
|
105
|
+
emits: [
|
|
106
|
+
"update:modelValue",
|
|
107
|
+
"update:value",
|
|
108
|
+
"update:popupVisible",
|
|
109
|
+
"update:show",
|
|
110
|
+
"change",
|
|
111
|
+
"inputValueChange",
|
|
112
|
+
"clear",
|
|
113
|
+
"search",
|
|
114
|
+
"popupVisibleChange",
|
|
115
|
+
"showChange",
|
|
116
|
+
"focus",
|
|
117
|
+
"blur"
|
|
118
|
+
],
|
|
119
|
+
setup(__props, { emit: __emit }) {
|
|
120
|
+
var _props$defaultValue;
|
|
121
|
+
const props = __props;
|
|
122
|
+
const emit = __emit;
|
|
123
|
+
const attrs = useAttrs();
|
|
124
|
+
const slots = useSlots();
|
|
125
|
+
const getDefaultValue = (multiple, pathMode) => {
|
|
126
|
+
if (multiple) return [];
|
|
127
|
+
if (pathMode) return;
|
|
128
|
+
return "";
|
|
129
|
+
};
|
|
130
|
+
const { options, checkStrictly, loadMore, formatLabel, modelValue, value: valueProp, disabled, valueKey, expandTrigger, expandChild, pathMode, multiple, popupVisible, show, defaultPopupVisible, defaultShow, error, size, placeholder, loading, maxTagCount, tagNowrap, popupContainer, searchOptionOnlyLabel } = toRefs(props);
|
|
131
|
+
const _value = ref((_props$defaultValue = props.defaultValue) !== null && _props$defaultValue !== void 0 ? _props$defaultValue : getDefaultValue(props.multiple, props.pathMode));
|
|
184
132
|
const _inputValue = ref(props.defaultInputValue);
|
|
185
133
|
const instance = getCurrentInstance();
|
|
186
134
|
const { mergedDisabled, eventHandlers } = useFormItem({ disabled });
|
|
187
|
-
const mergedAllowSearch = computed(() => {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
135
|
+
const { mergedAllowSearch } = useAllowSearch(computed(() => {
|
|
136
|
+
var _props$allowSearch;
|
|
137
|
+
return (_props$allowSearch = props.allowSearch) !== null && _props$allowSearch !== void 0 ? _props$allowSearch : props.multiple;
|
|
138
|
+
}), {
|
|
139
|
+
compatPropNames: ["filterable"],
|
|
140
|
+
getCompatValue: () => props.filterable,
|
|
141
|
+
getDefaultValue: () => props.multiple
|
|
192
142
|
});
|
|
193
143
|
const { mergedAllowClear } = useAllowClear(computed(() => {
|
|
194
144
|
var _props$clearable;
|
|
@@ -203,6 +153,10 @@ var cascader_vue_vue_type_script_lang_default = defineComponent({
|
|
|
203
153
|
defaultShow,
|
|
204
154
|
emit
|
|
205
155
|
});
|
|
156
|
+
const mergedTriggerProps = computed(() => {
|
|
157
|
+
var _props$triggerProps;
|
|
158
|
+
return (_props$triggerProps = props.triggerProps) !== null && _props$triggerProps !== void 0 ? _props$triggerProps : {};
|
|
159
|
+
});
|
|
206
160
|
watch([modelValue, valueProp], ([nextModelValue, nextValue]) => {
|
|
207
161
|
const mergedValue = nextModelValue !== null && nextModelValue !== void 0 ? nextModelValue : nextValue;
|
|
208
162
|
if (isUndefined(mergedValue) || isNull(mergedValue)) _value.value = getDefaultValue(props.multiple, props.pathMode);
|
|
@@ -407,7 +361,7 @@ var cascader_vue_vue_type_script_lang_default = defineComponent({
|
|
|
407
361
|
valueMap: computedValueMap
|
|
408
362
|
}));
|
|
409
363
|
const handleKeyDown = getKeyDownHandler(new Map([
|
|
410
|
-
[KEYBOARD_KEY.ENTER, (
|
|
364
|
+
[KEYBOARD_KEY.ENTER, (_ev) => {
|
|
411
365
|
if (computedPopupVisible.value) {
|
|
412
366
|
if (activeOption.value) {
|
|
413
367
|
let checked;
|
|
@@ -418,7 +372,7 @@ var cascader_vue_vue_type_script_lang_default = defineComponent({
|
|
|
418
372
|
}
|
|
419
373
|
} else handlePopupVisibleChange(true);
|
|
420
374
|
}],
|
|
421
|
-
[KEYBOARD_KEY.ESC, (
|
|
375
|
+
[KEYBOARD_KEY.ESC, (_ev) => {
|
|
422
376
|
handlePopupVisibleChange(false);
|
|
423
377
|
}],
|
|
424
378
|
[KEYBOARD_KEY.ARROW_DOWN, (ev) => {
|
|
@@ -453,60 +407,170 @@ var cascader_vue_vue_type_script_lang_default = defineComponent({
|
|
|
453
407
|
}
|
|
454
408
|
}]
|
|
455
409
|
]));
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
410
|
+
const selectViewValue = computed(() => {
|
|
411
|
+
const result = [];
|
|
412
|
+
computedValueMap.value.forEach((value, key) => {
|
|
413
|
+
const option = leafOptionMap.get(key);
|
|
414
|
+
if (option) {
|
|
415
|
+
var _props$formatLabel, _props$formatLabel2;
|
|
416
|
+
result.push({
|
|
417
|
+
value: key,
|
|
418
|
+
label: (_props$formatLabel = (_props$formatLabel2 = props.formatLabel) === null || _props$formatLabel2 === void 0 ? void 0 : _props$formatLabel2.call(props, option.path.map((item) => item.raw))) !== null && _props$formatLabel !== void 0 ? _props$formatLabel : getOptionLabel(option, {
|
|
419
|
+
showPath: props.showPath,
|
|
420
|
+
separator: props.separator
|
|
421
|
+
}),
|
|
422
|
+
closable: !option.disabled,
|
|
423
|
+
tagProps: option.tagProps
|
|
424
|
+
});
|
|
425
|
+
} else if (props.fallback) {
|
|
426
|
+
let label;
|
|
427
|
+
if (isFunction(props.fallback)) label = props.fallback(value);
|
|
428
|
+
else if (isArray(value)) {
|
|
429
|
+
var _value2;
|
|
430
|
+
label = props.showPath ? value.map((item) => String(item)).join(props.separator) : String((_value2 = value[value.length - 1]) !== null && _value2 !== void 0 ? _value2 : "");
|
|
431
|
+
} else label = String(value);
|
|
432
|
+
result.push({
|
|
433
|
+
value: key,
|
|
434
|
+
label,
|
|
435
|
+
closable: true
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
});
|
|
439
|
+
return result;
|
|
440
|
+
});
|
|
441
|
+
return (_ctx, _cache) => {
|
|
442
|
+
return openBlock(), createBlock(unref(Trigger), mergeProps(mergedTriggerProps.value, {
|
|
443
|
+
trigger: "click",
|
|
444
|
+
"animation-name": "slide-dynamic-origin",
|
|
445
|
+
"auto-fit-transform-origin": "",
|
|
446
|
+
"popup-visible": unref(computedPopupVisible),
|
|
447
|
+
position: "bl",
|
|
448
|
+
disabled: unref(mergedDisabled),
|
|
449
|
+
"popup-offset": 4,
|
|
450
|
+
"auto-fit-popup-width": showSearchPanel.value,
|
|
451
|
+
"popup-container": unref(popupContainer),
|
|
452
|
+
"prevent-focus": true,
|
|
453
|
+
"click-to-close": !Boolean(unref(mergedAllowSearch)),
|
|
454
|
+
onPopupVisibleChange: unref(handlePopupVisibleChange)
|
|
455
|
+
}), {
|
|
456
|
+
content: withCtx(() => [showSearchPanel.value ? (openBlock(), createBlock(unref(cascader_search_panel_default), {
|
|
457
|
+
key: 0,
|
|
458
|
+
options: filteredLeafOptions.value,
|
|
459
|
+
"active-key": unref(activeKey),
|
|
460
|
+
multiple: unref(multiple),
|
|
461
|
+
"check-strictly": unref(checkStrictly),
|
|
462
|
+
loading: unref(loading),
|
|
463
|
+
"path-label": !unref(searchOptionOnlyLabel)
|
|
464
|
+
}, createSlots({ _: 2 }, [_ctx.$slots.empty ? {
|
|
465
|
+
name: "empty",
|
|
466
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "empty")]),
|
|
467
|
+
key: "0"
|
|
468
|
+
} : void 0]), 1032, [
|
|
469
|
+
"options",
|
|
470
|
+
"active-key",
|
|
471
|
+
"multiple",
|
|
472
|
+
"check-strictly",
|
|
473
|
+
"loading",
|
|
474
|
+
"path-label"
|
|
475
|
+
])) : (openBlock(), createBlock(unref(base_cascader_panel_default), {
|
|
476
|
+
key: 1,
|
|
477
|
+
"display-columns": unref(displayColumns),
|
|
478
|
+
"selected-path": unref(selectedPath),
|
|
479
|
+
"active-key": unref(activeKey),
|
|
480
|
+
multiple: unref(multiple),
|
|
481
|
+
"total-level": totalLevel.value,
|
|
482
|
+
"check-strictly": unref(checkStrictly),
|
|
483
|
+
loading: unref(loading),
|
|
484
|
+
"virtual-list-props": resolvedVirtualListProps.value,
|
|
485
|
+
dropdown: ""
|
|
486
|
+
}, createSlots({ _: 2 }, [_ctx.$slots.empty ? {
|
|
487
|
+
name: "empty",
|
|
488
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "empty")]),
|
|
489
|
+
key: "0"
|
|
490
|
+
} : void 0]), 1032, [
|
|
491
|
+
"display-columns",
|
|
492
|
+
"selected-path",
|
|
493
|
+
"active-key",
|
|
494
|
+
"multiple",
|
|
495
|
+
"total-level",
|
|
496
|
+
"check-strictly",
|
|
497
|
+
"loading",
|
|
498
|
+
"virtual-list-props"
|
|
499
|
+
]))]),
|
|
500
|
+
default: withCtx(() => [createVNode(unref(select_view_default), mergeProps({
|
|
501
|
+
"model-value": selectViewValue.value,
|
|
502
|
+
"input-value": computedInputValue.value,
|
|
503
|
+
disabled: unref(mergedDisabled),
|
|
504
|
+
error: unref(error),
|
|
505
|
+
multiple: unref(multiple),
|
|
506
|
+
"allow-clear": unref(mergedAllowClear),
|
|
507
|
+
"allow-search": Boolean(unref(mergedAllowSearch)),
|
|
508
|
+
size: unref(size),
|
|
509
|
+
opened: unref(computedPopupVisible),
|
|
510
|
+
placeholder: unref(placeholder),
|
|
511
|
+
loading: unref(loading),
|
|
512
|
+
"max-tag-count": unref(maxTagCount),
|
|
513
|
+
"tag-nowrap": unref(tagNowrap)
|
|
514
|
+
}, unref(attrs), {
|
|
515
|
+
onInputValueChange: handleInputValueChange,
|
|
516
|
+
onClear: handleClear,
|
|
517
|
+
onFocus: handleFocus,
|
|
518
|
+
onBlur: handleBlur,
|
|
519
|
+
onRemove: handleRemove,
|
|
520
|
+
onKeydown: unref(handleKeyDown)
|
|
521
|
+
}), createSlots({ _: 2 }, [
|
|
522
|
+
_ctx.$slots.label ? {
|
|
523
|
+
name: "label",
|
|
524
|
+
fn: withCtx((data) => [renderSlot(_ctx.$slots, "label", normalizeProps(guardReactiveProps(data)))]),
|
|
525
|
+
key: "0"
|
|
526
|
+
} : void 0,
|
|
527
|
+
_ctx.$slots.prefix ? {
|
|
528
|
+
name: "prefix",
|
|
529
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "prefix")]),
|
|
530
|
+
key: "1"
|
|
531
|
+
} : void 0,
|
|
532
|
+
_ctx.$slots["arrow-icon"] ? {
|
|
533
|
+
name: "arrow-icon",
|
|
534
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "arrow-icon")]),
|
|
535
|
+
key: "2"
|
|
536
|
+
} : void 0,
|
|
537
|
+
_ctx.$slots["loading-icon"] ? {
|
|
538
|
+
name: "loading-icon",
|
|
539
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "loading-icon")]),
|
|
540
|
+
key: "3"
|
|
541
|
+
} : void 0,
|
|
542
|
+
_ctx.$slots["search-icon"] ? {
|
|
543
|
+
name: "search-icon",
|
|
544
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "search-icon")]),
|
|
545
|
+
key: "4"
|
|
546
|
+
} : void 0
|
|
547
|
+
]), 1040, [
|
|
548
|
+
"model-value",
|
|
549
|
+
"input-value",
|
|
550
|
+
"disabled",
|
|
551
|
+
"error",
|
|
552
|
+
"multiple",
|
|
553
|
+
"allow-clear",
|
|
554
|
+
"allow-search",
|
|
555
|
+
"size",
|
|
556
|
+
"opened",
|
|
557
|
+
"placeholder",
|
|
558
|
+
"loading",
|
|
559
|
+
"max-tag-count",
|
|
560
|
+
"tag-nowrap",
|
|
561
|
+
"onKeydown"
|
|
562
|
+
])]),
|
|
563
|
+
_: 3
|
|
564
|
+
}, 16, [
|
|
565
|
+
"popup-visible",
|
|
566
|
+
"disabled",
|
|
567
|
+
"auto-fit-popup-width",
|
|
568
|
+
"popup-container",
|
|
569
|
+
"click-to-close",
|
|
570
|
+
"onPopupVisibleChange"
|
|
571
|
+
]);
|
|
508
572
|
};
|
|
509
573
|
}
|
|
510
|
-
});
|
|
574
|
+
}));
|
|
511
575
|
//#endregion
|
|
512
|
-
export {
|
|
576
|
+
export { cascader_vue_vue_type_script_setup_true_lang_default as default };
|