@sdata/web-vue 1.11.0 → 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,7 +1,7 @@
|
|
|
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 { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { isArray, isFunction, isUndefined } from "../_utils/is.js";
|
|
4
|
-
import { _asyncToGenerator } from "../_virtual/_@oxc-project_runtime@0.
|
|
4
|
+
import { _asyncToGenerator } from "../_virtual/_@oxc-project_runtime@0.130.0/helpers/asyncToGenerator.js";
|
|
5
5
|
import virtual_list_default from "../_components/virtual-list/index.js";
|
|
6
6
|
import useMergeState from "../_hooks/use-merge-state.js";
|
|
7
7
|
import usePickSlots from "../_hooks/use-pick-slots.js";
|
|
@@ -26,16 +26,36 @@ var tree_vue_vue_type_script_lang_default = defineComponent({
|
|
|
26
26
|
TreeNode: node_default
|
|
27
27
|
},
|
|
28
28
|
props: {
|
|
29
|
+
/**
|
|
30
|
+
* @zh 尺寸
|
|
31
|
+
* @en Size
|
|
32
|
+
*/
|
|
29
33
|
size: {
|
|
30
34
|
type: String,
|
|
31
35
|
default: "medium"
|
|
32
36
|
},
|
|
37
|
+
/**
|
|
38
|
+
* @zh 节点是否占据一行
|
|
39
|
+
* @en Whether the node occupies a row
|
|
40
|
+
*/
|
|
33
41
|
blockNode: { type: Boolean },
|
|
42
|
+
/**
|
|
43
|
+
* @zh 是否默认展开父节点
|
|
44
|
+
* @en Whether to expand the parent node by default
|
|
45
|
+
*/
|
|
34
46
|
defaultExpandAll: {
|
|
35
47
|
type: Boolean,
|
|
36
48
|
default: true
|
|
37
49
|
},
|
|
50
|
+
/**
|
|
51
|
+
* @zh 是否支持多选
|
|
52
|
+
* @en Whether to support multiple selection
|
|
53
|
+
*/
|
|
38
54
|
multiple: { type: Boolean },
|
|
55
|
+
/**
|
|
56
|
+
* @zh 是否在节点前添加复选框,从 `2.27.0` 开始支持函数格式
|
|
57
|
+
* @en Whether to add a checkbox before the node, function format is supported since `2.27.0`
|
|
58
|
+
*/
|
|
39
59
|
checkable: {
|
|
40
60
|
type: [
|
|
41
61
|
Boolean,
|
|
@@ -44,51 +64,154 @@ var tree_vue_vue_type_script_lang_default = defineComponent({
|
|
|
44
64
|
],
|
|
45
65
|
default: false
|
|
46
66
|
},
|
|
67
|
+
/**
|
|
68
|
+
* @zh 是否支持选择,从 `2.27.0` 开始支持函数格式
|
|
69
|
+
* @en Whether to support selection, function format is supported since `2.27.0`
|
|
70
|
+
* */
|
|
47
71
|
selectable: {
|
|
48
72
|
type: [Boolean, Function],
|
|
49
73
|
default: true
|
|
50
74
|
},
|
|
75
|
+
/**
|
|
76
|
+
* @zh 是否取消父子节点关联
|
|
77
|
+
* @en Whether to cancel the parent-child node association
|
|
78
|
+
* */
|
|
51
79
|
checkStrictly: { type: Boolean },
|
|
80
|
+
/**
|
|
81
|
+
* @zh 定制回填方式 <br/> all: 返回所有选中的节点 <br/> parent: 父子节点都选中时只返回父节点 <br/> child: 只返回子节点
|
|
82
|
+
* @en Customized backfill method <br/> all: return all selected nodes <br/> parent: return only parent node when both parent and child nodes are selected <br/> child: return only child nodes
|
|
83
|
+
* */
|
|
52
84
|
checkedStrategy: {
|
|
53
85
|
type: String,
|
|
54
86
|
default: "all"
|
|
55
87
|
},
|
|
88
|
+
/**
|
|
89
|
+
* @zh 默认选中的树节点
|
|
90
|
+
* @en Tree node selected by default
|
|
91
|
+
* */
|
|
56
92
|
defaultSelectedKeys: { type: Array },
|
|
93
|
+
/**
|
|
94
|
+
* @zh 选中的树节点
|
|
95
|
+
* @en Selected tree node
|
|
96
|
+
* @vModel
|
|
97
|
+
*/
|
|
57
98
|
selectedKeys: { type: Array },
|
|
99
|
+
/**
|
|
100
|
+
* @zh 默认选中复选框的树节点
|
|
101
|
+
* @en Tree node with checkbox selected by default
|
|
102
|
+
* */
|
|
58
103
|
defaultCheckedKeys: { type: Array },
|
|
104
|
+
/**
|
|
105
|
+
* @zh 选中复选框的树节点
|
|
106
|
+
* @en Tree node with check box selected
|
|
107
|
+
* @vModel
|
|
108
|
+
*/
|
|
59
109
|
checkedKeys: { type: Array },
|
|
110
|
+
/**
|
|
111
|
+
* @zh 默认展开的节点
|
|
112
|
+
* @en Nodes expanded by default
|
|
113
|
+
* */
|
|
60
114
|
defaultExpandedKeys: { type: Array },
|
|
115
|
+
/**
|
|
116
|
+
* @zh 展开的节点
|
|
117
|
+
* @en Expanded node
|
|
118
|
+
* @vModel
|
|
119
|
+
*/
|
|
61
120
|
expandedKeys: { type: Array },
|
|
121
|
+
/**
|
|
122
|
+
* @zh 传入`data`,生成对应的树结构
|
|
123
|
+
* @en Pass in `data` to generate the corresponding tree structure
|
|
124
|
+
* */
|
|
62
125
|
data: {
|
|
63
126
|
type: Array,
|
|
64
127
|
default: () => []
|
|
65
128
|
},
|
|
129
|
+
/**
|
|
130
|
+
* @zh 指定节点数据中的字段名
|
|
131
|
+
* @en Specify the field name in the node data
|
|
132
|
+
* */
|
|
66
133
|
fieldNames: { type: Object },
|
|
134
|
+
/**
|
|
135
|
+
* @zh 是否展示连接线
|
|
136
|
+
* @en Whether to display the connection line
|
|
137
|
+
* */
|
|
67
138
|
showLine: { type: Boolean },
|
|
139
|
+
/**
|
|
140
|
+
* @zh 异步加载数据的回调,返回一个 `Promise`
|
|
141
|
+
* @en A callback for loading data asynchronously, returning a `Promise`
|
|
142
|
+
* */
|
|
68
143
|
loadMore: { type: Function },
|
|
144
|
+
/**
|
|
145
|
+
* @zh 是否可以拖拽
|
|
146
|
+
* @en Whether it can be dragged
|
|
147
|
+
* */
|
|
69
148
|
draggable: { type: Boolean },
|
|
149
|
+
/**
|
|
150
|
+
* @zh 拖拽时是否允许在某节点上释放
|
|
151
|
+
* @en Whether to allow release on a node when dragging
|
|
152
|
+
* */
|
|
70
153
|
allowDrop: { type: Function },
|
|
71
154
|
filterTreeNode: { type: Function },
|
|
72
155
|
searchValue: {
|
|
73
156
|
type: String,
|
|
74
157
|
default: ""
|
|
75
158
|
},
|
|
159
|
+
/**
|
|
160
|
+
* @zh 传递虚拟列表属性,传入此参数以开启虚拟滚动,[VirtualListProps](#VirtualListProps)
|
|
161
|
+
* @en Pass virtual list properties, pass in this parameter to turn on virtual scrolling, [VirtualListProps](#VirtualListProps)
|
|
162
|
+
*/
|
|
76
163
|
virtualListProps: { type: Object },
|
|
164
|
+
/**
|
|
165
|
+
* @zh 是否默认展开已选中节点的父节点
|
|
166
|
+
* @en Whether to expand the parent node of the selected node by default
|
|
167
|
+
* @version 2.9.0
|
|
168
|
+
*/
|
|
77
169
|
defaultExpandSelected: { type: Boolean },
|
|
170
|
+
/**
|
|
171
|
+
* @zh 是否默认展开已选中复选框节点的父节点
|
|
172
|
+
* @en Whether to expand the parent node of the checked node by default
|
|
173
|
+
* @version 2.9.0
|
|
174
|
+
*/
|
|
78
175
|
defaultExpandChecked: { type: Boolean },
|
|
176
|
+
/**
|
|
177
|
+
* @zh 是否自动展开已展开节点的父节点
|
|
178
|
+
* @en Whether to automatically expand the parent node of the expanded node
|
|
179
|
+
* @version 2.9.0
|
|
180
|
+
*/
|
|
79
181
|
autoExpandParent: {
|
|
80
182
|
type: Boolean,
|
|
81
183
|
default: true
|
|
82
184
|
},
|
|
185
|
+
/**
|
|
186
|
+
* @zh 半选状态的节点.仅在 checkable 且 checkStrictly 时生效
|
|
187
|
+
* @en The keys of half checked. Only valid when checkable and checkStrictly
|
|
188
|
+
* @version 2.19.0
|
|
189
|
+
* @vModel
|
|
190
|
+
*/
|
|
83
191
|
halfCheckedKeys: { type: Array },
|
|
192
|
+
/**
|
|
193
|
+
* @zh 开启后 checkedKeys 只处理叶子节点,父节点状态由子节点决定(仅在 checkable 且 checkStrictly 为 false 时生效)
|
|
194
|
+
* @en When enabled, checkedKeys is only for checked leaf nodes, and the status of the parent node is determined by the child node.(Only valid when checkable and checkStrictly is false)
|
|
195
|
+
* @version 2.21.0
|
|
196
|
+
*/
|
|
84
197
|
onlyCheckLeaf: {
|
|
85
198
|
type: Boolean,
|
|
86
199
|
default: false
|
|
87
200
|
},
|
|
201
|
+
/**
|
|
202
|
+
* @zh 是否开启展开时的过渡动效
|
|
203
|
+
* @en Whether to enable expand transition animation
|
|
204
|
+
* @version 2.21.0
|
|
205
|
+
*/
|
|
88
206
|
animation: {
|
|
89
207
|
type: Boolean,
|
|
90
208
|
default: true
|
|
91
209
|
},
|
|
210
|
+
/**
|
|
211
|
+
* @zh 点击节点的时候触发的动作
|
|
212
|
+
* @en The action triggered when the node is clicked
|
|
213
|
+
* @version 2.27.0
|
|
214
|
+
*/
|
|
92
215
|
actionOnNodeClick: { type: String },
|
|
93
216
|
disableSelectActionOnly: {
|
|
94
217
|
type: Boolean,
|
|
@@ -96,19 +219,100 @@ var tree_vue_vue_type_script_lang_default = defineComponent({
|
|
|
96
219
|
}
|
|
97
220
|
},
|
|
98
221
|
emits: {
|
|
222
|
+
/**
|
|
223
|
+
* @zh 点击树节点时触发
|
|
224
|
+
* @en Triggered when the tree node is clicked
|
|
225
|
+
* @param {Array<string | number>} selectedKeys
|
|
226
|
+
* @param {{ selected?: boolean; selectedNodes: TreeNodeData[]; node?: TreeNodeData; e?: Event; }} data
|
|
227
|
+
*/
|
|
99
228
|
"select": (_selectedKeys, _data) => true,
|
|
100
229
|
"update:selectedKeys": (_selectedKeys) => true,
|
|
230
|
+
/**
|
|
231
|
+
* @zh 点击树节点复选框时触发。`halfCheckedKeys` 和 `halfCheckedNodes` 从 `2.19.0` 开始支持。
|
|
232
|
+
* @en Triggered when the tree node checkbox is clicked. `halfCheckedKeys` and `halfCheckedNodes` support from `2.19.0`.
|
|
233
|
+
* @param {Array<string | number>} checkedKeys
|
|
234
|
+
* @param {{ checked?: boolean; checkedNodes: TreeNodeData[]; node?: TreeNodeData; e?: Event; halfCheckedKeys: (string | number)[]; halfCheckedNodes: TreeNodeData[]; }} data
|
|
235
|
+
*/
|
|
101
236
|
"check": (_checkedKeys, _data) => true,
|
|
102
237
|
"update:checkedKeys": (_checkedKeys) => true,
|
|
103
238
|
"update:halfCheckedKeys": (_halfCheckedKeys) => true,
|
|
239
|
+
/**
|
|
240
|
+
* @zh 展开/关闭
|
|
241
|
+
* @en Expand/close
|
|
242
|
+
* @param {Array<string | number>} expandKeys
|
|
243
|
+
* @param {{ expanded?: boolean; expandNodes: TreeNodeData[]; node?: TreeNodeData; e?: Event; }} data
|
|
244
|
+
*/
|
|
104
245
|
"expand": (_expandKeys, _data) => true,
|
|
105
246
|
"update:expandedKeys": (_expandKeys) => true,
|
|
247
|
+
/**
|
|
248
|
+
* @zh 节点开始拖拽
|
|
249
|
+
* @en Node starts dragging
|
|
250
|
+
* @param {DragEvent} ev
|
|
251
|
+
* @param {TreeNodeData} node
|
|
252
|
+
*/
|
|
106
253
|
"dragStart": (_ev, _node) => true,
|
|
254
|
+
/**
|
|
255
|
+
* @zh 节点结束拖拽
|
|
256
|
+
* @en Node end drag
|
|
257
|
+
* @param {DragEvent} ev
|
|
258
|
+
* @param {TreeNodeData} node
|
|
259
|
+
*/
|
|
107
260
|
"dragEnd": (_ev, _node) => true,
|
|
261
|
+
/**
|
|
262
|
+
* @zh 节点被拖拽至可释放目标
|
|
263
|
+
* @en The node is dragged to the releasable target
|
|
264
|
+
* @param {DragEvent} ev
|
|
265
|
+
* @param {TreeNodeData} node
|
|
266
|
+
*/
|
|
108
267
|
"dragOver": (_ev, _node) => true,
|
|
268
|
+
/**
|
|
269
|
+
* @zh 节点离开可释放目标
|
|
270
|
+
* @en Node leaves to release the target
|
|
271
|
+
* @param {DragEvent} ev
|
|
272
|
+
* @param {TreeNodeData} node
|
|
273
|
+
*/
|
|
109
274
|
"dragLeave": (_ev, _node) => true,
|
|
275
|
+
/**
|
|
276
|
+
* @zh 节点在可释放目标上释放
|
|
277
|
+
* @en The node is released on a releasable target
|
|
278
|
+
* @param {{ e: DragEvent; dragNode: TreeNodeData; dropNode: TreeNodeData; dropPosition: number; }} data
|
|
279
|
+
*/
|
|
110
280
|
"drop": (_data) => true
|
|
111
281
|
},
|
|
282
|
+
/**
|
|
283
|
+
* @zh 定制节点图标
|
|
284
|
+
* @en Custom node icon
|
|
285
|
+
* @slot icon
|
|
286
|
+
* @binding {TreeNodeData} node
|
|
287
|
+
* @version 2.18.0
|
|
288
|
+
*/
|
|
289
|
+
/**
|
|
290
|
+
* @zh 定制 switcher 图标
|
|
291
|
+
* @en Custom switcher icon
|
|
292
|
+
* @slot switcher-icon
|
|
293
|
+
*/
|
|
294
|
+
/**
|
|
295
|
+
* @zh 定制 loading 图标
|
|
296
|
+
* @en Custom loading icon
|
|
297
|
+
* @slot loading-icon
|
|
298
|
+
*/
|
|
299
|
+
/**
|
|
300
|
+
* @zh 定制 drag 图标
|
|
301
|
+
* @en Custom drag icon
|
|
302
|
+
* @slot drag-icon
|
|
303
|
+
* @binding {TreeNodeData} node
|
|
304
|
+
*/
|
|
305
|
+
/**
|
|
306
|
+
* @zh 渲染额外的节点内容
|
|
307
|
+
* @en Render additional node content
|
|
308
|
+
* @slot extra
|
|
309
|
+
*/
|
|
310
|
+
/**
|
|
311
|
+
* @zh 标题
|
|
312
|
+
* @en Title
|
|
313
|
+
* @slot title
|
|
314
|
+
* @binding {string} title
|
|
315
|
+
*/
|
|
112
316
|
setup(props, { emit, slots }) {
|
|
113
317
|
const { data: propTreeData, showLine, multiple, loadMore, checkStrictly, checkedKeys: propCheckedKeys, defaultCheckedKeys, selectedKeys: propSelectedKeys, defaultSelectedKeys, expandedKeys: propExpandedKeys, defaultExpandedKeys, checkedStrategy, selectable, checkable, blockNode, fieldNames, size, defaultExpandAll, filterTreeNode, draggable, allowDrop, defaultExpandSelected, defaultExpandChecked, autoExpandParent, halfCheckedKeys, onlyCheckLeaf, animation, virtualListProps } = toRefs(props);
|
|
114
318
|
const prefixCls = getPrefixCls("tree");
|
|
@@ -514,23 +718,65 @@ var tree_vue_vue_type_script_lang_default = defineComponent({
|
|
|
514
718
|
const node = key2TreeNode.get(key);
|
|
515
719
|
if (node && isNodeCheckable(node)) onCheck(checked, key, e);
|
|
516
720
|
},
|
|
721
|
+
/**
|
|
722
|
+
* @zh 虚拟列表滚动某个元素
|
|
723
|
+
* @en Virtual list scroll to an element
|
|
724
|
+
* @param {{ index?: number; key?: number | string; align: 'auto' | 'top' | 'bottom'}} options
|
|
725
|
+
* @public
|
|
726
|
+
*/
|
|
517
727
|
scrollIntoView(options) {
|
|
518
728
|
this.virtualListRef && this.virtualListRef.scrollTo(options);
|
|
519
729
|
},
|
|
730
|
+
/**
|
|
731
|
+
* @zh 获取选中的节点
|
|
732
|
+
* @en Get selected nodes
|
|
733
|
+
* @returns {TreeNodeData[]}
|
|
734
|
+
* @public
|
|
735
|
+
* @version 2.19.0
|
|
736
|
+
*/
|
|
520
737
|
getSelectedNodes() {
|
|
521
738
|
return this.getNodes(this.computedSelectedKeys);
|
|
522
739
|
},
|
|
740
|
+
/**
|
|
741
|
+
* @zh 获取选中复选框的节点。支持传入 `checkedStrategy`,没有传则取组件的配置。
|
|
742
|
+
* @en Get checked nodes. Supports passing in `checkedStrategy`, if not passed, the configuration of the component is taken.
|
|
743
|
+
* @param { checkedStrategy?: 'all' | 'parent' | 'child'; includeHalfChecked?: boolean; } options
|
|
744
|
+
* @returns {TreeNodeData[]}
|
|
745
|
+
* @public
|
|
746
|
+
* @version 2.19.0
|
|
747
|
+
*/
|
|
523
748
|
getCheckedNodes(options = {}) {
|
|
524
749
|
const { checkedStrategy, includeHalfChecked } = options;
|
|
525
750
|
const checkedKeys = this.getPublicCheckedKeys(this.computedCheckedKeys, checkedStrategy);
|
|
526
751
|
return [...this.getNodes(checkedKeys), ...includeHalfChecked ? this.getHalfCheckedNodes() : []];
|
|
527
752
|
},
|
|
753
|
+
/**
|
|
754
|
+
* @zh 获取复选框半选的节点
|
|
755
|
+
* @en Get half checked nodes
|
|
756
|
+
* @returns {TreeNodeData[]}
|
|
757
|
+
* @public
|
|
758
|
+
* @version 2.19.0
|
|
759
|
+
*/
|
|
528
760
|
getHalfCheckedNodes() {
|
|
529
761
|
return this.getNodes(this.computedIndeterminateKeys);
|
|
530
762
|
},
|
|
763
|
+
/**
|
|
764
|
+
* @zh 获取展开的节点
|
|
765
|
+
* @en Get expanded nodes
|
|
766
|
+
* @returns {TreeNodeData[]}
|
|
767
|
+
* @public
|
|
768
|
+
* @version 2.19.0
|
|
769
|
+
*/
|
|
531
770
|
getExpandedNodes() {
|
|
532
771
|
return this.getNodes(this.computedExpandedKeys);
|
|
533
772
|
},
|
|
773
|
+
/**
|
|
774
|
+
* @zh 设置全部节点的复选框状态
|
|
775
|
+
* @en Set the checkbox state of all nodes
|
|
776
|
+
* @param { boolean } checked
|
|
777
|
+
* @public
|
|
778
|
+
* @version 2.20.0
|
|
779
|
+
*/
|
|
534
780
|
checkAll(checked = true) {
|
|
535
781
|
const { key2TreeNode } = this.treeContext;
|
|
536
782
|
const newKeys = checked ? [...key2TreeNode.keys()].filter((key) => {
|
|
@@ -539,6 +785,15 @@ var tree_vue_vue_type_script_lang_default = defineComponent({
|
|
|
539
785
|
}) : [];
|
|
540
786
|
this.internalSetCheckedKeys(newKeys);
|
|
541
787
|
},
|
|
788
|
+
/**
|
|
789
|
+
* @zh 设置指定节点的复选框状态
|
|
790
|
+
* @en Sets the checkbox state of the specified node
|
|
791
|
+
* @param { TreeNodeKey | TreeNodeKey[] } key
|
|
792
|
+
* @param { boolean } checked
|
|
793
|
+
* @param { boolean } onlyCheckLeaf
|
|
794
|
+
* @public
|
|
795
|
+
* @version 2.20.0,onlyCheckLeaf from 2.21.0
|
|
796
|
+
*/
|
|
542
797
|
checkNode(key, checked = true, onlyCheckLeaf = false) {
|
|
543
798
|
const { checkStrictly, treeContext } = this;
|
|
544
799
|
const { key2TreeNode } = treeContext;
|
|
@@ -549,6 +804,13 @@ var tree_vue_vue_type_script_lang_default = defineComponent({
|
|
|
549
804
|
});
|
|
550
805
|
this.internalCheckNodes(keys, checked, isBatch ? void 0 : key);
|
|
551
806
|
},
|
|
807
|
+
/**
|
|
808
|
+
* @zh 设置全部节点的选中状态
|
|
809
|
+
* @en Set the selected state of all nodes
|
|
810
|
+
* @param { boolean } selected
|
|
811
|
+
* @public
|
|
812
|
+
* @version 2.20.0
|
|
813
|
+
*/
|
|
552
814
|
selectAll(selected = true) {
|
|
553
815
|
const { key2TreeNode } = this.treeContext;
|
|
554
816
|
const newKeys = selected ? [...key2TreeNode.keys()].filter((key) => {
|
|
@@ -557,6 +819,14 @@ var tree_vue_vue_type_script_lang_default = defineComponent({
|
|
|
557
819
|
}) : [];
|
|
558
820
|
this.internalSetSelectedKeys(newKeys);
|
|
559
821
|
},
|
|
822
|
+
/**
|
|
823
|
+
* @zh 设置指定节点的选中状态
|
|
824
|
+
* @en Sets the selected state of the specified node
|
|
825
|
+
* @param { TreeNodeKey | TreeNodeKey[] } key
|
|
826
|
+
* @param { boolean } selected
|
|
827
|
+
* @public
|
|
828
|
+
* @version 2.20.0
|
|
829
|
+
*/
|
|
560
830
|
selectNode(key, selected = true) {
|
|
561
831
|
const { key2TreeNode } = this.treeContext;
|
|
562
832
|
const isBatch = isArray(key);
|
|
@@ -566,6 +836,13 @@ var tree_vue_vue_type_script_lang_default = defineComponent({
|
|
|
566
836
|
});
|
|
567
837
|
this.internalSelectNodes(keys, selected, isBatch ? void 0 : key);
|
|
568
838
|
},
|
|
839
|
+
/**
|
|
840
|
+
* @zh 设置全部节点的展开状态
|
|
841
|
+
* @en Set the expanded state of all nodes
|
|
842
|
+
* @param { boolean } expanded
|
|
843
|
+
* @public
|
|
844
|
+
* @version 2.20.0
|
|
845
|
+
*/
|
|
569
846
|
expandAll(expanded = true) {
|
|
570
847
|
const { key2TreeNode } = this.treeContext;
|
|
571
848
|
const newKeys = expanded ? [...key2TreeNode.keys()].filter((key) => {
|
|
@@ -574,6 +851,14 @@ var tree_vue_vue_type_script_lang_default = defineComponent({
|
|
|
574
851
|
}) : [];
|
|
575
852
|
this.internalSetExpandedKeys(newKeys);
|
|
576
853
|
},
|
|
854
|
+
/**
|
|
855
|
+
* @zh 设置指定节点的展开状态
|
|
856
|
+
* @en Sets the expanded state of the specified node
|
|
857
|
+
* @param { TreeNodeKey | TreeNodeKey[] } key
|
|
858
|
+
* @param { boolean } expanded
|
|
859
|
+
* @public
|
|
860
|
+
* @version 2.20.0
|
|
861
|
+
*/
|
|
577
862
|
expandNode(key, expanded = true) {
|
|
578
863
|
const { key2TreeNode } = this.treeContext;
|
|
579
864
|
const isBatch = isArray(key);
|
|
@@ -1,4 +1,4 @@
|
|
|
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 { isFunction, isUndefined } from "../../_utils/is.js";
|
|
3
3
|
import { omit } from "../../_utils/omit.js";
|
|
4
4
|
//#region components/tree/utils/tree-data.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
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 { isArray, isFunction, isObject } from "../../_utils/is.js";
|
|
3
3
|
import { computed, ref, toRefs, watch, watchEffect } from "vue";
|
|
4
4
|
//#region components/tree-select/hooks/use-selected-state.ts
|
package/es/tree-select/panel.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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 { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { useScrollbar } from "../_hooks/use-scrollbar.js";
|
|
4
4
|
import Scrollbar from "../scrollbar/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
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 _plugin_vue_export_helper_default from "../_virtual/_plugin-vue_export-helper.js";
|
|
3
3
|
import tree_select_vue_vue_type_script_lang_default from "./tree-select.vue_vue_type_script_lang.js";
|
|
4
4
|
import { createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createVNode, guardReactiveProps, mergeProps, normalizeClass, normalizeProps, normalizeStyle, openBlock, renderSlot, resolveComponent, resolveDynamicComponent, withCtx } from "vue";
|