bkui-vue 2.0.1-beta.3 → 2.0.1-beta.30
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/index.cjs.js +166 -166
- package/dist/index.esm.js +31939 -31805
- package/dist/index.umd.js +166 -166
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/affix/affix.css +130 -0
- package/lib/affix/affix.variable.css +262 -1
- package/lib/affix/index.js +7 -7
- package/lib/alert/alert.css +133 -3
- package/lib/alert/alert.d.ts +5 -12
- package/lib/alert/alert.variable.css +262 -1
- package/lib/alert/index.d.ts +11 -26
- package/lib/alert/index.js +0 -1
- package/lib/backtop/backtop.css +133 -3
- package/lib/backtop/backtop.d.ts +1 -1
- package/lib/backtop/backtop.variable.css +395 -4
- package/lib/backtop/index.d.ts +3 -3
- package/lib/backtop/index.js +6 -6
- package/lib/badge/badge.css +156 -26
- package/lib/badge/badge.variable.css +262 -1
- package/lib/badge/index.js +1 -1
- package/lib/breadcrumb/breadcrumb.css +135 -5
- package/lib/breadcrumb/breadcrumb.variable.css +397 -6
- package/lib/button/button.css +273 -143
- package/lib/button/button.d.ts +7 -7
- package/lib/button/button.variable.css +262 -1
- package/lib/button/index.d.ts +8 -8
- package/lib/button/index.js +6 -7
- package/lib/card/card.css +134 -4
- package/lib/card/card.variable.css +396 -5
- package/lib/cascader/cascader-panel.d.ts +1 -1
- package/lib/cascader/cascader.css +156 -26
- package/lib/cascader/cascader.d.ts +1 -1
- package/lib/cascader/cascader.less +4 -4
- package/lib/cascader/cascader.variable.css +418 -27
- package/lib/cascader/index.js +36 -36
- package/lib/cascader/interface.d.ts +1 -1
- package/lib/checkbox/checkbox-group.d.ts +0 -16
- package/lib/checkbox/checkbox.css +139 -9
- package/lib/checkbox/checkbox.d.ts +7 -7
- package/lib/checkbox/checkbox.variable.css +262 -1
- package/lib/checkbox/index.d.ts +11 -22
- package/lib/checkbox/index.js +12 -5
- package/lib/checkbox/type.d.ts +1 -1
- package/lib/code-diff/code-diff.css +130 -0
- package/lib/code-diff/code-diff.variable.css +262 -1
- package/lib/code-diff/index.js +8 -8
- package/lib/collapse/collapse.css +131 -1
- package/lib/collapse/collapse.variable.css +262 -1
- package/lib/collapse/index.js +2 -2
- package/lib/collapse/utils.d.ts +2 -2
- package/lib/collapse-transition/collapse-transition.css +130 -0
- package/lib/collapse-transition/collapse-transition.variable.css +262 -1
- package/lib/color-picker/color-picker.css +133 -3
- package/lib/color-picker/color-picker.less +3 -3
- package/lib/color-picker/color-picker.variable.css +265 -4
- package/lib/color-picker/index.js +45 -45
- package/lib/components.d.ts +32 -32
- package/lib/components.js +31 -31
- package/lib/config-provider/config-provider.css +130 -0
- package/lib/config-provider/config-provider.variable.css +262 -1
- package/lib/config-provider/index.d.ts +1 -1
- package/lib/container/container.css +130 -0
- package/lib/container/container.variable.css +392 -1
- package/lib/container/index.js +6 -7
- package/lib/date-picker/base/date-table.d.ts +1 -1
- package/lib/date-picker/base/month-table.d.ts +1 -1
- package/lib/date-picker/base/picker-dropdown.d.ts +1 -1
- package/lib/date-picker/base/year-table.d.ts +3 -3
- package/lib/date-picker/date-picker.css +147 -17
- package/lib/date-picker/date-picker.d.ts +0 -10
- package/lib/date-picker/date-picker.variable.css +262 -1
- package/lib/date-picker/index.d.ts +0 -22
- package/lib/date-picker/index.js +320 -223
- package/lib/date-picker/interface.d.ts +9 -9
- package/lib/date-picker/panel/date-range.d.ts +6 -68
- package/lib/date-picker/panel/date.d.ts +1 -1
- package/lib/date-picker/panel/time-range.d.ts +1 -10
- package/lib/date-picker/panel/time.d.ts +1 -10
- package/lib/date-picker/props.d.ts +1 -5
- package/lib/date-picker/time-picker.d.ts +0 -9
- package/lib/date-picker/utils.d.ts +5 -1
- package/lib/dialog/dialog.css +138 -12
- package/lib/dialog/dialog.d.ts +36 -20
- package/lib/dialog/dialog.variable.css +400 -13
- package/lib/dialog/index.d.ts +78 -44
- package/lib/dialog/index.js +22 -22
- package/lib/dialog/props.d.ts +15 -8
- package/lib/directives/index.d.ts +3 -3
- package/lib/directives/index.js +166 -166
- package/lib/directives/tooltips.d.ts +1 -1
- package/lib/dist.index.js +2 -4
- package/lib/divider/divider.css +133 -3
- package/lib/divider/divider.d.ts +5 -5
- package/lib/divider/divider.variable.css +262 -1
- package/lib/divider/index.d.ts +11 -11
- package/lib/divider/index.js +2 -2
- package/lib/divider/props.d.ts +2 -2
- package/lib/dropdown/dropdown-item.d.ts +1 -1
- package/lib/dropdown/dropdown-menu.d.ts +1 -1
- package/lib/dropdown/dropdown.css +130 -0
- package/lib/dropdown/dropdown.d.ts +5 -5
- package/lib/dropdown/dropdown.variable.css +392 -1
- package/lib/dropdown/index.d.ts +13 -13
- package/lib/dropdown/index.js +7 -7
- package/lib/exception/exception.css +130 -0
- package/lib/exception/exception.d.ts +9 -9
- package/lib/exception/exception.variable.css +262 -1
- package/lib/exception/index.d.ts +11 -11
- package/lib/exception/index.js +10 -10
- package/lib/exception/typings/index.d.ts +1 -1
- package/lib/fixed-navbar/fixed-navbar.css +134 -4
- package/lib/fixed-navbar/fixed-navbar.variable.css +262 -1
- package/lib/fixed-navbar/index.js +2 -2
- package/lib/form/form-item.d.ts +0 -16
- package/lib/form/form.css +130 -0
- package/lib/form/form.d.ts +2 -2
- package/lib/form/form.variable.css +262 -1
- package/lib/form/index.d.ts +0 -11
- package/lib/form/index.js +14 -16
- package/lib/form/type.d.ts +2 -2
- package/lib/icon/index.d.ts +11 -11
- package/lib/icon/index.js +11 -11
- package/lib/image/image-viewer.css +130 -0
- package/lib/image/image-viewer.d.ts +1 -1
- package/lib/image/image-viewer.variable.css +262 -1
- package/lib/image/image.css +130 -0
- package/lib/image/image.variable.css +392 -1
- package/lib/image/index.js +20 -21
- package/lib/index.d.ts +9 -3
- package/lib/index.js +5 -29
- package/lib/info-box/index.js +13 -13
- package/lib/info-box/info-box.css +134 -4
- package/lib/info-box/info-box.d.ts +15 -15
- package/lib/info-box/info-box.variable.css +262 -1
- package/lib/input/index.d.ts +15 -15
- package/lib/input/index.js +16 -17
- package/lib/input/input.css +202 -72
- package/lib/input/input.d.ts +15 -15
- package/lib/input/input.variable.css +464 -73
- package/lib/link/index.d.ts +11 -11
- package/lib/link/index.js +3 -3
- package/lib/link/link.css +146 -16
- package/lib/link/link.d.ts +5 -5
- package/lib/link/link.variable.css +262 -1
- package/lib/loading/index.d.ts +4 -4
- package/lib/loading/index.js +6 -6
- package/lib/loading/loading.css +146 -16
- package/lib/loading/loading.d.ts +6 -6
- package/lib/loading/loading.variable.css +408 -17
- package/lib/locale/index.d.ts +1 -1
- package/lib/menu/index.js +0 -1
- package/lib/menu/menu.css +148 -18
- package/lib/menu/menu.variable.css +410 -19
- package/lib/menu/submenu.css +130 -0
- package/lib/menu/submenu.variable.css +262 -1
- package/lib/menu/utils.d.ts +3 -3
- package/lib/message/index.js +18 -18
- package/lib/message/message.css +151 -21
- package/lib/message/message.variable.css +262 -1
- package/lib/message/messageConstructor.d.ts +11 -11
- package/lib/modal/index.d.ts +49 -8
- package/lib/modal/index.js +46 -25
- package/lib/modal/modal.css +134 -8
- package/lib/modal/modal.d.ts +19 -3
- package/lib/modal/modal.less +0 -5
- package/lib/modal/modal.variable.css +396 -9
- package/lib/modal/props.mixin.d.ts +8 -1
- package/lib/navigation/index.js +20 -20
- package/lib/navigation/navigation.css +132 -2
- package/lib/navigation/navigation.d.ts +1 -1
- package/lib/navigation/navigation.variable.css +262 -1
- package/lib/notify/index.js +4 -4
- package/lib/notify/notify.css +137 -7
- package/lib/notify/notify.variable.css +262 -1
- package/lib/overflow-title/components/overflow-title.d.ts +9 -9
- package/lib/overflow-title/index.d.ts +19 -19
- package/lib/overflow-title/index.js +61 -11
- package/lib/overflow-title/props.d.ts +18 -18
- package/lib/pagination/index.d.ts +0 -19
- package/lib/pagination/index.js +44 -23
- package/lib/pagination/pagination.css +139 -9
- package/lib/pagination/pagination.d.ts +0 -13
- package/lib/pagination/pagination.less +14 -13
- package/lib/pagination/pagination.variable.css +270 -9
- package/lib/pagination/type.d.ts +1 -1
- package/lib/pagination/use-limit.d.ts +1 -1
- package/lib/pagination/use-total.d.ts +1 -1
- package/lib/plugin-popover/index.js +18 -20
- package/lib/pop-confirm/index.d.ts +11 -43
- package/lib/pop-confirm/index.js +27 -28
- package/lib/pop-confirm/pop-confirm.css +133 -1
- package/lib/pop-confirm/pop-confirm.d.ts +5 -19
- package/lib/pop-confirm/pop-confirm.less +3 -1
- package/lib/pop-confirm/pop-confirm.variable.css +265 -2
- package/lib/pop-confirm/props.d.ts +5 -11
- package/lib/popover/const.d.ts +3 -3
- package/lib/popover/index.d.ts +19 -19
- package/lib/popover/index.js +18 -20
- package/lib/popover/plugin-popover.d.ts +1 -1
- package/lib/popover/popover.css +130 -0
- package/lib/popover/popover.d.ts +7 -7
- package/lib/popover/popover.variable.css +262 -1
- package/lib/popover/props.d.ts +4 -4
- package/lib/preset.d.ts +0 -1
- package/lib/preset.js +0 -1
- package/lib/process/index.js +3 -3
- package/lib/process/process.css +143 -13
- package/lib/process/process.variable.css +262 -1
- package/lib/progress/index.d.ts +11 -11
- package/lib/progress/index.js +10 -11
- package/lib/progress/progress.css +134 -4
- package/lib/progress/progress.d.ts +7 -7
- package/lib/progress/progress.variable.css +396 -5
- package/lib/radio/index.d.ts +21 -21
- package/lib/radio/index.js +28 -17
- package/lib/radio/radio-button.d.ts +7 -7
- package/lib/radio/radio-group.d.ts +7 -7
- package/lib/radio/radio.css +172 -42
- package/lib/radio/radio.d.ts +7 -7
- package/lib/radio/radio.variable.css +262 -1
- package/lib/radio/type.d.ts +1 -1
- package/lib/rate/index.js +8 -8
- package/lib/rate/rate.css +157 -0
- package/lib/rate/rate.less +33 -0
- package/lib/rate/rate.variable.css +289 -1
- package/lib/resize-layout/index.d.ts +11 -11
- package/lib/resize-layout/index.js +7 -8
- package/lib/resize-layout/resize-layout.css +130 -0
- package/lib/resize-layout/resize-layout.d.ts +5 -5
- package/lib/resize-layout/resize-layout.variable.css +262 -1
- package/lib/scrollbar/index.js +63 -11
- package/lib/scrollbar/scrollbar-core/index.d.ts +21 -20
- package/lib/scrollbar/scrollbar.css +157 -8
- package/lib/scrollbar/scrollbar.less +35 -10
- package/lib/scrollbar/scrollbar.variable.css +289 -9
- package/lib/search-select/index.js +66 -66
- package/lib/search-select/menu.d.ts +1 -1
- package/lib/search-select/search-select.css +163 -33
- package/lib/search-select/search-select.variable.css +425 -34
- package/lib/search-select/selected.d.ts +1 -1
- package/lib/search-select/utils.d.ts +3 -3
- package/lib/select/common.d.ts +4 -4
- package/lib/select/index.d.ts +94 -70
- package/lib/select/index.js +176 -150
- package/lib/select/option.d.ts +1 -1
- package/lib/select/select.css +172 -43
- package/lib/select/select.d.ts +37 -27
- package/lib/select/select.less +3 -4
- package/lib/select/select.variable.css +434 -44
- package/lib/select/selectTagInput.d.ts +6 -6
- package/lib/select/type.d.ts +2 -2
- package/lib/shared/frame-throttle.d.ts +15 -0
- package/lib/shared/index.d.ts +2 -1
- package/lib/shared/index.js +110 -47
- package/lib/shared/popover.d.ts +3 -3
- package/lib/shared/token.d.ts +1 -1
- package/lib/shared/vue-types.d.ts +46 -46
- package/lib/shared/z-index-manager.d.ts +6 -6
- package/lib/sideslider/index.d.ts +41 -7
- package/lib/sideslider/index.js +12 -11
- package/lib/sideslider/sideslider.css +138 -9
- package/lib/sideslider/sideslider.d.ts +19 -3
- package/lib/sideslider/sideslider.less +7 -8
- package/lib/sideslider/sideslider.variable.css +269 -9
- package/lib/slider/index.js +21 -23
- package/lib/slider/slider.css +135 -5
- package/lib/slider/slider.variable.css +262 -1
- package/lib/steps/index.d.ts +14 -29
- package/lib/steps/index.js +3 -4
- package/lib/steps/steps.css +168 -38
- package/lib/steps/steps.d.ts +8 -18
- package/lib/steps/steps.variable.css +262 -1
- package/lib/styles/index.d.ts +0 -1
- package/lib/styles/mixins/animate.css +130 -0
- package/lib/styles/mixins/animate.variable.css +262 -1
- package/lib/styles/mixins/mixins.css +130 -0
- package/lib/styles/mixins/mixins.variable.css +130 -0
- package/lib/styles/mixins/popper.css +130 -0
- package/lib/styles/mixins/popper.variable.css +262 -1
- package/lib/styles/mixins/scroll.css +130 -0
- package/lib/styles/mixins/scroll.variable.css +262 -1
- package/lib/styles/reset.css +130 -0
- package/lib/styles/reset.variable.css +262 -1
- package/lib/{rate/star.variable.css → styles/themes/themes.css} +2 -28
- package/lib/styles/themes/themes.less +299 -129
- package/lib/styles/themes/themes.variable.css +130 -0
- package/lib/swiper/index.js +5 -5
- package/lib/swiper/swiper.css +130 -0
- package/lib/swiper/swiper.variable.css +262 -1
- package/lib/switcher/index.js +2 -2
- package/lib/switcher/switcher.css +147 -17
- package/lib/switcher/switcher.d.ts +2 -2
- package/lib/switcher/switcher.variable.css +409 -18
- package/lib/tab/index.d.ts +22 -22
- package/lib/tab/index.js +15 -15
- package/lib/tab/props.d.ts +15 -15
- package/lib/tab/tab-nav.d.ts +10 -10
- package/lib/tab/tab.css +147 -17
- package/lib/tab/tab.d.ts +10 -10
- package/lib/tab/tab.variable.css +262 -1
- package/lib/table/components/ghost-body.d.ts +2 -0
- package/lib/table/components/table-column.d.ts +25 -126
- package/lib/table/const.d.ts +22 -10
- package/lib/table/events.d.ts +16 -112
- package/lib/table/hooks/use-cell.d.ts +20 -0
- package/lib/table/hooks/use-column-resize.d.ts +7 -0
- package/lib/table/hooks/use-column-template.d.ts +5 -0
- package/lib/table/hooks/use-columns.d.ts +66 -0
- package/lib/table/{plugins → hooks}/use-draggable.d.ts +2 -2
- package/lib/table/hooks/use-fixed-column.d.ts +10 -0
- package/lib/table/hooks/use-head.d.ts +16 -0
- package/lib/table/hooks/use-layout.d.ts +23 -0
- package/lib/table/hooks/use-pagination.d.ts +16 -0
- package/lib/table/hooks/use-render.d.ts +23 -0
- package/lib/table/hooks/use-rows.d.ts +27 -0
- package/lib/table/hooks/use-settings.d.ts +24 -0
- package/lib/table/hooks/use-shift-key.d.ts +15 -0
- package/lib/table/index.d.ts +72 -634
- package/lib/table/index.js +3477 -3410
- package/lib/table/plugins/head-filter.css +130 -0
- package/lib/table/plugins/head-filter.d.ts +2 -1
- package/lib/table/plugins/head-filter.variable.css +262 -1
- package/lib/table/plugins/head-sort.css +130 -0
- package/lib/table/plugins/head-sort.variable.css +262 -1
- package/lib/table/plugins/settings.css +131 -0
- package/lib/table/plugins/settings.less +1 -0
- package/lib/table/plugins/settings.variable.css +263 -1
- package/lib/table/props.d.ts +93 -62
- package/lib/table/table.css +433 -260
- package/lib/table/table.d.ts +31 -185
- package/lib/table/table.less +120 -99
- package/lib/table/table.variable.css +695 -261
- package/lib/table/utils.d.ts +36 -10
- package/lib/table-column/index.d.ts +36 -289
- package/lib/table-column/index.js +17335 -45
- package/lib/tag/index.d.ts +11 -11
- package/lib/tag/index.js +2 -2
- package/lib/tag/tag.css +135 -5
- package/lib/tag/tag.d.ts +5 -5
- package/lib/tag/tag.variable.css +262 -1
- package/lib/tag-input/common.d.ts +1 -1
- package/lib/tag-input/index.d.ts +8 -8
- package/lib/tag-input/index.js +30 -30
- package/lib/tag-input/tag-input.css +148 -18
- package/lib/tag-input/tag-input.d.ts +4 -4
- package/lib/tag-input/tag-input.variable.css +262 -1
- package/lib/tag-input/tag-props.d.ts +2 -2
- package/lib/time-picker/index.d.ts +0 -19
- package/lib/time-picker/time-picker.css +130 -0
- package/lib/time-picker/time-picker.variable.css +262 -1
- package/lib/timeline/index.js +2 -2
- package/lib/timeline/timeline.css +149 -19
- package/lib/timeline/timeline.variable.css +262 -1
- package/lib/transfer/const.d.ts +2 -2
- package/lib/transfer/index.js +19 -19
- package/lib/transfer/transfer.css +158 -28
- package/lib/transfer/transfer.less +3 -3
- package/lib/transfer/transfer.variable.css +271 -10
- package/lib/tree/constant.d.ts +20 -20
- package/lib/tree/index.d.ts +32 -24
- package/lib/tree/index.js +66 -52
- package/lib/tree/props.d.ts +18 -11
- package/lib/tree/tree.css +166 -17
- package/lib/tree/tree.d.ts +14 -16
- package/lib/tree/tree.less +1 -1
- package/lib/tree/tree.variable.css +428 -18
- package/lib/tree/use-empty.d.ts +1 -1
- package/lib/tree/use-node-action.d.ts +8 -8
- package/lib/tree/use-node-attribute.d.ts +42 -34
- package/lib/tree/use-search.d.ts +1 -1
- package/lib/tree/util.d.ts +1 -1
- package/lib/upload/index.js +41 -35
- package/lib/upload/props.d.ts +1 -1
- package/lib/upload/upload.css +157 -27
- package/lib/upload/upload.type.d.ts +7 -7
- package/lib/upload/upload.variable.css +419 -28
- package/lib/upload/use-file-handler.d.ts +1 -1
- package/lib/virtual-render/index.d.ts +12 -23
- package/lib/virtual-render/index.js +17290 -24
- package/lib/virtual-render/props.d.ts +2 -3
- package/lib/virtual-render/use-fix-top.d.ts +1 -1
- package/lib/virtual-render/v-virtual-render.d.ts +1 -1
- package/lib/virtual-render/virtual-render.css +157 -8
- package/lib/virtual-render/virtual-render.d.ts +6 -11
- package/lib/virtual-render/virtual-render.variable.css +419 -9
- package/package.json +17 -55
- package/lib/rate/star.css +0 -27
- package/lib/rate/star.less +0 -34
- package/lib/table/plugins/col-group.d.ts +0 -38
- package/lib/table/plugins/settings.d.ts +0 -16
- package/lib/table/plugins/use-active-columns.d.ts +0 -16
- package/lib/table/plugins/use-column-resize.d.ts +0 -35
- package/lib/table/plugins/use-column-template.d.ts +0 -7
- package/lib/table/plugins/use-fixed-column.d.ts +0 -27
- package/lib/table/plugins/use-head-cell.d.ts +0 -7
- package/lib/table/plugins/use-pagination.d.ts +0 -23
- package/lib/table/plugins/use-shift-key.d.ts +0 -11
- package/lib/table/use-attributes.d.ts +0 -62
- package/lib/table/use-column.d.ts +0 -275
- package/lib/table/use-common.d.ts +0 -1679
- package/lib/table/use-render.d.ts +0 -11
- /package/lib/table/{plugins → components}/body-empty.d.ts +0 -0
- /package/lib/table/{plugins → hooks}/use-observer-resize.d.ts +0 -0
- /package/lib/table/{plugins → hooks}/use-scroll-loading.d.ts +0 -0
package/lib/tree/index.d.ts
CHANGED
@@ -39,8 +39,10 @@ declare const BkTree: {
|
|
39
39
|
default: any;
|
40
40
|
};
|
41
41
|
async: import("vue-types").VueTypeShape<{
|
42
|
-
callback: (item: any, cb: any) => Promise<
|
43
|
-
|
42
|
+
callback: (item: any, cb: any) => Promise<string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
43
|
+
[key: string]: any;
|
44
|
+
}>>;
|
45
|
+
cache: boolean;
|
44
46
|
deepAutoOpen?: string;
|
45
47
|
}>;
|
46
48
|
offsetLeft: import("vue-types").VueTypeValidableDef<number> & {
|
@@ -124,15 +126,15 @@ declare const BkTree: {
|
|
124
126
|
default: boolean | (() => import("./props").IIntersectionObserver);
|
125
127
|
};
|
126
128
|
}>> & {
|
129
|
+
onNodeChecked?: (...args: any[]) => any;
|
127
130
|
onNodeClick?: (...args: any[]) => any;
|
128
131
|
onNodeCollapse?: (...args: any[]) => any;
|
129
|
-
onNodeExpand?: (...args: any[]) => any;
|
130
|
-
onNodeChecked?: (...args: any[]) => any;
|
131
|
-
onNodeDragStart?: (...args: any[]) => any;
|
132
|
-
onNodeDragOver?: (...args: any[]) => any;
|
133
132
|
onNodeDragLeave?: (...args: any[]) => any;
|
133
|
+
onNodeDragOver?: (...args: any[]) => any;
|
134
|
+
onNodeDragStart?: (...args: any[]) => any;
|
134
135
|
onNodeDrop?: (...args: any[]) => any;
|
135
136
|
onNodeEnterView?: (...args: any[]) => any;
|
137
|
+
onNodeExpand?: (...args: any[]) => any;
|
136
138
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
137
139
|
nodeClick: (..._args: any[]) => boolean;
|
138
140
|
nodeCollapse: (..._args: any[]) => boolean;
|
@@ -183,8 +185,10 @@ declare const BkTree: {
|
|
183
185
|
default: any;
|
184
186
|
};
|
185
187
|
async: import("vue-types").VueTypeShape<{
|
186
|
-
callback: (item: any, cb: any) => Promise<
|
187
|
-
|
188
|
+
callback: (item: any, cb: any) => Promise<string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
189
|
+
[key: string]: any;
|
190
|
+
}>>;
|
191
|
+
cache: boolean;
|
188
192
|
deepAutoOpen?: string;
|
189
193
|
}>;
|
190
194
|
offsetLeft: import("vue-types").VueTypeValidableDef<number> & {
|
@@ -268,15 +272,15 @@ declare const BkTree: {
|
|
268
272
|
default: boolean | (() => import("./props").IIntersectionObserver);
|
269
273
|
};
|
270
274
|
}>> & {
|
275
|
+
onNodeChecked?: (...args: any[]) => any;
|
271
276
|
onNodeClick?: (...args: any[]) => any;
|
272
277
|
onNodeCollapse?: (...args: any[]) => any;
|
273
|
-
onNodeExpand?: (...args: any[]) => any;
|
274
|
-
onNodeChecked?: (...args: any[]) => any;
|
275
|
-
onNodeDragStart?: (...args: any[]) => any;
|
276
|
-
onNodeDragOver?: (...args: any[]) => any;
|
277
278
|
onNodeDragLeave?: (...args: any[]) => any;
|
279
|
+
onNodeDragOver?: (...args: any[]) => any;
|
280
|
+
onNodeDragStart?: (...args: any[]) => any;
|
278
281
|
onNodeDrop?: (...args: any[]) => any;
|
279
282
|
onNodeEnterView?: (...args: any[]) => any;
|
283
|
+
onNodeExpand?: (...args: any[]) => any;
|
280
284
|
}, {
|
281
285
|
data: any[];
|
282
286
|
height: number;
|
@@ -353,8 +357,10 @@ declare const BkTree: {
|
|
353
357
|
default: any;
|
354
358
|
};
|
355
359
|
async: import("vue-types").VueTypeShape<{
|
356
|
-
callback: (item: any, cb: any) => Promise<
|
357
|
-
|
360
|
+
callback: (item: any, cb: any) => Promise<string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
361
|
+
[key: string]: any;
|
362
|
+
}>>;
|
363
|
+
cache: boolean;
|
358
364
|
deepAutoOpen?: string;
|
359
365
|
}>;
|
360
366
|
offsetLeft: import("vue-types").VueTypeValidableDef<number> & {
|
@@ -438,15 +444,15 @@ declare const BkTree: {
|
|
438
444
|
default: boolean | (() => import("./props").IIntersectionObserver);
|
439
445
|
};
|
440
446
|
}>> & {
|
447
|
+
onNodeChecked?: (...args: any[]) => any;
|
441
448
|
onNodeClick?: (...args: any[]) => any;
|
442
449
|
onNodeCollapse?: (...args: any[]) => any;
|
443
|
-
onNodeExpand?: (...args: any[]) => any;
|
444
|
-
onNodeChecked?: (...args: any[]) => any;
|
445
|
-
onNodeDragStart?: (...args: any[]) => any;
|
446
|
-
onNodeDragOver?: (...args: any[]) => any;
|
447
450
|
onNodeDragLeave?: (...args: any[]) => any;
|
451
|
+
onNodeDragOver?: (...args: any[]) => any;
|
452
|
+
onNodeDragStart?: (...args: any[]) => any;
|
448
453
|
onNodeDrop?: (...args: any[]) => any;
|
449
454
|
onNodeEnterView?: (...args: any[]) => any;
|
455
|
+
onNodeExpand?: (...args: any[]) => any;
|
450
456
|
}, () => JSX.Element, {}, {}, {}, {
|
451
457
|
data: any[];
|
452
458
|
height: number;
|
@@ -520,8 +526,10 @@ declare const BkTree: {
|
|
520
526
|
default: any;
|
521
527
|
};
|
522
528
|
async: import("vue-types").VueTypeShape<{
|
523
|
-
callback: (item: any, cb: any) => Promise<
|
524
|
-
|
529
|
+
callback: (item: any, cb: any) => Promise<string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
530
|
+
[key: string]: any;
|
531
|
+
}>>;
|
532
|
+
cache: boolean;
|
525
533
|
deepAutoOpen?: string;
|
526
534
|
}>;
|
527
535
|
offsetLeft: import("vue-types").VueTypeValidableDef<number> & {
|
@@ -605,15 +613,15 @@ declare const BkTree: {
|
|
605
613
|
default: boolean | (() => import("./props").IIntersectionObserver);
|
606
614
|
};
|
607
615
|
}>> & {
|
616
|
+
onNodeChecked?: (...args: any[]) => any;
|
608
617
|
onNodeClick?: (...args: any[]) => any;
|
609
618
|
onNodeCollapse?: (...args: any[]) => any;
|
610
|
-
onNodeExpand?: (...args: any[]) => any;
|
611
|
-
onNodeChecked?: (...args: any[]) => any;
|
612
|
-
onNodeDragStart?: (...args: any[]) => any;
|
613
|
-
onNodeDragOver?: (...args: any[]) => any;
|
614
619
|
onNodeDragLeave?: (...args: any[]) => any;
|
620
|
+
onNodeDragOver?: (...args: any[]) => any;
|
621
|
+
onNodeDragStart?: (...args: any[]) => any;
|
615
622
|
onNodeDrop?: (...args: any[]) => any;
|
616
623
|
onNodeEnterView?: (...args: any[]) => any;
|
624
|
+
onNodeExpand?: (...args: any[]) => any;
|
617
625
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
618
626
|
nodeClick: (..._args: any[]) => boolean;
|
619
627
|
nodeCollapse: (..._args: any[]) => boolean;
|
package/lib/tree/index.js
CHANGED
@@ -17303,7 +17303,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
17303
17303
|
;// CONCATENATED MODULE: external "../shared"
|
17304
17304
|
var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
17305
17305
|
var y = x => () => x
|
17306
|
-
const shared_namespaceObject = x({ ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.PropTypes, ["debounce"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.debounce, ["
|
17306
|
+
const shared_namespaceObject = x({ ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.PropTypes, ["debounce"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.debounce, ["withInstall"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.withInstall });
|
17307
17307
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
|
17308
17308
|
function _arrayWithHoles(arr) {
|
17309
17309
|
if (Array.isArray(arr)) return arr;
|
@@ -17367,7 +17367,7 @@ function _slicedToArray(arr, i) {
|
|
17367
17367
|
;// CONCATENATED MODULE: external "vue"
|
17368
17368
|
var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
17369
17369
|
var external_vue_y = x => () => x
|
17370
|
-
const external_vue_namespaceObject = external_vue_x({ ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["h"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.h, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["onUnmounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onUnmounted, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["toRef"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRef, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch });
|
17370
|
+
const external_vue_namespaceObject = external_vue_x({ ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["h"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.h, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isVNode, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["onUnmounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onUnmounted, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["toRef"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRef, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch });
|
17371
17371
|
;// CONCATENATED MODULE: external "../config-provider"
|
17372
17372
|
var config_provider_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
17373
17373
|
var config_provider_y = x => () => x
|
@@ -17454,15 +17454,15 @@ function _defineProperty(obj, key, value) {
|
|
17454
17454
|
*/
|
17455
17455
|
var EVENTS;
|
17456
17456
|
(function (EVENTS) {
|
17457
|
+
EVENTS["NODE_CHECKED"] = "nodeChecked";
|
17457
17458
|
EVENTS["NODE_CLICK"] = "nodeClick";
|
17458
17459
|
EVENTS["NODE_COLLAPSE"] = "nodeCollapse";
|
17459
|
-
EVENTS["NODE_EXPAND"] = "nodeExpand";
|
17460
|
-
EVENTS["NODE_CHECKED"] = "nodeChecked";
|
17461
|
-
EVENTS["NODE_DRAG_START"] = "nodeDragStart";
|
17462
|
-
EVENTS["NODE_DRAG_OVER"] = "nodeDragOver";
|
17463
17460
|
EVENTS["NODE_DRAG_LEAVE"] = "nodeDragLeave";
|
17461
|
+
EVENTS["NODE_DRAG_OVER"] = "nodeDragOver";
|
17462
|
+
EVENTS["NODE_DRAG_START"] = "nodeDragStart";
|
17464
17463
|
EVENTS["NODE_DROP"] = "nodeDrop";
|
17465
17464
|
EVENTS["NODE_ENTER_VIEW"] = "nodeEnterView";
|
17465
|
+
EVENTS["NODE_EXPAND"] = "nodeExpand";
|
17466
17466
|
})(EVENTS || (EVENTS = {}));
|
17467
17467
|
var EMPTY = function EMPTY() {
|
17468
17468
|
return true;
|
@@ -17475,24 +17475,24 @@ var TreeEmitEventsType = _defineProperty(_defineProperty(_defineProperty(_define
|
|
17475
17475
|
var NODE_ATTRIBUTES;
|
17476
17476
|
(function (NODE_ATTRIBUTES) {
|
17477
17477
|
NODE_ATTRIBUTES["DEPTH"] = "__depth";
|
17478
|
-
NODE_ATTRIBUTES["INDEX"] = "__index";
|
17479
|
-
NODE_ATTRIBUTES["UUID"] = "__uuid";
|
17480
|
-
NODE_ATTRIBUTES["PARENT"] = "__parent";
|
17481
17478
|
NODE_ATTRIBUTES["HAS_CHILD"] = "__has_child";
|
17482
|
-
NODE_ATTRIBUTES["
|
17483
|
-
NODE_ATTRIBUTES["
|
17484
|
-
NODE_ATTRIBUTES["ORDER"] = "__order";
|
17485
|
-
NODE_ATTRIBUTES["IS_OPEN"] = "__is_open";
|
17486
|
-
NODE_ATTRIBUTES["IS_CHECKED"] = "__is_checked";
|
17487
|
-
NODE_ATTRIBUTES["IS_SELECTED"] = "__is_selected";
|
17479
|
+
NODE_ATTRIBUTES["INDEX"] = "__index";
|
17480
|
+
NODE_ATTRIBUTES["IS_ASYNC"] = "__is_async";
|
17488
17481
|
NODE_ATTRIBUTES["IS_ASYNC_INIT"] = "__is_async_init";
|
17489
|
-
NODE_ATTRIBUTES["IS_MATCH"] = "__is_match";
|
17490
|
-
NODE_ATTRIBUTES["IS_NULL"] = "__IS_NULL";
|
17491
17482
|
NODE_ATTRIBUTES["IS_CACHED"] = "__is_cached";
|
17492
|
-
NODE_ATTRIBUTES["
|
17483
|
+
NODE_ATTRIBUTES["IS_CHECKED"] = "__is_checked";
|
17484
|
+
NODE_ATTRIBUTES["IS_INDETERMINATE"] = "__is_indeterminate";
|
17493
17485
|
NODE_ATTRIBUTES["IS_LOADING"] = "__is_loading";
|
17486
|
+
NODE_ATTRIBUTES["IS_MATCH"] = "__is_match";
|
17487
|
+
NODE_ATTRIBUTES["IS_NULL"] = "__IS_NULL";
|
17488
|
+
NODE_ATTRIBUTES["IS_OPEN"] = "__is_open";
|
17489
|
+
NODE_ATTRIBUTES["IS_ROOT"] = "__is_root";
|
17490
|
+
NODE_ATTRIBUTES["IS_SELECTED"] = "__is_selected";
|
17491
|
+
NODE_ATTRIBUTES["ORDER"] = "__order";
|
17492
|
+
NODE_ATTRIBUTES["PARENT"] = "__parent";
|
17493
|
+
NODE_ATTRIBUTES["PATH"] = "__path";
|
17494
17494
|
NODE_ATTRIBUTES["TREE_NODE_ATTR"] = "__attr__";
|
17495
|
-
NODE_ATTRIBUTES["
|
17495
|
+
NODE_ATTRIBUTES["UUID"] = "__uuid";
|
17496
17496
|
})(NODE_ATTRIBUTES || (NODE_ATTRIBUTES = {}));
|
17497
17497
|
var NODE_SOURCE_ATTRS = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, NODE_ATTRIBUTES.IS_OPEN, 'isOpen'), NODE_ATTRIBUTES.IS_SELECTED, 'selected'), NODE_ATTRIBUTES.IS_MATCH, 'isMatch'), NODE_ATTRIBUTES.HAS_CHILD, 'hasChild'), NODE_ATTRIBUTES.IS_CHECKED, 'checked'), NODE_ATTRIBUTES.IS_ASYNC, 'async'), NODE_ATTRIBUTES.IS_LOADING, 'loading'), NODE_ATTRIBUTES.IS_ROOT, 'isRoot');
|
17498
17498
|
/**
|
@@ -17501,9 +17501,9 @@ var NODE_SOURCE_ATTRS = _defineProperty(_defineProperty(_defineProperty(_defineP
|
|
17501
17501
|
var NodeContentActionEnum;
|
17502
17502
|
(function (NodeContentActionEnum) {
|
17503
17503
|
NodeContentActionEnum["CLICK"] = "click";
|
17504
|
-
NodeContentActionEnum["SELECTED"] = "selected";
|
17505
|
-
NodeContentActionEnum["EXPAND"] = "expand";
|
17506
17504
|
NodeContentActionEnum["COLLAPSE"] = "collapse";
|
17505
|
+
NodeContentActionEnum["EXPAND"] = "expand";
|
17506
|
+
NodeContentActionEnum["SELECTED"] = "selected";
|
17507
17507
|
})(NodeContentActionEnum || (NodeContentActionEnum = {}));
|
17508
17508
|
;// CONCATENATED MODULE: external "vue-types"
|
17509
17509
|
var external_vue_types_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
@@ -17515,18 +17515,18 @@ const external_vue_types_namespaceObject = external_vue_types_x({ ["string"]: ()
|
|
17515
17515
|
|
17516
17516
|
var ColumnTypeEnum;
|
17517
17517
|
(function (ColumnTypeEnum) {
|
17518
|
-
ColumnTypeEnum["ONCE"] = "once";
|
17519
17518
|
ColumnTypeEnum["EVERY"] = "every";
|
17519
|
+
ColumnTypeEnum["ONCE"] = "once";
|
17520
17520
|
})(ColumnTypeEnum || (ColumnTypeEnum = {}));
|
17521
17521
|
var TreeSearchMatchEnum;
|
17522
17522
|
(function (TreeSearchMatchEnum) {
|
17523
|
-
TreeSearchMatchEnum["FUZZY"] = "fuzzy";
|
17524
17523
|
TreeSearchMatchEnum["FULL"] = "full";
|
17524
|
+
TreeSearchMatchEnum["FUZZY"] = "fuzzy";
|
17525
17525
|
})(TreeSearchMatchEnum || (TreeSearchMatchEnum = {}));
|
17526
17526
|
var TreeSearchResultEnum;
|
17527
17527
|
(function (TreeSearchResultEnum) {
|
17528
|
-
TreeSearchResultEnum["TREE"] = "tree";
|
17529
17528
|
TreeSearchResultEnum["LIST"] = "list";
|
17529
|
+
TreeSearchResultEnum["TREE"] = "tree";
|
17530
17530
|
})(TreeSearchResultEnum || (TreeSearchResultEnum = {}));
|
17531
17531
|
var treeProps = {
|
17532
17532
|
/**
|
@@ -17647,6 +17647,9 @@ var treeProps = {
|
|
17647
17647
|
* 是否支持多选
|
17648
17648
|
*/
|
17649
17649
|
showCheckbox: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.bool, shared_namespaceObject.PropTypes.func]).def(false),
|
17650
|
+
/**
|
17651
|
+
* 默认选中的节点id,selectable为false时无效
|
17652
|
+
*/
|
17650
17653
|
checked: shared_namespaceObject.PropTypes.arrayOf(shared_namespaceObject.PropTypes.any).def([]),
|
17651
17654
|
/**
|
17652
17655
|
* 是否显示节点类型Icon
|
@@ -18334,13 +18337,11 @@ var getNodeItemClass = function getNodeItemClass(item, schema, props) {
|
|
18334
18337
|
var _ref = schema.get(item) || {},
|
18335
18338
|
__is_root = _ref.__is_root,
|
18336
18339
|
__is_open = _ref.__is_open;
|
18337
|
-
|
18338
|
-
|
18339
|
-
|
18340
|
-
'is-
|
18341
|
-
|
18342
|
-
'level-line': props.levelLine && showTree
|
18343
|
-
};
|
18340
|
+
var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
|
18341
|
+
resolveClassName = _usePrefix.resolveClassName;
|
18342
|
+
return _defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
18343
|
+
'is-root': __is_root
|
18344
|
+
}, "".concat(resolveClassName('tree-node')), true), 'is-open', __is_open), 'is-virtual-render', props.virtualRender), 'level-line', props.levelLine && showTree);
|
18344
18345
|
};
|
18345
18346
|
/**
|
18346
18347
|
* 获取当前渲染节点Class List
|
@@ -18349,15 +18350,17 @@ var getNodeItemClass = function getNodeItemClass(item, schema, props) {
|
|
18349
18350
|
*/
|
18350
18351
|
var getNodeRowClass = function getNodeRowClass(item, schema) {
|
18351
18352
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
18352
|
-
var
|
18353
|
-
__is_checked =
|
18354
|
-
__is_selected =
|
18353
|
+
var _ref3 = schema.get(item) || {},
|
18354
|
+
__is_checked = _ref3.__is_checked,
|
18355
|
+
__is_selected = _ref3.__is_selected;
|
18356
|
+
var _usePrefix2 = (0,config_provider_namespaceObject.usePrefix)(),
|
18357
|
+
resolveClassName = _usePrefix2.resolveClassName;
|
18355
18358
|
return _defineProperty({
|
18356
18359
|
'is-checked': __is_checked,
|
18357
18360
|
'is-selected': __is_selected,
|
18358
18361
|
'node-folder': item.is_folder,
|
18359
18362
|
'node-leaf': item.is_leaf
|
18360
|
-
}, (
|
18363
|
+
}, "".concat(resolveClassName('node-row')), true);
|
18361
18364
|
};
|
18362
18365
|
/**
|
18363
18366
|
* 根据路径更新指定节点Child-Data
|
@@ -18606,7 +18609,7 @@ var use_node_action_this = undefined;
|
|
18606
18609
|
return val;
|
18607
18610
|
}
|
18608
18611
|
if (_typeof(val) === 'object' && val !== null) {
|
18609
|
-
if (
|
18612
|
+
if ((0,external_vue_namespaceObject.isVNode)(val)) {
|
18610
18613
|
return val;
|
18611
18614
|
}
|
18612
18615
|
var node = val.node,
|
@@ -18689,7 +18692,7 @@ var use_node_action_this = undefined;
|
|
18689
18692
|
});
|
18690
18693
|
setNodeAttr(parent, NODE_ATTRIBUTES.IS_CHECKED, isNeedChecked);
|
18691
18694
|
setNodeAttr(parent, NODE_ATTRIBUTES.IS_INDETERMINATE, (getChildNodes(parent) || []).some(function (node) {
|
18692
|
-
return !isNodeChecked(node);
|
18695
|
+
return !isNodeChecked(node) || isIndeterminate(node);
|
18693
18696
|
}));
|
18694
18697
|
if (!isRootNode(parent)) {
|
18695
18698
|
updateParentChecked(parent, isChecked);
|
@@ -18737,9 +18740,9 @@ var use_node_action_this = undefined;
|
|
18737
18740
|
return (0,external_vue_namespaceObject.createVNode)("span", {
|
18738
18741
|
"onClick": handleNodeCheckboxClick
|
18739
18742
|
}, [(0,external_vue_namespaceObject.createVNode)(checkbox_namespaceObject["default"], {
|
18740
|
-
"size": "small",
|
18741
|
-
"modelValue": isNodeChecked(item),
|
18742
18743
|
"indeterminate": isIndeterminate(item),
|
18744
|
+
"modelValue": isNodeChecked(item),
|
18745
|
+
"size": "small",
|
18743
18746
|
"onChange": function onChange(val, event) {
|
18744
18747
|
return handleNodeItemCheckboxChange(item, !!val, event);
|
18745
18748
|
}
|
@@ -19004,8 +19007,8 @@ var use_node_action_this = undefined;
|
|
19004
19007
|
// @ts-ignore:next-line
|
19005
19008
|
.map(function (index) {
|
19006
19009
|
return (0,external_vue_namespaceObject.createVNode)("span", {
|
19007
|
-
"
|
19008
|
-
"
|
19010
|
+
"style": getNodeLineStyle(maxDeep - index),
|
19011
|
+
"class": "node-virtual-line"
|
19009
19012
|
}, null);
|
19010
19013
|
});
|
19011
19014
|
};
|
@@ -19039,12 +19042,12 @@ var use_node_action_this = undefined;
|
|
19039
19042
|
var _ctx$slots$nodeAppend, _ctx$slots4;
|
19040
19043
|
var showTree = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
19041
19044
|
return (0,external_vue_namespaceObject.createVNode)("div", {
|
19042
|
-
"data-tree-node": getNodeId(item),
|
19043
19045
|
"key": getNodeId(item),
|
19044
|
-
"class": getNodeRowClass(item, flatData.schema)
|
19046
|
+
"class": getNodeRowClass(item, flatData.schema),
|
19047
|
+
"data-tree-node": getNodeId(item)
|
19045
19048
|
}, [(0,external_vue_namespaceObject.createVNode)("div", {
|
19046
|
-
"class": getNodeItemClass(item, flatData.schema, props, showTree),
|
19047
19049
|
"style": getNodeItemStyle(item, props, flatData, showTree),
|
19050
|
+
"class": getNodeItemClass(item, flatData.schema, props, showTree),
|
19048
19051
|
"onClick": function onClick(e) {
|
19049
19052
|
return handleNodeContentClick(item, e);
|
19050
19053
|
}
|
@@ -19881,6 +19884,8 @@ var use_tree_init_this = undefined;
|
|
19881
19884
|
hasChildNode = _useNodeAttribute.hasChildNode,
|
19882
19885
|
getNodePath = _useNodeAttribute.getNodePath,
|
19883
19886
|
getNodeId = _useNodeAttribute.getNodeId,
|
19887
|
+
getNodeAttr = _useNodeAttribute.getNodeAttr,
|
19888
|
+
getParentNode = _useNodeAttribute.getParentNode,
|
19884
19889
|
getIntersectionResponse = _useNodeAttribute.getIntersectionResponse;
|
19885
19890
|
var _useSearch = use_search(props),
|
19886
19891
|
searchFn = _useSearch.searchFn,
|
@@ -19940,6 +19945,13 @@ var use_tree_init_this = undefined;
|
|
19940
19945
|
immediate: true
|
19941
19946
|
});
|
19942
19947
|
}
|
19948
|
+
(0,external_vue_namespaceObject.onMounted)(function () {
|
19949
|
+
if (props.virtualRender) {
|
19950
|
+
(0,external_vue_namespaceObject.nextTick)(function () {
|
19951
|
+
scrollToTop();
|
19952
|
+
});
|
19953
|
+
}
|
19954
|
+
});
|
19943
19955
|
/**
|
19944
19956
|
* 设置指定节点是否选中
|
19945
19957
|
* @param item Node item | Node Id
|
@@ -20022,7 +20034,9 @@ var use_tree_init_this = undefined;
|
|
20022
20034
|
scrollToTop: scrollToTop,
|
20023
20035
|
asyncNodeClick: asyncNodeClick,
|
20024
20036
|
getData: getData,
|
20025
|
-
reset: reset
|
20037
|
+
reset: reset,
|
20038
|
+
getNodeAttr: getNodeAttr,
|
20039
|
+
getParentNode: getParentNode
|
20026
20040
|
});
|
20027
20041
|
var _useEmpty = use_empty(props),
|
20028
20042
|
renderEmpty = _useEmpty.renderEmpty;
|
@@ -20068,18 +20082,18 @@ var use_tree_init_this = undefined;
|
|
20068
20082
|
resolveClassName = _usePrefix.resolveClassName;
|
20069
20083
|
return function () {
|
20070
20084
|
return (0,external_vue_namespaceObject.createVNode)(virtual_render_namespaceObject["default"], {
|
20071
|
-
"
|
20085
|
+
"ref": root,
|
20072
20086
|
"style": getTreeStyle(null, props),
|
20073
|
-
"list": renderData.value,
|
20074
|
-
"lineHeight": props.lineHeight,
|
20075
20087
|
"height": props.height,
|
20088
|
+
"class": resolveClassName('tree'),
|
20089
|
+
"contentClassName": resolveClassName('container'),
|
20076
20090
|
"enabled": props.virtualRender,
|
20077
|
-
"rowKey": NODE_ATTRIBUTES.UUID,
|
20078
20091
|
"keepAlive": true,
|
20079
|
-
"
|
20092
|
+
"lineHeight": props.lineHeight,
|
20093
|
+
"list": renderData.value,
|
20094
|
+
"rowKey": NODE_ATTRIBUTES.UUID,
|
20080
20095
|
"throttleDelay": 0,
|
20081
|
-
"onContentScroll": handleContentScroll
|
20082
|
-
"ref": root
|
20096
|
+
"onContentScroll": handleContentScroll
|
20083
20097
|
}, {
|
20084
20098
|
"default": function _default(scoped) {
|
20085
20099
|
return renderTreeContent(scoped.data || []);
|
package/lib/tree/props.d.ts
CHANGED
@@ -1,12 +1,16 @@
|
|
1
|
-
import { ExtractPropTypes } from 'vue';
|
1
|
+
import { ExtractPropTypes, VNode } from 'vue';
|
2
2
|
declare enum TreeSearchMatchEnum {
|
3
|
-
|
4
|
-
|
3
|
+
FULL = "full",
|
4
|
+
FUZZY = "fuzzy"
|
5
5
|
}
|
6
6
|
declare enum TreeSearchResultEnum {
|
7
|
-
|
8
|
-
|
7
|
+
LIST = "list",
|
8
|
+
TREE = "tree"
|
9
9
|
}
|
10
|
+
export type TreeNode = {
|
11
|
+
[key: string]: unknown;
|
12
|
+
children: TreeNode[];
|
13
|
+
};
|
10
14
|
/**
|
11
15
|
* Tree Prop: prefixIcon function
|
12
16
|
* @param {} isRoot 是否为分跟节点
|
@@ -15,7 +19,7 @@ declare enum TreeSearchResultEnum {
|
|
15
19
|
* @param {} renderType 当前渲染类型(action: 用来标识当前节点状态,展开 | 收起, node_type:节点类型,文件、文件夹)
|
16
20
|
* @param {} item 当前节点数据
|
17
21
|
*/
|
18
|
-
export type IPrefixIcon = (isRoot: boolean, hasChild: boolean, isOpen: boolean, renderType: string, item:
|
22
|
+
export type IPrefixIcon = (isRoot: boolean, hasChild: boolean, isOpen: boolean, renderType: string, item: TreeNode) => VNode | string;
|
19
23
|
export declare const treeProps: {
|
20
24
|
/**
|
21
25
|
* 渲染列表
|
@@ -153,6 +157,9 @@ export declare const treeProps: {
|
|
153
157
|
showCheckbox: import("vue-types").VueTypeDef<any> & {
|
154
158
|
default: any;
|
155
159
|
};
|
160
|
+
/**
|
161
|
+
* 默认选中的节点id,selectable为false时无效
|
162
|
+
*/
|
156
163
|
checked: import("vue-types").VueTypeDef<any[]> & {
|
157
164
|
default: () => any[];
|
158
165
|
};
|
@@ -230,17 +237,17 @@ export declare const treeProps: {
|
|
230
237
|
};
|
231
238
|
};
|
232
239
|
type AsyncOption = {
|
233
|
-
callback: (item: any, cb: any) => Promise<
|
234
|
-
cache:
|
240
|
+
callback: (item: any, cb: any) => Promise<VNode | string>;
|
241
|
+
cache: boolean;
|
235
242
|
deepAutoOpen?: string;
|
236
243
|
};
|
237
244
|
export type IIntersectionObserver = {
|
238
245
|
enabled: boolean;
|
239
|
-
callback: (node:
|
246
|
+
callback: (node: TreeNode, level: number, index: number) => void;
|
240
247
|
};
|
241
248
|
export type SearchOption = {
|
242
|
-
value:
|
243
|
-
match?: `${TreeSearchMatchEnum}
|
249
|
+
value: boolean | number | string;
|
250
|
+
match?: ((...args: any[]) => boolean) | `${TreeSearchMatchEnum}`;
|
244
251
|
resultType?: `${TreeSearchResultEnum}`;
|
245
252
|
showChildNodes?: boolean;
|
246
253
|
};
|