@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,6 +1,6 @@
|
|
|
1
1
|
import { useFormItem } from "../_hooks/use-form-item.js";
|
|
2
2
|
import { configProviderInjectionKey } from "../config-provider/context.js";
|
|
3
|
-
import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.
|
|
3
|
+
import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.130.0/helpers/objectSpread2.js";
|
|
4
4
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
5
5
|
import { isFunction, isObject, isUndefined } from "../_utils/is.js";
|
|
6
6
|
import { useAllowClear } from "../_hooks/use-allow-clear.js";
|
|
@@ -10,6 +10,7 @@ import Empty from "../empty/index.js";
|
|
|
10
10
|
import Spin from "../spin/index.js";
|
|
11
11
|
import Trigger from "../trigger/index.js";
|
|
12
12
|
import select_view_default from "../_components/select-view/select-view.js";
|
|
13
|
+
import { useAllowSearch } from "../_hooks/use-allow-search.js";
|
|
13
14
|
import { getCheckedStateByCheck, isNodeCheckable } from "../tree/utils/check-utils.js";
|
|
14
15
|
import { isNodeSelectable } from "../tree/utils/index.js";
|
|
15
16
|
import useTreeData from "../tree/hooks/use-tree-data.js";
|
|
@@ -17,7 +18,7 @@ import pickSubCompSlots from "../_utils/pick-sub-comp-slots.js";
|
|
|
17
18
|
import useFilterTreeNode from "./hooks/use-filter-tree-node.js";
|
|
18
19
|
import useSelectedState from "./hooks/use-selected-state.js";
|
|
19
20
|
import panel_default from "./panel.js";
|
|
20
|
-
import { computed, defineComponent,
|
|
21
|
+
import { computed, defineComponent, inject, nextTick, reactive, ref, toRefs } from "vue";
|
|
21
22
|
//#region components/tree-select/tree-select.vue?vue&type=script&lang.ts
|
|
22
23
|
var tree_select_vue_vue_type_script_lang_default = defineComponent({
|
|
23
24
|
name: "TreeSelect",
|
|
@@ -30,73 +31,201 @@ var tree_select_vue_vue_type_script_lang_default = defineComponent({
|
|
|
30
31
|
},
|
|
31
32
|
inheritAttrs: false,
|
|
32
33
|
props: {
|
|
34
|
+
/**
|
|
35
|
+
* @zh 是否禁用
|
|
36
|
+
* @en Whether to disable
|
|
37
|
+
* */
|
|
33
38
|
disabled: { type: Boolean },
|
|
39
|
+
/**
|
|
40
|
+
* @zh 是否为加载中状态
|
|
41
|
+
* @en Whether it is loading state
|
|
42
|
+
* */
|
|
34
43
|
loading: { type: Boolean },
|
|
44
|
+
/**
|
|
45
|
+
* @zh 是否为错误状态
|
|
46
|
+
* @en Whether it is an error state
|
|
47
|
+
* */
|
|
35
48
|
error: { type: Boolean },
|
|
49
|
+
/**
|
|
50
|
+
* @zh 选择框的大小
|
|
51
|
+
* @en The size of the selection box.
|
|
52
|
+
* @values 'mini','small','medium','large'
|
|
53
|
+
* @defaultValue 'medium'
|
|
54
|
+
* */
|
|
36
55
|
size: { type: String },
|
|
56
|
+
/**
|
|
57
|
+
* @zh 是否显示边框
|
|
58
|
+
* @en Whether to show the border
|
|
59
|
+
* */
|
|
37
60
|
border: {
|
|
38
61
|
type: Boolean,
|
|
39
62
|
default: true
|
|
40
63
|
},
|
|
64
|
+
/**
|
|
65
|
+
* @zh 是否允许搜索
|
|
66
|
+
* @en Whether to allow searching
|
|
67
|
+
* @defaultValue false (single) \| true (multiple)
|
|
68
|
+
* */
|
|
41
69
|
allowSearch: {
|
|
42
70
|
type: [Boolean, Object],
|
|
43
71
|
default: void 0
|
|
44
72
|
},
|
|
73
|
+
/**
|
|
74
|
+
* @zh 是否允许搜索,Naive 兼容别名
|
|
75
|
+
* @en Whether to allow searching, Naive compatibility alias
|
|
76
|
+
* */
|
|
45
77
|
filterable: { type: Boolean },
|
|
78
|
+
/**
|
|
79
|
+
* @zh 是否允许清除
|
|
80
|
+
* @en Whether to allow clear
|
|
81
|
+
* */
|
|
46
82
|
allowClear: { type: Boolean },
|
|
83
|
+
/**
|
|
84
|
+
* @zh 是否允许清除,Naive 兼容别名
|
|
85
|
+
* @en Whether to allow clear, Naive compatibility alias
|
|
86
|
+
* */
|
|
47
87
|
clearable: { type: Boolean },
|
|
48
88
|
showArrow: {
|
|
49
89
|
type: Boolean,
|
|
50
90
|
default: true
|
|
51
91
|
},
|
|
92
|
+
/**
|
|
93
|
+
* @zh 提示文案
|
|
94
|
+
* @en Prompt copy
|
|
95
|
+
* */
|
|
52
96
|
placeholder: { type: String },
|
|
97
|
+
/**
|
|
98
|
+
* @zh 最多显示的标签数量,仅在多选模式有效
|
|
99
|
+
* @en The maximum number of labels displayed, only valid in multi-select mode
|
|
100
|
+
* */
|
|
53
101
|
maxTagCount: { type: [Number, String] },
|
|
102
|
+
/**
|
|
103
|
+
* @zh 是否支持多选
|
|
104
|
+
* @en Whether to support multiple selection
|
|
105
|
+
* */
|
|
54
106
|
multiple: { type: Boolean },
|
|
107
|
+
/**
|
|
108
|
+
* @zh 默认值
|
|
109
|
+
* @en Default value
|
|
110
|
+
* */
|
|
55
111
|
defaultValue: { type: [
|
|
56
112
|
String,
|
|
57
113
|
Number,
|
|
58
114
|
Array,
|
|
59
115
|
Object
|
|
60
116
|
] },
|
|
117
|
+
/**
|
|
118
|
+
* @zh 绑定值
|
|
119
|
+
* @en Value
|
|
120
|
+
* */
|
|
61
121
|
modelValue: { type: [
|
|
62
122
|
String,
|
|
63
123
|
Number,
|
|
64
124
|
Array,
|
|
65
125
|
Object
|
|
66
126
|
] },
|
|
127
|
+
/**
|
|
128
|
+
* @zh 绑定值,Naive 兼容别名
|
|
129
|
+
* @en Value, Naive compatibility alias
|
|
130
|
+
* */
|
|
67
131
|
value: { type: [
|
|
68
132
|
String,
|
|
69
133
|
Number,
|
|
70
134
|
Array,
|
|
71
135
|
Object
|
|
72
136
|
] },
|
|
137
|
+
/**
|
|
138
|
+
* @zh 指定节点数据中的字段名
|
|
139
|
+
* @en Specify the field name in the node data
|
|
140
|
+
* */
|
|
73
141
|
fieldNames: { type: Object },
|
|
142
|
+
/**
|
|
143
|
+
* @zh 数据
|
|
144
|
+
* @en Data
|
|
145
|
+
* */
|
|
74
146
|
data: {
|
|
75
147
|
type: Array,
|
|
76
148
|
default: () => []
|
|
77
149
|
},
|
|
150
|
+
/**
|
|
151
|
+
* @zh 数据,Naive 兼容别名
|
|
152
|
+
* @en Data, Naive compatibility alias
|
|
153
|
+
* */
|
|
78
154
|
options: { type: Array },
|
|
155
|
+
/**
|
|
156
|
+
* @zh 设置value格式。默认是string,设置为true时候,value格式为: { label: string, value: string }
|
|
157
|
+
* @en Set the value format. The default is string, when set to true, the value format is: {label: string, value: string}
|
|
158
|
+
* */
|
|
79
159
|
labelInValue: { type: Boolean },
|
|
160
|
+
/**
|
|
161
|
+
* @zh 是否展示复选框
|
|
162
|
+
* @en Whether to show checkbox
|
|
163
|
+
* */
|
|
80
164
|
treeCheckable: { type: Boolean },
|
|
165
|
+
/**
|
|
166
|
+
* @zh 是否展示复选框,Naive 兼容别名
|
|
167
|
+
* @en Whether to show checkbox, Naive compatibility alias
|
|
168
|
+
* */
|
|
81
169
|
checkable: { type: Boolean },
|
|
170
|
+
/**
|
|
171
|
+
* @zh 父子节点是否关联
|
|
172
|
+
* @en Whether the parent and child nodes are related
|
|
173
|
+
* */
|
|
82
174
|
treeCheckStrictly: { type: Boolean },
|
|
175
|
+
/**
|
|
176
|
+
* @zh 定制回显方式
|
|
177
|
+
* @en Customized echo method
|
|
178
|
+
* */
|
|
83
179
|
treeCheckedStrategy: {
|
|
84
180
|
type: String,
|
|
85
181
|
default: "all"
|
|
86
182
|
},
|
|
183
|
+
/**
|
|
184
|
+
* @zh 定制回显方式,Naive 兼容别名
|
|
185
|
+
* @en Customized echo method, Naive compatibility alias
|
|
186
|
+
* */
|
|
87
187
|
checkStrategy: { type: String },
|
|
188
|
+
/**
|
|
189
|
+
* @zh 是否展示完整路径
|
|
190
|
+
* @en Whether to display the full path
|
|
191
|
+
* */
|
|
88
192
|
showPath: { type: Boolean },
|
|
193
|
+
/**
|
|
194
|
+
* @zh 路径分隔符
|
|
195
|
+
* @en Path separator
|
|
196
|
+
* */
|
|
89
197
|
separator: {
|
|
90
198
|
type: String,
|
|
91
199
|
default: " / "
|
|
92
200
|
},
|
|
201
|
+
/**
|
|
202
|
+
* @zh 可以接受所有 [Tree](/vue/component/tree) 组件的Props
|
|
203
|
+
* @en Can accept Props of all [Tree](/vue/component/tree) components
|
|
204
|
+
* */
|
|
93
205
|
treeProps: { type: Object },
|
|
206
|
+
/**
|
|
207
|
+
* @zh 传递树虚拟列表属性,传入此参数以开启虚拟滚动
|
|
208
|
+
* @en Pass tree virtual list properties to enable virtual scrolling
|
|
209
|
+
*/
|
|
94
210
|
virtualListProps: { type: Object },
|
|
211
|
+
/**
|
|
212
|
+
* @zh 可以接受所有 [Trigger](/vue/component/trigger) 组件的Props
|
|
213
|
+
* @en Can accept Props of all [Trigger](/vue/component/trigger) components
|
|
214
|
+
* */
|
|
95
215
|
triggerProps: { type: Object },
|
|
216
|
+
/**
|
|
217
|
+
* @zh 是否开启虚拟滚动,Naive 兼容别名
|
|
218
|
+
* @en Whether to enable virtual scroll, Naive compatibility alias
|
|
219
|
+
* */
|
|
96
220
|
virtualScroll: {
|
|
97
221
|
type: Boolean,
|
|
98
222
|
default: void 0
|
|
99
223
|
},
|
|
224
|
+
/**
|
|
225
|
+
* @zh 弹出框是否可见
|
|
226
|
+
* @en Whether the pop-up box is visible
|
|
227
|
+
* @vModel
|
|
228
|
+
*/
|
|
100
229
|
popupVisible: {
|
|
101
230
|
type: Boolean,
|
|
102
231
|
default: void 0
|
|
@@ -105,21 +234,59 @@ var tree_select_vue_vue_type_script_lang_default = defineComponent({
|
|
|
105
234
|
type: Boolean,
|
|
106
235
|
default: void 0
|
|
107
236
|
},
|
|
237
|
+
/**
|
|
238
|
+
* @zh 默认弹出框是否可见
|
|
239
|
+
* @en Whether the default pop-up box is visible
|
|
240
|
+
* */
|
|
108
241
|
defaultPopupVisible: { type: Boolean },
|
|
109
242
|
defaultShow: {
|
|
110
243
|
type: Boolean,
|
|
111
244
|
default: void 0
|
|
112
245
|
},
|
|
246
|
+
/**
|
|
247
|
+
* @zh 下拉框样式
|
|
248
|
+
* @en Drop-down box style
|
|
249
|
+
* */
|
|
113
250
|
dropdownStyle: { type: Object },
|
|
251
|
+
/**
|
|
252
|
+
* @zh 下拉框样式 class
|
|
253
|
+
* @en Drop-down box style class
|
|
254
|
+
* */
|
|
114
255
|
dropdownClassName: { type: [String, Array] },
|
|
256
|
+
/**
|
|
257
|
+
* @zh 自定义节点过滤函数
|
|
258
|
+
* @en Custom node filter function
|
|
259
|
+
* */
|
|
115
260
|
filterTreeNode: { type: Function },
|
|
261
|
+
/**
|
|
262
|
+
* @zh 动态加载数据
|
|
263
|
+
* @en Load data dynamically
|
|
264
|
+
* */
|
|
116
265
|
loadMore: { type: Function },
|
|
266
|
+
/**
|
|
267
|
+
* @zh 禁用内部过滤逻辑
|
|
268
|
+
* @en Disable internal filtering logic
|
|
269
|
+
* */
|
|
117
270
|
disableFilter: { type: Boolean },
|
|
271
|
+
/**
|
|
272
|
+
* @zh 弹出框的挂载容器
|
|
273
|
+
* @en Mount container for pop-up box
|
|
274
|
+
*/
|
|
118
275
|
popupContainer: { type: [String, Object] },
|
|
276
|
+
/**
|
|
277
|
+
* @zh 为 value 中找不到匹配项的 key 定义节点数据
|
|
278
|
+
* @en Customize node data for keys that do not match options
|
|
279
|
+
* @version 2.22.0
|
|
280
|
+
*/
|
|
119
281
|
fallbackOption: {
|
|
120
282
|
type: [Boolean, Function],
|
|
121
283
|
default: true
|
|
122
284
|
},
|
|
285
|
+
/**
|
|
286
|
+
* @zh 设置可选择的节点,默认全部可选
|
|
287
|
+
* @en Set the nodes that can be selected, all can be selected by default
|
|
288
|
+
* @version 2.27.0
|
|
289
|
+
*/
|
|
123
290
|
selectable: {
|
|
124
291
|
type: [
|
|
125
292
|
Boolean,
|
|
@@ -128,49 +295,155 @@ var tree_select_vue_vue_type_script_lang_default = defineComponent({
|
|
|
128
295
|
],
|
|
129
296
|
default: true
|
|
130
297
|
},
|
|
298
|
+
/**
|
|
299
|
+
* @zh 是否开启虚拟滚动条
|
|
300
|
+
* @en Whether to enable virtual scroll bar
|
|
301
|
+
* @version 2.39.0
|
|
302
|
+
*/
|
|
131
303
|
scrollbar: {
|
|
132
304
|
type: [Boolean, Object],
|
|
133
305
|
default: true
|
|
134
306
|
},
|
|
307
|
+
/**
|
|
308
|
+
* @zh 空状态时是否显示header
|
|
309
|
+
* @en Whether to display the header in the empty state
|
|
310
|
+
*/
|
|
135
311
|
showHeaderOnEmpty: {
|
|
136
312
|
type: Boolean,
|
|
137
313
|
default: false
|
|
138
314
|
},
|
|
315
|
+
/**
|
|
316
|
+
* @zh 空状态时是否显示footer
|
|
317
|
+
* @en Whether to display the footer in the empty state
|
|
318
|
+
*/
|
|
139
319
|
showFooterOnEmpty: {
|
|
140
320
|
type: Boolean,
|
|
141
321
|
default: false
|
|
142
322
|
},
|
|
323
|
+
/**
|
|
324
|
+
* @zh 输入框的值
|
|
325
|
+
* @en The value of the input
|
|
326
|
+
* @vModel
|
|
327
|
+
* @version 2.55.0
|
|
328
|
+
*/
|
|
143
329
|
inputValue: { type: String },
|
|
330
|
+
/**
|
|
331
|
+
* @zh 输入框的默认值(非受控模式)
|
|
332
|
+
* @en The default value of the input (uncontrolled mode)
|
|
333
|
+
* @version 2.55.0
|
|
334
|
+
*/
|
|
144
335
|
defaultInputValue: {
|
|
145
336
|
type: String,
|
|
146
337
|
default: ""
|
|
147
338
|
}
|
|
148
339
|
},
|
|
149
340
|
emits: {
|
|
341
|
+
/**
|
|
342
|
+
* @zh 值改变时触发
|
|
343
|
+
* @en Trigger when the value changes
|
|
344
|
+
* @param {string | number | LabelValue | Array<string | number> | LabelValue[] | undefined} value
|
|
345
|
+
*/
|
|
150
346
|
"change": (_value) => true,
|
|
151
347
|
"update:modelValue": (_value) => true,
|
|
152
348
|
"update:value": (_value) => true,
|
|
153
349
|
"update:inputValue": (_inputValue) => true,
|
|
350
|
+
/**
|
|
351
|
+
* @zh 下拉框显示状态改变时触发
|
|
352
|
+
* @en Triggered when the status of the drop-down box changes
|
|
353
|
+
* @param {boolean} visible
|
|
354
|
+
*/
|
|
154
355
|
"popup-visible-change": (_visible) => true,
|
|
155
356
|
"update:popupVisible": (_visible) => true,
|
|
156
357
|
"showChange": (_visible) => true,
|
|
157
358
|
"update:show": (_visible) => true,
|
|
359
|
+
/**
|
|
360
|
+
* @zh 搜索值变化时触发
|
|
361
|
+
* @en Triggered when the search value changes
|
|
362
|
+
* @param {string} searchKey
|
|
363
|
+
*/
|
|
158
364
|
"search": (_searchKey) => true,
|
|
365
|
+
/**
|
|
366
|
+
* @zh 点击清除时触发
|
|
367
|
+
* @en Triggered when clear is clicked
|
|
368
|
+
* */
|
|
159
369
|
"clear": () => true,
|
|
370
|
+
/**
|
|
371
|
+
* @zh 输入框的值发生改变时触发
|
|
372
|
+
* @en Triggered when the value of the input changes
|
|
373
|
+
* @param {string} inputValue
|
|
374
|
+
* @version 2.55.0
|
|
375
|
+
*/
|
|
160
376
|
"inputValueChange": (_inputValue) => true
|
|
161
377
|
},
|
|
378
|
+
/**
|
|
379
|
+
* @zh 自定义触发元素
|
|
380
|
+
* @en Custom trigger element
|
|
381
|
+
* @slot trigger
|
|
382
|
+
*/
|
|
383
|
+
/**
|
|
384
|
+
* @zh 前缀
|
|
385
|
+
* @en Prefix
|
|
386
|
+
* @slot prefix
|
|
387
|
+
*/
|
|
388
|
+
/**
|
|
389
|
+
* @zh 自定义选择框显示
|
|
390
|
+
* @en Custom Label
|
|
391
|
+
* @slot label
|
|
392
|
+
* @binding data
|
|
393
|
+
*/
|
|
394
|
+
/**
|
|
395
|
+
* @zh 定制加载中显示的内容
|
|
396
|
+
* @en Customizing the content displayed during loading
|
|
397
|
+
* @slot loader
|
|
398
|
+
*/
|
|
399
|
+
/**
|
|
400
|
+
* @zh 定制空数据展示
|
|
401
|
+
* @en Custom empty data display
|
|
402
|
+
* @slot empty
|
|
403
|
+
*/
|
|
404
|
+
/**
|
|
405
|
+
* @zh 定制 tree 组件的 switcher 图标
|
|
406
|
+
* @en Custom switcher icon for the tree component
|
|
407
|
+
* @slot tree-slot-switcher-icon
|
|
408
|
+
*/
|
|
409
|
+
/**
|
|
410
|
+
* @zh 定制 tree 组件的节点图标
|
|
411
|
+
* @en Custom node icon for the tree component
|
|
412
|
+
* @slot tree-slot-icon
|
|
413
|
+
* @binding {TreeNodeData} node
|
|
414
|
+
* @version 2.18.0
|
|
415
|
+
*/
|
|
416
|
+
/**
|
|
417
|
+
* @zh 定制 tree 组件的节点标题
|
|
418
|
+
* @en Custom the node title of the tree component
|
|
419
|
+
* @slot tree-slot-title
|
|
420
|
+
* @binding {string} title
|
|
421
|
+
*/
|
|
422
|
+
/**
|
|
423
|
+
* @zh 定制 tree 组件的渲染额外节点内容
|
|
424
|
+
* @en Render additional node content of the tree component
|
|
425
|
+
* @slot tree-slot-extra
|
|
426
|
+
*/
|
|
427
|
+
/**
|
|
428
|
+
* @zh 自定义下拉框页头
|
|
429
|
+
* @en The header of the drop-down box
|
|
430
|
+
* @slot header
|
|
431
|
+
*/
|
|
432
|
+
/**
|
|
433
|
+
* @zh 自定义下拉框页脚
|
|
434
|
+
* @en The footer of the drop-down box
|
|
435
|
+
* @slot footer
|
|
436
|
+
*/
|
|
162
437
|
setup(props, { emit, slots }) {
|
|
163
438
|
var _configCtx$slots, _configCtx$slots$empt, _defaultPopupVisible$;
|
|
164
439
|
const { defaultValue, modelValue, multiple, popupVisible, show, defaultPopupVisible, defaultShow, treeCheckable, treeCheckStrictly, data, options, fieldNames, disabled, labelInValue, filterTreeNode, disableFilter, dropdownStyle, treeProps, fallbackOption, selectable, checkable, checkStrategy, showPath, separator, value, virtualScroll } = toRefs(props);
|
|
165
440
|
const { mergedDisabled, eventHandlers } = useFormItem({ disabled });
|
|
166
441
|
const prefixCls = getPrefixCls("tree-select");
|
|
167
442
|
const configCtx = inject(configProviderInjectionKey, void 0);
|
|
168
|
-
const
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
if (props.filterable !== void 0) return props.filterable;
|
|
173
|
-
return Boolean(props.multiple || props.treeCheckable || props.checkable);
|
|
443
|
+
const { mergedAllowSearch } = useAllowSearch(computed(() => props.allowSearch), {
|
|
444
|
+
compatPropNames: ["filterable"],
|
|
445
|
+
getCompatValue: () => props.filterable,
|
|
446
|
+
getDefaultValue: () => Boolean(props.multiple || props.treeCheckable || props.checkable)
|
|
174
447
|
});
|
|
175
448
|
const { mergedAllowClear } = useAllowClear(computed(() => props.allowClear || props.clearable));
|
|
176
449
|
const TreeSelectEmpty = configCtx === null || configCtx === void 0 || (_configCtx$slots$empt = (_configCtx$slots = configCtx.slots).empty) === null || _configCtx$slots$empt === void 0 || (_configCtx$slots$empt = _configCtx$slots$empt.call(_configCtx$slots, { component: "tree-select" })) === null || _configCtx$slots$empt === void 0 ? void 0 : _configCtx$slots$empt[0];
|