bkui-vue 0.0.1-beta.98 → 0.0.1
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/License.txt +14 -0
- package/dist/index.cjs.js +360 -36
- package/dist/index.esm.js +30770 -23399
- package/dist/index.umd.js +360 -36
- package/dist/locale/en.esm.js +2 -0
- package/dist/locale/en.esm.js.map +1 -0
- package/dist/locale/en.umd.js +2 -0
- package/dist/locale/en.umd.js.map +1 -0
- package/dist/locale/zh-cn.esm.js +2 -0
- package/dist/locale/zh-cn.esm.js.map +1 -0
- package/dist/locale/zh-cn.umd.js +2 -0
- package/dist/locale/zh-cn.umd.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -0
- package/lib/affix/affix.d.ts +2 -2
- package/lib/affix/affix.variable.css +29 -6
- package/lib/affix/index.d.ts +60 -36
- package/lib/alert/alert.css +4 -0
- package/lib/alert/alert.d.ts +11 -9
- package/lib/alert/alert.less +24 -19
- package/lib/alert/alert.variable.css +33 -6
- package/lib/alert/index.d.ts +82 -58
- package/lib/alert/index.js +1 -1
- package/lib/animate-number/animate-number.d.ts +2 -2
- package/lib/animate-number/index.d.ts +58 -25
- package/lib/backtop/backtop.css +8 -0
- package/lib/backtop/backtop.d.ts +4 -4
- package/lib/backtop/backtop.less +8 -0
- package/lib/backtop/backtop.variable.css +37 -6
- package/lib/backtop/index.d.ts +65 -47
- package/lib/backtop/index.js +1 -1
- package/lib/badge/badge.css +2 -5
- package/lib/badge/badge.d.ts +3 -3
- package/lib/badge/badge.less +4 -5
- package/lib/badge/badge.variable.css +31 -11
- package/lib/badge/index.d.ts +67 -64
- package/lib/badge/index.js +1 -1
- package/lib/breadcrumb/breadcrumb-item.d.ts +5 -3
- package/lib/breadcrumb/breadcrumb.css +43 -0
- package/lib/breadcrumb/breadcrumb.d.ts +2 -2
- package/lib/breadcrumb/breadcrumb.variable.css +77 -11
- package/lib/breadcrumb/index.d.ts +65 -41
- package/lib/breadcrumb/index.js +1 -1
- package/lib/button/button-group.d.ts +4 -4
- package/lib/button/button.css +21 -3
- package/lib/button/button.d.ts +46 -33
- package/lib/button/button.less +25 -5
- package/lib/button/button.variable.css +50 -9
- package/lib/button/index.d.ts +121 -96
- package/lib/button/index.js +1 -1
- package/lib/card/card.css +45 -2
- package/lib/card/card.d.ts +2 -1
- package/lib/card/card.less +2 -2
- package/lib/card/card.variable.css +78 -12
- package/lib/card/index.d.ts +66 -64
- package/lib/card/index.js +1 -1
- package/lib/cascader/cascader-panel.d.ts +60 -6
- package/lib/cascader/cascader.css +197 -11
- package/lib/cascader/cascader.d.ts +108 -25
- package/lib/cascader/cascader.less +148 -11
- package/lib/cascader/cascader.variable.css +234 -25
- package/lib/cascader/index.d.ts +378 -176
- package/lib/cascader/index.js +2 -1
- package/lib/cascader/index.js.LICENSE.txt +1 -0
- package/lib/cascader/interface.d.ts +8 -1
- package/lib/cascader/node.d.ts +9 -2
- package/lib/cascader/store.d.ts +13 -1
- package/lib/checkbox/checkbox-group.d.ts +18 -2
- package/lib/checkbox/checkbox.css +38 -11
- package/lib/checkbox/checkbox.d.ts +40 -18
- package/lib/checkbox/checkbox.less +68 -33
- package/lib/checkbox/checkbox.variable.css +67 -17
- package/lib/checkbox/common.d.ts +1 -0
- package/lib/checkbox/index.d.ts +133 -72
- package/lib/checkbox/index.js +1 -1
- package/lib/checkbox/type.d.ts +1 -1
- package/lib/code-diff/code-diff.css +27 -7
- package/lib/code-diff/code-diff.d.ts +7 -7
- package/lib/code-diff/code-diff.less +42 -7
- package/lib/code-diff/code-diff.variable.css +56 -13
- package/lib/code-diff/index.d.ts +30 -43
- package/lib/code-diff/index.js +1 -1
- package/lib/collapse/collapse-panel.d.ts +104 -0
- package/lib/collapse/collapse.css +58 -19
- package/lib/collapse/collapse.d.ts +59 -42
- package/lib/collapse/collapse.less +106 -46
- package/lib/collapse/collapse.variable.css +87 -25
- package/lib/collapse/index.d.ts +271 -46
- package/lib/collapse/index.js +1 -1
- package/lib/collapse/props.d.ts +131 -0
- package/lib/collapse-transition/collapse-transition.css +93 -0
- package/lib/collapse-transition/collapse-transition.d.ts +15 -0
- package/lib/collapse-transition/collapse-transition.less +111 -0
- package/lib/collapse-transition/collapse-transition.variable.css +215 -0
- package/lib/collapse-transition/index.d.ts +2 -0
- package/lib/collapse-transition/index.js +1 -0
- package/lib/color-picker/color-picker.css +275 -0
- package/lib/color-picker/color-picker.d.ts +144 -0
- package/lib/color-picker/color-picker.less +325 -0
- package/lib/color-picker/color-picker.variable.css +397 -0
- package/lib/color-picker/components/color-input.d.ts +42 -0
- package/lib/color-picker/components/hue-slider.d.ts +41 -0
- package/lib/color-picker/components/input-container.d.ts +42 -0
- package/lib/color-picker/components/recommend-colors.d.ts +51 -0
- package/lib/color-picker/components/saturation-panel.d.ts +41 -0
- package/lib/color-picker/index.d.ts +255 -0
- package/lib/color-picker/index.js +1 -0
- package/lib/color-picker/utils.d.ts +37 -0
- package/lib/components.d.ts +14 -0
- package/lib/components.js +1 -1
- package/lib/config-provider/config-provider.css +0 -0
- package/lib/config-provider/config-provider.d.ts +402 -0
- package/lib/config-provider/config-provider.less +1 -0
- package/lib/config-provider/config-provider.variable.css +122 -0
- package/lib/config-provider/index.d.ts +646 -0
- package/lib/config-provider/index.js +1 -0
- package/lib/config-provider/token.d.ts +128 -0
- package/lib/config-provider/use-global-config.d.ts +5 -0
- package/lib/config-provider/use-locale.d.ts +3 -0
- package/lib/config-provider/use-prefix.d.ts +9 -0
- package/lib/container/col.d.ts +3 -3
- package/lib/container/container.css +43 -0
- package/lib/container/container.d.ts +2 -2
- package/lib/container/container.less +4 -4
- package/lib/container/container.variable.css +72 -6
- package/lib/container/index.d.ts +30 -49
- package/lib/container/index.js +1 -1
- package/lib/container/interface.d.ts +7 -0
- package/lib/container/row.d.ts +2 -2
- package/lib/date-picker/base/confirm.d.ts +74 -0
- package/lib/date-picker/base/date-table.d.ts +96 -0
- package/lib/date-picker/base/month-table.d.ts +117 -0
- package/lib/date-picker/base/picker-dropdown.d.ts +74 -0
- package/lib/date-picker/base/time-spinner.d.ts +170 -0
- package/lib/date-picker/base/year-table.d.ts +117 -0
- package/lib/date-picker/date-picker.css +30 -1
- package/lib/date-picker/date-picker.d.ts +55 -35
- package/lib/date-picker/date-picker.less +109 -74
- package/lib/date-picker/date-picker.variable.css +59 -7
- package/lib/date-picker/index.d.ts +198 -218
- package/lib/date-picker/index.js +1 -1
- package/lib/date-picker/interface.d.ts +20 -10
- package/lib/date-picker/panel/date-range.d.ts +345 -0
- package/lib/date-picker/panel/date.d.ts +206 -0
- package/lib/date-picker/panel/time-range.d.ts +495 -0
- package/lib/date-picker/panel/time.d.ts +451 -0
- package/lib/date-picker/props.d.ts +48 -5
- package/lib/date-picker/time-picker.d.ts +390 -0
- package/lib/date-picker/utils.d.ts +22 -2
- package/lib/dialog/dialog.css +94 -34
- package/lib/dialog/dialog.d.ts +57 -93
- package/lib/dialog/dialog.less +85 -43
- package/lib/dialog/dialog.variable.css +216 -34
- package/lib/dialog/index.d.ts +194 -334
- package/lib/dialog/index.js +2 -1
- package/lib/dialog/index.js.LICENSE.txt +1 -0
- package/lib/dialog/props.d.ts +122 -0
- package/lib/directives/ellipsis.d.ts +7 -0
- package/lib/directives/index.d.ts +2 -0
- package/lib/directives/index.js +1 -1
- package/lib/directives/tooltips.d.ts +2 -1
- package/lib/dist.index.js +1 -1
- package/lib/divider/divider.d.ts +17 -17
- package/lib/divider/divider.variable.css +29 -6
- package/lib/divider/index.d.ts +85 -61
- package/lib/divider/index.js +1 -1
- package/lib/divider/props.d.ts +6 -6
- package/lib/dropdown/dropdown-item.d.ts +1 -1
- package/lib/dropdown/dropdown-menu.d.ts +2 -2
- package/lib/dropdown/dropdown.css +34 -7
- package/lib/dropdown/dropdown.d.ts +46 -15
- package/lib/dropdown/dropdown.less +42 -36
- package/lib/dropdown/dropdown.variable.css +63 -13
- package/lib/dropdown/index.d.ts +136 -65
- package/lib/dropdown/index.js +1 -1
- package/lib/exception/exception.css +40 -14
- package/lib/exception/exception.d.ts +33 -13
- package/lib/exception/exception.less +59 -22
- package/lib/exception/exception.variable.css +69 -20
- package/lib/exception/index.d.ts +91 -43
- package/lib/exception/index.js +1 -1
- package/lib/exception/typings/index.d.ts +4 -0
- package/lib/fixed-navbar/fixed-navbar.d.ts +2 -2
- package/lib/fixed-navbar/fixed-navbar.variable.css +29 -6
- package/lib/fixed-navbar/index.d.ts +60 -36
- package/lib/form/compose-form-item.d.ts +4 -2
- package/lib/form/form-item.d.ts +15 -9
- package/lib/form/form.css +32 -8
- package/lib/form/form.d.ts +25 -7
- package/lib/form/form.less +85 -53
- package/lib/form/form.variable.css +61 -14
- package/lib/form/index.d.ts +109 -51
- package/lib/form/index.js +1 -1
- package/lib/form/type.d.ts +5 -4
- package/lib/form/utils.d.ts +2 -0
- package/lib/hooks.d.ts +1 -0
- package/lib/hooks.js +1 -0
- package/lib/icon/angle-double-down-line.js +1 -1
- package/lib/icon/angle-double-left-line.js +1 -1
- package/lib/icon/angle-double-left.js +1 -1
- package/lib/icon/angle-double-right-line.js +1 -1
- package/lib/icon/angle-double-right.js +1 -1
- package/lib/icon/angle-double-up-line.js +1 -1
- package/lib/icon/angle-down-fill.js +1 -1
- package/lib/icon/angle-down-line.js +1 -1
- package/lib/icon/angle-down.js +1 -1
- package/lib/icon/angle-left.js +1 -1
- package/lib/icon/angle-right.js +1 -1
- package/lib/icon/angle-up-fill.js +1 -1
- package/lib/icon/angle-up.js +1 -1
- package/lib/icon/archive-fill.js +1 -1
- package/lib/icon/arrows-left.js +1 -1
- package/lib/icon/arrows-right.js +1 -1
- package/lib/icon/audio-fill.js +1 -1
- package/lib/icon/bk.js +1 -1
- package/lib/icon/circle.js +1 -1
- package/lib/icon/close-line.js +1 -1
- package/lib/icon/close.js +1 -1
- package/lib/icon/code.js +1 -1
- package/lib/icon/cog-shape.js +1 -1
- package/lib/icon/collapse-left.js +1 -1
- package/lib/icon/copy-shape.d.ts +4 -0
- package/lib/icon/copy-shape.js +1 -0
- package/lib/icon/copy.js +1 -1
- package/lib/icon/data-shape.js +1 -1
- package/lib/icon/del.js +1 -1
- package/lib/icon/doc-fill.js +1 -1
- package/lib/icon/done.js +1 -1
- package/lib/icon/down-shape.js +1 -1
- package/lib/icon/down-small.js +1 -1
- package/lib/icon/edit-line.js +1 -1
- package/lib/icon/ellipsis.js +1 -1
- package/lib/icon/enlarge-line.d.ts +4 -0
- package/lib/icon/enlarge-line.js +1 -0
- package/lib/icon/error.js +1 -1
- package/lib/icon/excel-fill.js +1 -1
- package/lib/icon/exclamation-circle-shape.js +1 -1
- package/lib/icon/eye.js +1 -1
- package/lib/icon/filliscreen-line.d.ts +4 -0
- package/lib/icon/filliscreen-line.js +1 -0
- package/lib/icon/fix-line.d.ts +4 -0
- package/lib/icon/fix-line.js +1 -0
- package/lib/icon/fix-shape.d.ts +4 -0
- package/lib/icon/fix-shape.js +1 -0
- package/lib/icon/folder-open.js +1 -1
- package/lib/icon/folder-shape-open.js +1 -1
- package/lib/icon/folder-shape.js +1 -1
- package/lib/icon/folder.js +1 -0
- package/lib/icon/funnel.js +1 -1
- package/lib/icon/help-document-fill.js +1 -1
- package/lib/icon/help-fill.js +1 -1
- package/lib/icon/help.js +1 -1
- package/lib/icon/image-fill.js +1 -1
- package/lib/icon/img-error.d.ts +4 -0
- package/lib/icon/img-error.js +1 -0
- package/lib/icon/img-placehoulder.d.ts +4 -0
- package/lib/icon/img-placehoulder.js +1 -0
- package/lib/icon/index.d.ts +83 -69
- package/lib/icon/index.js +1 -1
- package/lib/icon/info-line.js +1 -1
- package/lib/icon/info.js +1 -1
- package/lib/icon/left-shape.js +1 -1
- package/lib/icon/left-turn-line.d.ts +4 -0
- package/lib/icon/left-turn-line.js +1 -0
- package/lib/icon/narrow-line.d.ts +4 -0
- package/lib/icon/narrow-line.js +1 -0
- package/lib/icon/original.d.ts +4 -0
- package/lib/icon/original.js +1 -0
- package/lib/icon/pdf-fill.js +1 -1
- package/lib/icon/play-shape.js +1 -1
- package/lib/icon/plus.js +1 -1
- package/lib/icon/ppt-fill.js +1 -1
- package/lib/icon/qq.js +1 -1
- package/lib/icon/right-shape.js +1 -1
- package/lib/icon/right-turn-line.d.ts +4 -0
- package/lib/icon/right-turn-line.js +1 -0
- package/lib/icon/search.js +1 -1
- package/lib/icon/share.js +1 -1
- package/lib/icon/spinner.js +1 -1
- package/lib/icon/success.js +1 -1
- package/lib/icon/switcher-loading.js +1 -1
- package/lib/icon/text-file.js +1 -1
- package/lib/icon/text-fill.js +1 -1
- package/lib/icon/transfer.d.ts +4 -0
- package/lib/icon/transfer.js +1 -0
- package/lib/icon/tree-application-shape.js +1 -1
- package/lib/icon/unfull-screen.d.ts +4 -0
- package/lib/icon/unfull-screen.js +1 -0
- package/lib/icon/unvisible.js +1 -1
- package/lib/icon/up-shape.js +1 -1
- package/lib/icon/upload.js +1 -1
- package/lib/icon/video-fill.js +1 -1
- package/lib/icon/warn.js +1 -1
- package/lib/icon/weixin-pro.d.ts +4 -0
- package/lib/icon/weixin-pro.js +1 -0
- package/lib/icon/weixin.js +1 -1
- package/lib/image/image-viewer.css +142 -0
- package/lib/image/image-viewer.d.ts +73 -0
- package/lib/image/image-viewer.less +168 -0
- package/lib/image/image-viewer.variable.css +142 -0
- package/lib/image/image.css +37 -0
- package/lib/image/image.d.ts +93 -0
- package/lib/image/image.less +44 -0
- package/lib/image/image.variable.css +37 -0
- package/lib/image/index.d.ts +252 -0
- package/lib/image/index.js +1 -0
- package/lib/image/props.d.ts +71 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +1 -1
- package/lib/info-box/index.d.ts +7 -0
- package/lib/info-box/index.js +2 -0
- package/lib/info-box/index.js.LICENSE.txt +1 -0
- package/lib/info-box/info-box.css +37 -0
- package/lib/info-box/info-box.d.ts +29 -0
- package/lib/info-box/info-box.less +51 -0
- package/lib/info-box/info-box.variable.css +159 -0
- package/lib/input/index.d.ts +178 -228
- package/lib/input/index.js +1 -1
- package/lib/input/input.css +168 -23
- package/lib/input/input.d.ts +59 -37
- package/lib/input/input.less +104 -22
- package/lib/input/input.variable.css +228 -61
- package/lib/link/index.d.ts +80 -53
- package/lib/link/index.js +1 -1
- package/lib/link/link.css +12 -12
- package/lib/link/link.d.ts +10 -8
- package/lib/link/link.less +16 -14
- package/lib/link/link.variable.css +41 -18
- package/lib/loading/directive.d.ts +14 -0
- package/lib/loading/index.d.ts +160 -56
- package/lib/loading/index.js +1 -1
- package/lib/loading/loading.css +72 -29
- package/lib/loading/loading.d.ts +91 -15
- package/lib/loading/loading.less +21 -19
- package/lib/loading/loading.variable.css +117 -51
- package/lib/locale/index.d.ts +3 -0
- package/lib/locale/index.js +1 -0
- package/lib/locale/lang/en.d.ts +126 -0
- package/lib/locale/lang/zh-cn.d.ts +3 -0
- package/lib/menu/index.d.ts +75 -34
- package/lib/menu/index.js +1 -1
- package/lib/menu/menu-group.d.ts +2 -2
- package/lib/menu/menu-item.d.ts +5 -1
- package/lib/menu/menu.css +43 -0
- package/lib/menu/menu.d.ts +2 -2
- package/lib/menu/menu.variable.css +90 -24
- package/lib/menu/submenu.d.ts +5 -1
- package/lib/menu/submenu.variable.css +29 -6
- package/lib/menu/utils.d.ts +1 -1
- package/lib/message/index.js +2 -1
- package/lib/message/index.js.LICENSE.txt +6 -0
- package/lib/message/message.css +166 -2
- package/lib/message/message.less +222 -7
- package/lib/message/message.variable.css +195 -8
- package/lib/message/messageConstructor.d.ts +136 -27
- package/lib/modal/index.d.ts +201 -246
- package/lib/modal/index.js +1 -1
- package/lib/modal/modal.css +39 -6
- package/lib/modal/modal.d.ts +54 -61
- package/lib/modal/modal.less +8 -10
- package/lib/modal/modal.variable.css +161 -6
- package/lib/modal/props.mixin.d.ts +16 -23
- package/lib/navigation/index.d.ts +90 -68
- package/lib/navigation/index.js +1 -1
- package/lib/navigation/navigation-title.d.ts +6 -3
- package/lib/navigation/navigation.d.ts +12 -4
- package/lib/navigation/navigation.variable.css +29 -6
- package/lib/notify/index.js +1 -1
- package/lib/notify/notify.css +8 -4
- package/lib/notify/notify.less +18 -13
- package/lib/notify/notify.variable.css +37 -10
- package/lib/notify/notifyConstructor.d.ts +19 -21
- package/lib/overflow-title/components/overflow-title.d.ts +57 -0
- package/lib/overflow-title/directive/overflow-title.d.ts +3 -0
- package/lib/overflow-title/index.d.ts +195 -0
- package/lib/overflow-title/index.js +1 -0
- package/lib/overflow-title/overflow.css +11 -0
- package/lib/overflow-title/overflow.less +13 -0
- package/lib/overflow-title/overflow.variable.css +11 -0
- package/lib/overflow-title/props.d.ts +43 -0
- package/lib/overflow-title/utils/getActualWidthByCanvas.d.ts +3 -0
- package/lib/overflow-title/utils/getActualWidthByDom.d.ts +3 -0
- package/lib/pagination/index.d.ts +89 -90
- package/lib/pagination/index.js +1 -1
- package/lib/pagination/pagination.css +54 -28
- package/lib/pagination/pagination.d.ts +17 -6
- package/lib/pagination/pagination.less +59 -30
- package/lib/pagination/pagination.variable.css +83 -34
- package/lib/pagination/type.d.ts +1 -1
- package/lib/pagination/use-limit.d.ts +3 -1
- package/lib/pagination/use-total.d.ts +3 -1
- package/lib/plugin-popover/index.d.ts +27 -0
- package/lib/plugin-popover/index.js +1 -0
- package/lib/plugins/index.d.ts +1 -0
- package/lib/plugins/index.js +1 -0
- package/lib/pop-confirm/index.d.ts +249 -0
- package/lib/pop-confirm/index.js +1 -0
- package/lib/pop-confirm/pop-confirm.css +28 -0
- package/lib/pop-confirm/pop-confirm.d.ts +95 -0
- package/lib/pop-confirm/pop-confirm.less +34 -0
- package/lib/pop-confirm/pop-confirm.variable.css +150 -0
- package/lib/pop-confirm/props.d.ts +67 -0
- package/lib/popover/arrow.d.ts +2 -0
- package/lib/popover/const.d.ts +16 -0
- package/lib/popover/content.d.ts +43 -0
- package/lib/popover/index.d.ts +409 -173
- package/lib/popover/index.js +1 -1
- package/lib/popover/plugin-popover.d.ts +12 -0
- package/lib/popover/popover.css +10 -53
- package/lib/popover/popover.d.ts +189 -58
- package/lib/popover/popover.less +19 -68
- package/lib/popover/popover.variable.css +40 -60
- package/lib/popover/props.d.ts +90 -37
- package/lib/popover/reference.d.ts +2 -0
- package/lib/popover/root.d.ts +27 -0
- package/lib/popover/use-floating.d.ts +34 -0
- package/lib/popover/use-platform.d.ts +30 -0
- package/lib/popover/use-popover-init.d.ts +23 -0
- package/lib/popover/use-popper-id.d.ts +6 -0
- package/lib/popover/utils.d.ts +8 -0
- package/lib/popover2/index.d.ts +89 -0
- package/lib/popover2/index.js +1 -0
- package/lib/popover2/popover.d.ts +2 -0
- package/lib/preset.d.ts +264 -2
- package/lib/preset.js +1 -1
- package/lib/process/index.d.ts +69 -52
- package/lib/process/index.js +2 -1
- package/lib/process/index.js.LICENSE.txt +1 -0
- package/lib/process/process.css +22 -0
- package/lib/process/process.d.ts +5 -4
- package/lib/process/process.less +36 -8
- package/lib/process/process.variable.css +51 -6
- package/lib/progress/index.d.ts +100 -121
- package/lib/progress/index.js +1 -1
- package/lib/progress/progress.css +43 -0
- package/lib/progress/progress.d.ts +17 -15
- package/lib/progress/progress.less +8 -8
- package/lib/progress/progress.variable.css +76 -10
- package/lib/radio/index.d.ts +116 -58
- package/lib/radio/index.js +1 -1
- package/lib/radio/radio-button.d.ts +12 -9
- package/lib/radio/radio-group.d.ts +36 -5
- package/lib/radio/radio.css +133 -62
- package/lib/radio/radio.d.ts +9 -5
- package/lib/radio/radio.less +262 -173
- package/lib/radio/radio.variable.css +166 -72
- package/lib/radio/type.d.ts +1 -1
- package/lib/rate/index.d.ts +78 -28
- package/lib/rate/index.js +1 -1
- package/lib/rate/rate.d.ts +14 -3
- package/lib/rate/star.d.ts +1 -1
- package/lib/resize-layout/index.d.ts +82 -80
- package/lib/resize-layout/index.js +1 -1
- package/lib/resize-layout/resize-layout.css +6 -15
- package/lib/resize-layout/resize-layout.d.ts +10 -9
- package/lib/resize-layout/resize-layout.less +32 -41
- package/lib/resize-layout/resize-layout.variable.css +35 -21
- package/lib/search-select/index.d.ts +892 -0
- package/lib/search-select/index.js +2 -0
- package/lib/search-select/index.js.LICENSE.txt +1 -0
- package/lib/search-select/input.d.ts +101 -0
- package/lib/search-select/menu.d.ts +77 -0
- package/lib/search-select/search-select.css +427 -0
- package/lib/search-select/search-select.d.ts +361 -0
- package/lib/search-select/search-select.less +384 -0
- package/lib/search-select/search-select.variable.css +549 -0
- package/lib/search-select/selected.d.ts +155 -0
- package/lib/search-select/utils.d.ts +88 -0
- package/lib/select/common.d.ts +4 -11
- package/lib/select/index.d.ts +1471 -918
- package/lib/select/index.js +2 -1
- package/lib/select/index.js.LICENSE.txt +1 -0
- package/lib/select/option.d.ts +17 -6
- package/lib/select/optionGroup.d.ts +2 -2
- package/lib/select/select.css +211 -140
- package/lib/select/select.d.ts +654 -205
- package/lib/select/select.less +331 -189
- package/lib/select/select.variable.css +240 -146
- package/lib/select/selectTagInput.d.ts +38 -15
- package/lib/select/type.d.ts +20 -14
- package/lib/shared/dom.d.ts +3 -0
- package/lib/shared/helper.d.ts +9 -0
- package/lib/shared/hooks/use-form-item.d.ts +2 -0
- package/lib/shared/hooks/use-form.d.ts +2 -0
- package/lib/shared/index.d.ts +16 -12
- package/lib/shared/index.js +1 -1
- package/lib/shared/mask-manager.d.ts +18 -5
- package/lib/shared/pop-manager.d.ts +14 -4
- package/lib/shared/popover.d.ts +2 -1
- package/lib/shared/token.d.ts +1 -1
- package/lib/shared/utils.d.ts +19 -0
- package/lib/shared/vue-types.d.ts +116 -13
- package/lib/sideslider/index.d.ts +158 -252
- package/lib/sideslider/index.js +2 -1
- package/lib/sideslider/index.js.LICENSE.txt +1 -0
- package/lib/sideslider/sideslider.css +10 -8
- package/lib/sideslider/sideslider.d.ts +46 -71
- package/lib/sideslider/sideslider.less +19 -17
- package/lib/sideslider/sideslider.variable.css +39 -14
- package/lib/slider/index.d.ts +82 -112
- package/lib/slider/index.js +2 -1
- package/lib/slider/index.js.LICENSE.txt +1 -0
- package/lib/slider/slider-button.d.ts +3 -2
- package/lib/slider/slider.d.ts +6 -6
- package/lib/slider/slider.variable.css +29 -6
- package/lib/steps/index.d.ts +105 -96
- package/lib/steps/index.js +2 -1
- package/lib/steps/index.js.LICENSE.txt +1 -0
- package/lib/steps/steps.css +1 -0
- package/lib/steps/steps.d.ts +35 -34
- package/lib/steps/steps.less +63 -62
- package/lib/steps/steps.variable.css +30 -6
- package/lib/styles/index.d.ts +6 -1
- package/lib/styles/mixins/mixins.css +43 -0
- package/lib/styles/mixins/mixins.less +1 -0
- package/lib/styles/mixins/mixins.variable.css +43 -0
- package/lib/styles/mixins/popper.css +1 -1
- package/lib/styles/mixins/popper.less +12 -11
- package/lib/styles/mixins/popper.variable.css +123 -1
- package/lib/styles/mixins/scroll.css +17 -0
- package/lib/styles/mixins/scroll.less +22 -0
- package/lib/styles/mixins/scroll.variable.css +139 -0
- package/lib/styles/reset.css +36 -0
- package/lib/styles/reset.less +26 -2
- package/lib/styles/reset.variable.css +36 -0
- package/lib/styles/themes/themes.less +37 -6
- package/lib/swiper/index.d.ts +60 -44
- package/lib/swiper/index.js +1 -1
- package/lib/swiper/swiper.d.ts +1 -1
- package/lib/swiper/swiper.less +15 -13
- package/lib/swiper/swiper.variable.css +122 -0
- package/lib/switcher/index.d.ts +94 -87
- package/lib/switcher/index.js +1 -1
- package/lib/switcher/switcher.css +44 -1
- package/lib/switcher/switcher.d.ts +17 -11
- package/lib/switcher/switcher.less +29 -52
- package/lib/switcher/switcher.variable.css +90 -24
- package/lib/tab/index.d.ts +163 -124
- package/lib/tab/index.js +1 -1
- package/lib/tab/props.d.ts +92 -43
- package/lib/tab/tab-nav.d.ts +46 -14
- package/lib/tab/tab-panel.d.ts +16 -9
- package/lib/tab/tab.css +135 -58
- package/lib/tab/tab.d.ts +42 -20
- package/lib/tab/tab.less +164 -77
- package/lib/tab/tab.variable.css +164 -64
- package/lib/table/cache.d.ts +6 -0
- package/lib/table/components/index.d.ts +3 -0
- package/lib/table/components/table-cell.d.ts +51 -0
- package/lib/table/components/table-column.d.ts +305 -0
- package/lib/table/components/table-row.d.ts +2 -0
- package/lib/table/const.d.ts +94 -6
- package/lib/table/index.d.ts +697 -169
- package/lib/table/index.js +1 -1
- package/lib/table/plugins/body-empty.d.ts +36 -0
- package/lib/table/plugins/col-group.d.ts +38 -0
- package/lib/table/plugins/common.d.ts +6 -0
- package/lib/table/plugins/head-filter.css +30 -14
- package/lib/table/plugins/head-filter.d.ts +26 -0
- package/lib/table/plugins/head-filter.less +79 -52
- package/lib/table/plugins/head-filter.variable.css +59 -20
- package/lib/table/plugins/head-sort.css +7 -3
- package/lib/table/plugins/head-sort.d.ts +29 -0
- package/lib/table/plugins/head-sort.less +8 -4
- package/lib/table/plugins/head-sort.variable.css +36 -9
- package/lib/table/plugins/index.d.ts +5 -0
- package/lib/table/plugins/settings.css +43 -6
- package/lib/table/plugins/settings.d.ts +37 -0
- package/lib/table/plugins/settings.less +52 -7
- package/lib/table/plugins/settings.variable.css +72 -12
- package/lib/table/plugins/use-active-columns.d.ts +16 -0
- package/lib/table/plugins/use-column-resize.d.ts +15 -0
- package/lib/table/plugins/use-fixed-column.d.ts +26 -0
- package/lib/table/plugins/use-pagination.d.ts +16 -0
- package/lib/table/plugins/use-scroll-loading.d.ts +5 -0
- package/lib/table/props.d.ts +271 -23
- package/lib/table/render.d.ts +32 -12
- package/lib/table/table.css +964 -67
- package/lib/table/table.d.ts +170 -27
- package/lib/table/table.less +198 -66
- package/lib/table/table.variable.css +993 -73
- package/lib/table/use-column.d.ts +12 -0
- package/lib/table/use-common.d.ts +71 -29
- package/lib/table/utils.d.ts +33 -4
- package/lib/table-column/index.d.ts +797 -0
- package/lib/table-column/index.js +1 -0
- package/lib/tag/index.d.ts +89 -68
- package/lib/tag/index.js +1 -1
- package/lib/tag/tag.css +46 -13
- package/lib/tag/tag.d.ts +17 -12
- package/lib/tag/tag.less +58 -21
- package/lib/tag/tag.variable.css +75 -19
- package/lib/tag-input/common.d.ts +13 -1
- package/lib/tag-input/index.d.ts +570 -269
- package/lib/tag-input/index.js +1 -1
- package/lib/tag-input/list-tag-render.d.ts +2 -5
- package/lib/tag-input/tag-input.css +23 -27
- package/lib/tag-input/tag-input.d.ts +304 -45
- package/lib/tag-input/tag-input.less +103 -106
- package/lib/tag-input/tag-input.variable.css +52 -33
- package/lib/tag-input/tag-props.d.ts +142 -8
- package/lib/tag-input/tag-render.d.ts +31 -5
- package/lib/time-picker/index.d.ts +833 -0
- package/lib/time-picker/index.js +1 -0
- package/lib/time-picker/time-picker.css +215 -0
- package/lib/time-picker/time-picker.less +260 -0
- package/lib/time-picker/time-picker.variable.css +337 -0
- package/lib/timeline/index.d.ts +64 -32
- package/lib/timeline/index.js +1 -1
- package/lib/timeline/timeline.css +11 -4
- package/lib/timeline/timeline.d.ts +4 -3
- package/lib/timeline/timeline.less +48 -36
- package/lib/timeline/timeline.variable.css +40 -10
- package/lib/transfer/index.d.ts +152 -81
- package/lib/transfer/index.js +1 -1
- package/lib/transfer/props.d.ts +5 -0
- package/lib/transfer/transfer.css +121 -41
- package/lib/transfer/transfer.d.ts +35 -3
- package/lib/transfer/transfer.less +103 -46
- package/lib/transfer/transfer.variable.css +155 -52
- package/lib/tree/constant.d.ts +22 -2
- package/lib/tree/index.d.ts +236 -141
- package/lib/tree/index.js +1 -1
- package/lib/tree/props.d.ts +68 -12
- package/lib/tree/tree.css +176 -7
- package/lib/tree/tree.d.ts +91 -20
- package/lib/tree/tree.less +49 -1
- package/lib/tree/tree.variable.css +205 -13
- package/lib/tree/use-empty.d.ts +1 -1
- package/lib/tree/use-node-action.d.ts +3 -2
- package/lib/tree/use-node-attribute.d.ts +11 -0
- package/lib/tree/use-node-drag.d.ts +1 -1
- package/lib/tree/use-search.d.ts +1 -1
- package/lib/tree/util.d.ts +2 -0
- package/lib/upload/index.d.ts +508 -1
- package/lib/upload/index.js +2 -1
- package/lib/upload/index.js.LICENSE.txt +1 -0
- package/lib/upload/props.d.ts +0 -2
- package/lib/upload/upload-list.d.ts +3 -2
- package/lib/upload/upload-trigger.d.ts +1 -4
- package/lib/upload/upload.css +58 -5
- package/lib/upload/upload.d.ts +10 -16
- package/lib/upload/upload.less +19 -8
- package/lib/upload/upload.type.d.ts +12 -12
- package/lib/upload/upload.variable.css +113 -37
- package/lib/upload/use-file-handler.d.ts +2 -25
- package/lib/virtual-render/index.d.ts +100 -150
- package/lib/virtual-render/index.js +1 -1
- package/lib/virtual-render/props.d.ts +15 -1
- package/lib/virtual-render/virtual-render.css +17 -17
- package/lib/virtual-render/virtual-render.d.ts +39 -4
- package/lib/virtual-render/virtual-render.less +2 -23
- package/lib/virtual-render/virtual-render.variable.css +139 -17
- package/lib/volar.components.d.ts +102 -0
- package/package.json +47 -40
- package/LICENSE.txt +0 -22
package/lib/tree/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n(require("../shared"),require("vue"),require("../virtual-render"),require("../exception"),require("../icon"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../virtual-render","../exception","../icon"],n);else{var t="object"==typeof exports?n(require("../shared"),require("vue"),require("../virtual-render"),require("../exception"),require("../icon")):n(e["../shared"],e.vue,e["../virtual-render"],e["../exception"],e["../icon"]);for(var r in t)("object"==typeof exports?exports:e)[r]=t[r]}}(self,((e,n,t,r,o)=>(()=>{var i={8022:(e,n,t)=>{var r=t(4481),o=t(6426),i=o;i.v1=r,i.v4=o,e.exports=i},8725:e=>{for(var n=[],t=0;t<256;++t)n[t]=(t+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,o=n;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]]].join("")}},9157:e=>{var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var t=new Uint8Array(16);e.exports=function(){return n(t),t}}else{var r=new Array(16);e.exports=function(){for(var e,n=0;n<16;n++)0==(3&n)&&(e=4294967296*Math.random()),r[n]=e>>>((3&n)<<3)&255;return r}}},4481:(e,n,t)=>{var r,o,i=t(9157),a=t(8725),l=0,u=0;e.exports=function(e,n,t){var c=n&&t||0,s=n||[],d=(e=e||{}).node||r,f=void 0!==e.clockseq?e.clockseq:o;if(null==d||null==f){var p=i();null==d&&(d=r=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==f&&(f=o=16383&(p[6]<<8|p[7]))}var v=void 0!==e.msecs?e.msecs:(new Date).getTime(),y=void 0!==e.nsecs?e.nsecs:u+1,N=v-l+(y-u)/1e4;if(N<0&&void 0===e.clockseq&&(f=f+1&16383),(N<0||v>l)&&void 0===e.nsecs&&(y=0),y>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");l=v,u=y,o=f;var h=(1e4*(268435455&(v+=122192928e5))+y)%4294967296;s[c++]=h>>>24&255,s[c++]=h>>>16&255,s[c++]=h>>>8&255,s[c++]=255&h;var _=v/4294967296*1e4&268435455;s[c++]=_>>>8&255,s[c++]=255&_,s[c++]=_>>>24&15|16,s[c++]=_>>>16&255,s[c++]=f>>>8|128,s[c++]=255&f;for(var I=0;I<6;++I)s[c+I]=d[I];return n||a(s)}},6426:(e,n,t)=>{var r=t(9157),o=t(8725);e.exports=function(e,n,t){var i=n&&t||0;"string"==typeof e&&(n="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,n)for(var l=0;l<16;++l)n[i+l]=a[l];return n||o(a)}},9911:e=>{"use strict";e.exports=r},6870:e=>{"use strict";e.exports=o},4212:n=>{"use strict";n.exports=e},3511:e=>{"use strict";e.exports=t},748:e=>{"use strict";e.exports=n}},a={};function l(e){var n=a[e];if(void 0!==n)return n.exports;var t=a[e]={exports:{}};return i[e](t,t.exports,l),t.exports}l.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return l.d(n,{a:n}),n},l.d=(e,n)=>{for(var t in n)l.o(n,t)&&!l.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},l.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var u={};return(()=>{"use strict";l.r(u),l.d(u,{default:()=>w});var e,n,t,r=l(4212),o=l(748),i=l(3511),a=l.n(i);function c(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}!function(e){e.NODE_CLICK="nodeClick",e.NODE_COLLAPSE="nodeCollapse",e.NODE_EXPAND="nodeExpand"}(t||(t={}));var s,d=function(){return!0},f=(c(e={},t.NODE_CLICK,d),c(e,t.NODE_COLLAPSE,d),c(e,t.NODE_EXPAND,d),e);!function(e){e.DEPTH="__depth",e.INDEX="__index",e.UUID="__uuid",e.PARENT_ID="__parent_id",e.HAS_CHILD="__has_child",e.PATH="__path",e.IS_ROOT="__is_root",e.ORDER="__order",e.IS_OPEN="__is_open",e.IS_CHECKED="__is_checked",e.IS_SELECTED="__is_selected",e.IS_ASYNC_INIT="__is_async_init",e.IS_MATCH="__is_match",e.IS_NULL="__IS_NULL",e.IS_CACHED="__is_cached",e.IS_ASYNC="__is_async",e.IS_LOADING="__is_loading",e.TREE_NODE_ATTR="__attr__"}(s||(s={}));var p=(c(n={},s.IS_OPEN,"isOpen"),c(n,s.IS_SELECTED,"selected"),c(n,s.IS_MATCH,"isMatch"),c(n,s.HAS_CHILD,"hasChild"),c(n,s.IS_CHECKED,"checked"),c(n,s.IS_ASYNC,"async"),c(n,s.IS_LOADING,"loading"),c(n,s.IS_ROOT,"isRoot"),n),v={data:r.PropTypes.arrayOf(r.PropTypes.any).def([]),label:r.PropTypes.oneOfType([r.PropTypes.func.def(void 0),r.PropTypes.string.def("label")]),nodeKey:r.PropTypes.string.def(void 0),children:r.PropTypes.string.def("children"),indent:r.PropTypes.number.def(18),lineHeight:r.PropTypes.number.def(32),levelLine:r.PropTypes.oneOfType([r.PropTypes.bool.def(!1),r.PropTypes.func.def(void 0),r.PropTypes.string.def("1px dashed #c3cdd7")]).def(!1),virtualRender:r.PropTypes.bool.def(!1),prefixIcon:r.PropTypes.oneOfType([r.PropTypes.func.def((function(){})),r.PropTypes.bool.def(!1)]).def(!0),async:r.PropTypes.shape({callback:r.PropTypes.func.def(void 0),cache:r.PropTypes.bool.def(!0),deepAutoOpen:r.PropTypes.commonType(["once","every"],"columnType").def("once")}),offsetLeft:r.PropTypes.number.def(5),search:r.PropTypes.oneOfType([r.PropTypes.shape({value:r.PropTypes.oneOfType([r.PropTypes.number,r.PropTypes.string,r.PropTypes.bool]).def(""),match:r.PropTypes.oneOfType([r.PropTypes.commonType(["fuzzy","full"],"TreeSearchMatchType"),r.PropTypes.func]),resultType:r.PropTypes.commonType(["tree","list"],"TreeSearchResultType").def("tree"),openResultNode:r.PropTypes.bool}),r.PropTypes.string,r.PropTypes.number,r.PropTypes.bool]).def(void 0),emptyText:r.PropTypes.string.def("没有数据"),draggable:r.PropTypes.bool.def(!1),dragSort:r.PropTypes.bool.def(!1),selectable:r.PropTypes.bool.def(!0),selected:r.PropTypes.oneOfType([r.PropTypes.string,null,r.PropTypes.number,r.PropTypes.object]).def(null),autoCheckChildren:r.PropTypes.bool.def(!0),autoOpenParentNode:r.PropTypes.bool.def(!0)},y=l(9911),N=l.n(y);function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}var _=l(6870);const I=function(e,n){var t=function(n){return e.schema.get(n)},r=function(e,n){var r;return null===(r=t(e[s.UUID]))||void 0===r?void 0:r[n]},o=function(n,r,o){e.schema.set(n[s.UUID],Object.assign(Object.assign({},t(n[s.UUID])),c({},r,o)))},i=function(e){return r(e,s.PATH)},a=function(e){return r(e,s.UUID)},l=function(e){return r(e,s.IS_ROOT)},u=function(e){return r(e,s.IS_OPEN)},d=function(e){return r(e,s.HAS_CHILD)},f=function(e){return r(e,s.IS_MATCH)},v=function(e){return r(e,s.IS_CHECKED)},y=function(e){return r(c({},s.UUID,e),s.PARENT_ID)},N=function(e){var n;return"object"===h(e)?u(e):"string"==typeof e&&(null===(n=t(e))||void 0===n?void 0:n[s.IS_OPEN])},_=function(e){return e.split("-").reduce((function(e,t){var r=Number(t);return Array.isArray(e)?e[r]:e[n.children][r]}),n.data)},I=function(e){return _(i(c({},s.UUID,e)))},S=function(e){var n;return c(n={},p[s.IS_LOADING],r(e,s.IS_LOADING)),c(n,p[s.HAS_CHILD],d(e)),c(n,p[s.IS_MATCH],f(e)),c(n,p[s.IS_CHECKED],v(e)),c(n,p[s.IS_OPEN],u(e)),c(n,p[s.IS_ROOT],l(e)),c(n,"fullPath",r(e,s.PATH)),c(n,"uuid",a(e)),c(n,"parentId",r(e,s.PARENT_ID)),n};return{getSchemaVal:t,getNodeAttr:r,getNodeId:a,getNodeParentId:function(e){return r(e,s.PARENT_ID)},getNodeParentIdById:y,getParentNodeData:function(e){return l(c({},s.UUID,e))?c({},n.children,n.data):I(y(e))},setNodeAttr:o,getNodePath:i,isRootNode:l,isNodeOpened:u,hasChildNode:d,isItemOpen:N,isNodeChecked:v,isNodeMatched:f,isNodeLoading:function(e){return r(e,s.IS_LOADING)},checkNodeIsOpen:function(e){return l(e)||function(e){return N(r(e,s.PARENT_ID))}(e)},getSourceNodeByPath:_,getSourceNodeByUID:I,deleteNodeSchema:function(n){return e.schema.delete(n)},resolveScopedSlotParam:S,setTreeNodeLoading:function(e,n){o(e,s.IS_LOADING,n)},extendNodeAttr:function(e){return Object.assign(Object.assign({},e),c({},s.TREE_NODE_ATTR,S(e)))}}};function S(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function g(e){return function(e){if(Array.isArray(e))return S(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(e){if("string"==typeof e)return S(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?S(e,n):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var T=void 0,m="1px dashed #c3cdd7",E=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],a=e[n];return"boolean"==typeof a?a?r:o:P(t,e,n,i)},P=function(e,n,t){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=n[t];if("string"==typeof o)return"object"===h(e)&&null!==e?(Object.prototype.hasOwnProperty.call(e,o)||console.error("cannot find node label with key ".concat(o)),e[o]):o;if("function"==typeof o){var i=o.apply(T,[e].concat(g(r)));return"string"==typeof i?i:void console.error("props label with function return value is not string, please check and return string")}},A=function(e,n){return P(e,n,"label")},O=function(e,n){return e.get(n)||{}},D=function(e,n,t){var r;return null===(r=O(e,n))||void 0===r?void 0:r[t]},C=function(e,n){return{"--level-line":E(n,"levelLine",e,m,null,["tree"]),"--lineHeight":"".concat(n.lineHeight,"px"),"--indent":"".concat(n.indent,"px"),"--offset-left":"".concat(n.offsetLeft,"px")}},b=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.schema,o=D(r,e[s.UUID],s.DEPTH);return Object.assign({"--depth":o},"function"==typeof n.levelLine?{"--level-line":E(n,"levelLine",e,m,null,["node"])}:{})},L=function(e,n,t){var r=O(n,e[s.UUID])||{};return{"is-root":r.__is_root,"bk-tree-node":!0,"is-open":r.__is_open,"is-virtual-render":t.virtualRender,"level-line":t.levelLine}},U=function(e,n){var t=O(n,e[s.UUID])||{};return c({"is-checked":t.__is_checked,"is-selected":t.__is_selected},(0,r.resolveClassName)("node-row"),!0)},x=function(e){return null==e?{__IS_NULL:!0}:"string"==typeof e||"number"==typeof e||"symbol"===h(e)?c({},s.UUID,e):(Object.prototype.hasOwnProperty.call(e,s.UUID)||console.error("setNodeAction Error: node id cannot found"),e)};const H=function(e,n){var t=I(n,e),r=t.setNodeAttr,o=t.getNodePath,i=t.getNodeAttr,a=t.resolveScopedSlotParam,l=t.setTreeNodeLoading,u=function(n,t){if("object"===h(n)&&null!==n){r(t,s.IS_OPEN,!0);var i=Array.isArray(n)?n:[n];return function(e,n,t,r,o){!function(e,n,t,r){var o=e.split("-").reduce((function(e,n){var r=Number(n);return Array.isArray(e)?e[r]:e[t][r]}),n);Object.assign(o,r||{})}(e,n,t,c({},r,o))}(o(t),e.data,e.children,e.children,i),Promise.resolve(n)}return Promise.resolve(n)},d=function(n){var t=e.async||{},o=t.callback,c=void 0===o?null:o,d=t.cache,f=void 0===d||d;if("function"==typeof c&&i(n,s.IS_ASYNC)){if(r(n,s.IS_ASYNC_INIT,!0),!i(n,s.IS_CACHED)){r(n,s.IS_CACHED,f);var p=a(n),v=c(n,(function(e){return u(e,n)}),p);if("object"===h(v)&&null!==v)return l(n,!0),v instanceof Promise?Promise.resolve(v.then((function(e){return u(e,n)})).catch((function(e){return console.error("load remote data error:",e)})).finally((function(){l(n,!1),r(n,s.IS_CACHED,!0)}))):(u(v,n),l(n,!1),Promise.resolve(!0))}return Promise.resolve(!0)}return Promise.resolve(!0)};return{asyncNodeClick:d,deepAutoOpen:function e(){var t=n.data.filter((function(e){return i(e,s.IS_ASYNC)&&e[p[s.IS_OPEN]]&&!i(e,s.IS_ASYNC_INIT)}));t.length&&Promise.all(t.map((function(e){return d(e)}))).then((function(){e()})).catch((function(e){console.warn(e)}))}}};var R=l(8022),j=void 0;const k=(0,o.defineComponent)({name:"Tree",props:v,emits:f,setup:function(e,n){var i=function(e){var n,t=function(e){var n,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=e.data,i=e.children,a=[],l=0,u=new Map;function d(e,n,t,r){if(null!=e&&u.has(e)&&![s.UUID,s.PARENT_ID].includes(n)){var o=u.get(e);Object.prototype.hasOwnProperty.call(o,n)&&"function"==typeof r&&Reflect.apply(r,self,[o,n,t])&&(Object.assign(o,c({},n,t)),d(o[s.PARENT_ID],n,t,r))}}function f(n){var t=null;return"string"==typeof e.nodeKey&&(t=n[e.nodeKey]||(0,R.v4)()),t||n[s.UUID]||(0,R.v4)()}var v=(c(n={},s.IS_OPEN,(function(){return!1})),c(n,s.IS_CHECKED,(function(){return!1})),c(n,s.IS_MATCH,(function(){return!0})),c(n,s.IS_SELECTED,(function(n){return e.selected===n})),c(n,s.IS_CACHED,(function(){return!1})),c(n,s.IS_ASYNC,(function(){return null})),c(n,s.IS_LOADING,(function(){return!1})),n);function y(e,n,t){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,i=o;void 0===o&&"function"==typeof v[t]&&(i=v[t](e,n));var a=p[t];if(Object.prototype.hasOwnProperty.call(n,a))return n[a];var l=(r||[]).find((function(n){return n[s.UUID]===e})),u=void 0;return l&&(u=l[t]),null==u&&(u=i),u}function N(n,t){return!!e.selectable&&y(n,t,s.IS_SELECTED,e.selected===n)}function _(e,n,t){var r,o=y(e,n,s.IS_OPEN),i=!u.has(t)||(null===(r=u.get(t))||void 0===r?void 0:r[s.IS_OPEN]);return o&&i}function I(e){return!e[s.IS_OPEN]}function S(n){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,p=n.length,v=0;v<p;v++){var g=n[v];if(Array.isArray(g))S(g,t,r,o);else if("object"===h(g)&&null!==g){var T,m,E=null!==o?"".concat(o,"-").concat(v):"".concat(v),P="".concat(f(g)),A=!!(g[i]||[]).length,O=y(P,g,s.IS_OPEN);e.autoOpenParentNode?O&&d(r,s.IS_OPEN,!0,I):O=_(P,g,r),Object.assign(g,c({},s.UUID,P)),u.set(P,(c(T={},s.DEPTH,t),c(T,s.INDEX,v),c(T,s.UUID,P),c(T,s.PARENT_ID,r),c(T,s.HAS_CHILD,A),c(T,s.PATH,E),c(T,s.IS_ROOT,null===r),c(T,s.ORDER,l),c(T,s.IS_SELECTED,N(P,g)),c(T,s.IS_MATCH,y(P,g,s.IS_MATCH)),c(T,s.IS_OPEN,O),c(T,s.IS_CHECKED,y(P,g,s.IS_CHECKED)),c(T,s.IS_CACHED,y(P,g,s.IS_CACHED)),c(T,s.IS_ASYNC,y(P,g,s.IS_ASYNC)),c(T,s.IS_LOADING,y(P,g,s.IS_LOADING)),c(T,i,null),T)),l+=1,a.push(Object.assign(Object.assign({},JSON.parse(JSON.stringify(g,(function(n,t){return n===e.children?null:t})))),(c(m={},s.IS_OPEN,O),c(m,i,null),m))),Object.prototype.hasOwnProperty.call(g,i)&&S(g[i]||[],t+1,P,E)}}}return S(t||o),[a,u]},r=t(e),i=new Map,a=[],l=[],u=(0,o.reactive)({data:r[0],schema:r[1],levelLineSchema:{}}),d=(0,o.computed)((function(){return Array.from(u.schema.values())})),f=H(e,u),v=f.asyncNodeClick,y=f.deepAutoOpen,N=function(e,n){(!(arguments.length>2&&void 0!==arguments[2])||arguments[2])&&i.has(e)&&i.delete(e),i.set(e,n)},_=function(e){var n,t=function(e){return"function"==typeof e?{type:"loop",fn:e}:"object"===h(e)&&"string"==typeof e.type&&"function"==typeof e.fn?e:(console.error("loop event error",e),null)}(e);return null!==t&&Reflect.apply(t.fn,j,[]),null!==(n=null==t?void 0:t.type)&&void 0!==n?n:"once"};return(0,o.watch)((function(){return[e.data]}),(function(n){var r,o,a=t(e,n,d.value);u.data=a[0],u.schema=a[1],(null===(r=e.async)||void 0===r?void 0:r.callback)&&"every"===(null===(o=e.async)||void 0===o?void 0:o.deepAutoOpen)&&y(),Array.from(i.keys()).forEach((function(e){var n=i.get(e);if(Array.isArray(n)){var t=[];n.forEach((function(e,n){"once"===_(e)&&t.unshift(n)})),t.length&&t.forEach((function(e){return n.splice(e,1)})),0===n.length&&i.delete(e)}else"once"===_(n)&&i.delete(e)}))}),{deep:!0}),e.selectable&&(0,o.watch)((function(){return e.selected}),(function(e){l.length=0,a.forEach((function(n){Reflect.apply(n,j,[e]),l.push((function(){return Reflect.apply(n,j,[e])}))})),N("afterSelectWatch",l)}),{immediate:!0}),(null===(n=e.async)||void 0===n?void 0:n.callback)&&y(),{flatData:u,schemaValues:d,asyncNodeClick:v,deepAutoOpen:y,afterDataUpdate:function(e){N("afterDataUpdate",e)},registerNextLoop:N,onSelected:function(e){a.push(e)}}}(e),l=i.flatData,u=i.schemaValues,d=i.onSelected,f=i.registerNextLoop,v=I(l,e),y=v.setNodeAttr,S=v.checkNodeIsOpen,g=v.getNodeAttr,T=v.getNodePath,m=v.isRootNode,E=v.isNodeOpened,P=v.isNodeChecked,O=v.isNodeMatched,D=v.hasChildNode,k=function(e){var n,t=(0,o.toRef)(e,"search"),r=null!==(n=e.search)&&void 0!==n?n:{},i=r.openResultNode,a=void 0!==i&&i,l=r.resultType,u=void 0===l?"tree":l,c=function(e){return["string","number","boolean"].includes(h(e))},s=function(e,n){return e===n},d=function(e,n){return new RegExp("".concat(e),"i").test("".concat(n))},f=function(e,n){return Reflect.apply(e,void 0,n)},p=void 0===t.value||!1===t.value,v=(0,o.computed)((function(){return!1!==t.value&&(c(t.value)?"".concat(t.value).length>0:"object"===h(t.value))}));return{searchFn:function(e,n){if(p)return!0;if(c(t.value))return f(d,[t.value,e,n]);var r=t.value,o=r.value,i=void 0===o?"":o,a=r.match,l=void 0===a?"fuzzy":a,u="function"==typeof l?l:"fuzzy"===l?d:s;return 0==="".concat(i).length||f(u,[i,e,n])},refSearch:t,isSearchActive:v,isSearchDisabled:p,openResultNode:a,resultType:u,isTreeUI:"tree"===u}}(e),w=k.searchFn,M=k.isSearchActive,V=k.refSearch,K=k.openResultNode,q=k.isTreeUI;k.isSearchDisabled||(0,o.watch)([V],(function(){l.data.forEach((function(n){var t=w(A(n,e),n);y(n,s.IS_MATCH,t),K&&B(n,!0,!0)}))}));var Y=(0,o.computed)((function(){return l.data.filter((function(e){return S(e)&&function(e){return!M.value||(g(e,s.IS_MATCH)||!!q&&u.value.some((function(n){return n[s.PATH].startsWith(T(e))&&n[s.IS_MATCH]})))}(e)}))})),G=function(e,n,i,a,l,u){var d=e.selected,f=I(i,e),p=f.setNodeAttr,v=f.getNodePath,y=f.getSchemaVal,N=f.getNodeAttr,S=f.getNodeId,g=f.isRootNode,T=f.hasChildNode,m=f.isItemOpen,E=f.isNodeOpened,P=f.isNodeLoading,O=f.resolveScopedSlotParam,D=f.extendNodeAttr,C=u.registerNextLoop,R=H(e,i),j=R.asyncNodeClick,k=R.deepAutoOpen,w=function(e){if("string"==typeof e)return e;if("object"===h(e)&&null!==e){if(e.__v_isVNode)return e;var n=e.node,t=e.className,r=e.text,i=e.style;return(0,o.h)(n,{class:t,style:i},r)}return null},M=function(t){if(n.slots.nodeAction)return n.slots.nodeAction(D(t));var r=null;return P(t)?function(e){var t,r,i;return(null!==(i=null===(r=(t=n.slots).nodeLoading)||void 0===r?void 0:r.call(t,D(e)))&&void 0!==i?i:P(e))?(0,o.createVNode)(_.Spinner,null,null):""}(t):"function"==typeof e.prefixIcon&&"default"!==(r=e.prefixIcon(D(t),"node_action"))?w(r):("default"===r||"boolean"==typeof e.prefixIcon&&e.prefixIcon)&&(T(t)||t.async||!e.autoCheckChildren)?m(t)?(0,o.createVNode)(_.DownShape,null,null):(0,o.createVNode)(_.RightShape,null,null):null},V=function(t){if(n.slots.nodeType)return n.slots.nodeType(D(t));var i=null;return"function"==typeof e.prefixIcon&&"default"!==(i=e.prefixIcon(D(t),"node_type"))?w(i):"default"===i||"boolean"==typeof e.prefixIcon&&e.prefixIcon?g(t)||T(t)?function(e){return m(e)?(0,o.createVNode)(_.FolderShapeOpen,{class:(0,r.resolveClassName)("tree-icon")},null):(0,o.createVNode)(_.Folder,{class:(0,r.resolveClassName)("tree-icon")},null)}(t):(0,o.createVNode)(_.TextFile,{class:(0,r.resolveClassName)("tree-icon")},null):null},K=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],l=null===r?!m(e):!!r;if(l||a.value.filter((function(n){return String.prototype.startsWith.call(v(n),v(e))})).forEach((function(e){return p(e,s.IS_OPEN,l)})),p(e,s.IS_OPEN,l),i){var u=m(e)?t.NODE_EXPAND:t.NODE_COLLAPSE;n.emit(u,e,O(e),y(e[s.UUID]),o)}},q=function(e,n,t){Array.isArray(e)?e.forEach((function(e){return p(x(e),n,t)})):p(x(e),n,t)},Y=function e(n){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=x(n);if(!o[s.IS_NULL])if(r)if(t){if(q(o,s.IS_OPEN,!0),!g(o)){e(N(o,s.PARENT_ID),!0,!0)}}else K(o,!1,null,!1);else q(o,s.IS_OPEN,t)},G=function(e,n){E(e)?K(e,!1,n):j(e).finally((function(){N(e,s.IS_LOADING)?C("setNodeOpenedAfterLoading",{type:"once",fn:function(){return K(e,!0,n)}}):K(e,!0,n)}))},X=function n(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=Array.isArray(t)?t:[t];if(a.length){var l=x(a[0]);l[s.IS_NULL]||(e.selectable?(null!=d&&p(c({},s.UUID,d),s.IS_SELECTED,!r),e.selected&&e.selected!==d&&p(c({},s.UUID,e.selected),s.IS_SELECTED,!r),p(l,s.IS_SELECTED,r),d=S(l),i&&1===a.length&&Y(l,!0,!0),N(l,s.IS_ASYNC)&&j(l).then((function(){(0,o.nextTick)((function(){a.shift(),n(a,r,i)}))}))):console.warn("props.selectable is false or undefined, please set selectable with true"))}},z=function(n){if(!e.levelLine)return null;var t=N(n,s.DEPTH)+1;return new Array(t).fill("").map((function(e,n){return n})).filter((function(e){return function(e,n){if(g(n))return!1;var t=v(n),r="".concat(t).split("-").slice(0,e+1);if(r.join("-")===t)return!0;var o=r.pop(),i=parseInt(o,10);r.push("".concat(i+1));var a=r.join("-");return l.value.some((function(e){return e[s.PATH]===a}))}(e,n)})).filter((function(e){return e>0})).map((function(e){return(0,o.createVNode)("span",{class:"node-virtual-line",style:(n=t-e,{"--depth":n})},null);var n}))};return{renderTreeNode:function(a){var l,u,c,d,f;return(0,o.createVNode)("div",{"data-tree-node":S(a),class:U(a,i.schema)},[(0,o.createVNode)("div",{class:L(a,i.schema,e),style:b(a,e,i),onClick:function(e){return function(e,r){X(e,!0,!1),E(e)||G(e,r);var o=t.NODE_CLICK;n.emit(o,e,O(e),y(e[s.UUID]),r)}(a,e)}},[(0,o.createVNode)("span",{class:(0,r.resolveClassName)("node-action"),onClick:function(e){return function(e,n){e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),G(n,e)}(e,a)}},[M(a)]),(0,o.createVNode)("span",{class:(0,r.resolveClassName)("node-content")},[[V(a)],(0,o.createVNode)("span",{class:(0,r.resolveClassName)("node-text")},[null!==(c=null===(u=(l=n.slots).node)||void 0===u?void 0:u.call(l,D(a)))&&void 0!==c?c:[A(a,e)]]),null===(f=(d=n.slots).nodeAppend)||void 0===f?void 0:f.call(d,D(a))]),z(a)])])},hanldeTreeNodeClick:G,deepAutoOpen:k,asyncNodeClick:j,setNodeAction:q,setNodeOpened:K,setSelect:X,setOpen:Y}}(e,n,l,Y,u,{registerNextLoop:f}),X=G.renderTreeNode,z=G.hanldeTreeNodeClick,J=G.setNodeOpened,B=G.setOpen,F=G.setNodeAction,W=G.setSelect,$=G.asyncNodeClick;d((function(n){W(n,!0,e.autoOpenParentNode)})),n.expose({hanldeTreeNodeClick:z,isNodeChecked:P,isRootNode:m,isNodeOpened:E,isNodeMatched:O,hasChildNode:D,setOpen:B,setChecked:function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];F(x(e),s.IS_CHECKED,n)},setNodeAction:F,setNodeOpened:J,setSelect:W,asyncNodeClick:$,getData:function(){return l}});var Q=(0,o.ref)(),Z=function(e,n){var t=n.slots;return{renderEmpty:function(n){var r,i;return(0,o.createVNode)(N(),{scene:"part",type:n},{default:function(){return[null!==(i=null===(r=t.default)||void 0===r?void 0:r.call(t))&&void 0!==i?i:e.emptyText]}})}}}(e,n),ee=Z.renderEmpty;return function(e,n,t){var r=I(t,e),i=r.getSourceNodeByUID,a=r.getNodeParentIdById,l=r.getParentNodeData,u=r.getNodeAttr,d=r.getNodePath,f=r.isRootNode,p=function(e){return e.target.closest("[data-tree-node]")},v=function e(n){p(n).removeEventListener("mouseup",e)},y=function(e){var n=p(e);n.setAttribute("draggable","true"),n.addEventListener("mouseup",v)},N=function(e){e.preventDefault();var n=p(e),t=e.dataTransfer.getData("node-id"),r=n.getAttribute("data-tree-node"),o=S(t,r)?"move":"none";e.dataTransfer.effectAllowed=o,e.dataTransfer.dropEffect=o},h=function(e){e.dataTransfer.effectAllowed="move",e.dataTransfer.dropEffect="move";var n=p(e);e.dataTransfer.setData("text/plain",""),e.dataTransfer.setData("node-id",n.getAttribute("data-tree-node"))},_=function(n){n.preventDefault(),n.stopPropagation();var t=p(n),r=n.dataTransfer.getData("node-id"),o=t.getAttribute("data-tree-node");Reflect.apply(e.dragSort?g:T,void 0,[r,o])},S=function(e,n){var t=d(c({},s.UUID,e)),r=d(c({},s.UUID,n));return a(e)===a(n)||-1===t.indexOf(r)&&-1===r.indexOf(t)},g=function(n,t){if(S(n,t)){var r=JSON.parse(JSON.stringify(i(n))),o=JSON.parse(JSON.stringify(i(t))),a=l(n),d=l(t),f=u(c({},s.UUID,n),s.INDEX),p=u(c({},s.UUID,t),s.INDEX);null==a||a[e.children].splice(f,1,o),null==d||d[e.children].splice(p,1,r)}},T=function(n,t){var r=i(n),o=i(t),l=null;if(f(c({},s.UUID,n)))l=e.data;else{var d=a(n);if(null!=d){l=i(d);var p=u(c({},s.UUID,n),s.INDEX);null==l||l[e.children].splice(p,1)}}o[e.children]||(o[e.children]=[]),o[e.children].unshift(r)};(0,o.onMounted)((function(){if(e.draggable&&n.value){var t=n.value.$el;t.addEventListener("mousedown",y),t.addEventListener("dragstart",h),t.addEventListener("dragover",N),t.addEventListener("drop",_)}})),(0,o.onUnmounted)((function(){if(e.draggable&&n.value){var t=n.value.$el;t.removeEventListener("mousedown",y),t.removeEventListener("dragstart",h),t.removeEventListener("dragover",N),t.removeEventListener("drop",_)}}))}(e,Q,l),function(){return(0,o.createVNode)(a(),{class:(0,r.resolveClassName)("tree"),style:C(null,e),list:Y.value,lineHeight:e.lineHeight,enabled:e.virtualRender,contentClassName:(0,r.resolveClassName)("container"),throttleDelay:0,ref:Q},{default:function(e){return function(e){if(e.length)return e.map(X);var n=M.value?"search-empty":"empty";return ee(n)}(e.data||[])}})}}}),w=(0,r.withInstall)(k)})(),u})()));
|
1
|
+
!function(e,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n(require("../shared"),require("vue"),require("../virtual-render"),require("vue-types"),require("../exception"),require("../checkbox"),require("../icon"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../virtual-render","vue-types","../exception","../checkbox","../icon"],n);else{var t="object"==typeof exports?n(require("../shared"),require("vue"),require("../virtual-render"),require("vue-types"),require("../exception"),require("../checkbox"),require("../icon")):n(e["../shared"],e.vue,e["../virtual-render"],e["vue-types"],e["../exception"],e["../checkbox"],e["../icon"]);for(var r in t)("object"==typeof exports?exports:e)[r]=t[r]}}(self,((e,n,t,r,o,i,a)=>(()=>{var l={8022:(e,n,t)=>{var r=t(4481),o=t(6426),i=o;i.v1=r,i.v4=o,e.exports=i},8725:e=>{for(var n=[],t=0;t<256;++t)n[t]=(t+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,o=n;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]]].join("")}},9157:e=>{var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var t=new Uint8Array(16);e.exports=function(){return n(t),t}}else{var r=new Array(16);e.exports=function(){for(var e,n=0;n<16;n++)0==(3&n)&&(e=4294967296*Math.random()),r[n]=e>>>((3&n)<<3)&255;return r}}},4481:(e,n,t)=>{var r,o,i=t(9157),a=t(8725),l=0,u=0;e.exports=function(e,n,t){var c=n&&t||0,d=n||[],s=(e=e||{}).node||r,f=void 0!==e.clockseq?e.clockseq:o;if(null==s||null==f){var p=i();null==s&&(s=r=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==f&&(f=o=16383&(p[6]<<8|p[7]))}var v=void 0!==e.msecs?e.msecs:(new Date).getTime(),y=void 0!==e.nsecs?e.nsecs:u+1,_=v-l+(y-u)/1e4;if(_<0&&void 0===e.clockseq&&(f=f+1&16383),(_<0||v>l)&&void 0===e.nsecs&&(y=0),y>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");l=v,u=y,o=f;var N=(1e4*(268435455&(v+=122192928e5))+y)%4294967296;d[c++]=N>>>24&255,d[c++]=N>>>16&255,d[c++]=N>>>8&255,d[c++]=255&N;var h=v/4294967296*1e4&268435455;d[c++]=h>>>8&255,d[c++]=255&h,d[c++]=h>>>24&15|16,d[c++]=h>>>16&255,d[c++]=f>>>8|128,d[c++]=255&f;for(var E=0;E<6;++E)d[c+E]=s[E];return n||a(d)}},6426:(e,n,t)=>{var r=t(9157),o=t(8725);e.exports=function(e,n,t){var i=n&&t||0;"string"==typeof e&&(n="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,n)for(var l=0;l<16;++l)n[i+l]=a[l];return n||o(a)}},5800:e=>{"use strict";e.exports=i},9911:e=>{"use strict";e.exports=o},6870:e=>{"use strict";e.exports=a},4212:n=>{"use strict";n.exports=e},3511:e=>{"use strict";e.exports=t},748:e=>{"use strict";e.exports=n},210:e=>{"use strict";e.exports=r}},u={};function c(e){var n=u[e];if(void 0!==n)return n.exports;var t=u[e]={exports:{}};return l[e](t,t.exports,c),t.exports}c.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return c.d(n,{a:n}),n},c.d=(e,n)=>{for(var t in n)c.o(n,t)&&!c.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},c.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var d={};return(()=>{"use strict";c.r(d),c.d(d,{default:()=>q});var e,n,t,r=c(4212),o=c(748),i=c(3511),a=c.n(i);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function u(e,n,t){return(n=function(e){var n=function(e,n){if("object"!==l(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!==l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===l(n)?n:String(n)}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}!function(e){e.NODE_CLICK="nodeClick",e.NODE_COLLAPSE="nodeCollapse",e.NODE_EXPAND="nodeExpand",e.NODE_CHECKED="nodeChecked",e.NODE_DRAG_START="nodeDragStart",e.NODE_DRAG_OVER="nodeDragOver",e.NODE_DRAG_LEAVE="nodeDragLeave",e.NODE_DROP="nodeDrop"}(t||(t={}));var s,f=function(){return!0},p=(u(e={},t.NODE_CLICK,f),u(e,t.NODE_COLLAPSE,f),u(e,t.NODE_EXPAND,f),u(e,t.NODE_CHECKED,f),u(e,t.NODE_DRAG_START,f),u(e,t.NODE_DRAG_OVER,f),u(e,t.NODE_DRAG_LEAVE,f),u(e,t.NODE_DROP,f),e);!function(e){e.DEPTH="__depth",e.INDEX="__index",e.UUID="__uuid",e.PARENT_ID="__parent_id",e.HAS_CHILD="__has_child",e.PATH="__path",e.IS_ROOT="__is_root",e.ORDER="__order",e.IS_OPEN="__is_open",e.IS_CHECKED="__is_checked",e.IS_SELECTED="__is_selected",e.IS_ASYNC_INIT="__is_async_init",e.IS_MATCH="__is_match",e.IS_NULL="__IS_NULL",e.IS_CACHED="__is_cached",e.IS_ASYNC="__is_async",e.IS_LOADING="__is_loading",e.TREE_NODE_ATTR="__attr__",e.SOURCE_ITEM="__source_item__"}(s||(s={}));var v,y=(u(n={},s.IS_OPEN,"isOpen"),u(n,s.IS_SELECTED,"selected"),u(n,s.IS_MATCH,"isMatch"),u(n,s.HAS_CHILD,"hasChild"),u(n,s.IS_CHECKED,"checked"),u(n,s.IS_ASYNC,"async"),u(n,s.IS_LOADING,"loading"),u(n,s.IS_ROOT,"isRoot"),n);!function(e){e.CLICK="click",e.SELECTED="selected",e.EXPAND="expand",e.COLLAPSE="collapse"}(v||(v={}));var _,N,h,E=c(210);!function(e){e.ONCE="once",e.EVERY="every"}(_||(_={})),function(e){e.FUZZY="fuzzy",e.FULL="full"}(N||(N={})),function(e){e.TREE="tree",e.LIST="list"}(h||(h={}));var I={data:r.PropTypes.arrayOf(r.PropTypes.any).def([]),label:r.PropTypes.oneOfType([r.PropTypes.func.def(void 0),r.PropTypes.string.def("label")]),nodeKey:r.PropTypes.string.def(void 0),children:r.PropTypes.string.def("children"),indent:r.PropTypes.number.def(18),lineHeight:r.PropTypes.number.def(32),levelLine:r.PropTypes.oneOfType([r.PropTypes.bool.def(!1),r.PropTypes.func.def(void 0),r.PropTypes.string.def("1px dashed #c3cdd7")]).def(!1),virtualRender:r.PropTypes.bool.def(!1),prefixIcon:r.PropTypes.oneOfType([r.PropTypes.func.def((function(){})),r.PropTypes.bool.def(!1)]).def(!0),async:r.PropTypes.shape({callback:r.PropTypes.func.def(void 0),cache:r.PropTypes.bool.def(!0),deepAutoOpen:(0,E.toType)("columnType",{}).def(_.ONCE)}),offsetLeft:r.PropTypes.number.def(5),search:r.PropTypes.oneOfType([r.PropTypes.shape({value:r.PropTypes.oneOfType([r.PropTypes.number,r.PropTypes.string,r.PropTypes.bool]).def(""),match:r.PropTypes.oneOfType([(0,E.string)(),r.PropTypes.func]).def(N.FUZZY),resultType:(0,E.string)().def(h.TREE),openResultNode:r.PropTypes.bool}),r.PropTypes.string,r.PropTypes.number,r.PropTypes.bool]).def(void 0),emptyText:r.PropTypes.string.def("没有数据"),draggable:r.PropTypes.bool.def(!1),disableDrag:r.PropTypes.func,disableDrop:r.PropTypes.func,dragSort:r.PropTypes.bool.def(!1),selectable:r.PropTypes.oneOfType([r.PropTypes.bool,r.PropTypes.func]).def(!0),disabledFolderSelectable:r.PropTypes.bool.def(!1),showCheckbox:r.PropTypes.bool.def(!1),showNodeTypeIcon:r.PropTypes.bool.def(!0),selected:r.PropTypes.oneOfType([r.PropTypes.string,r.PropTypes.number,r.PropTypes.object]),autoCheckChildren:r.PropTypes.bool.def(!0),autoOpenParentNode:r.PropTypes.bool.def(!0),expandAll:r.PropTypes.bool.def(!1),nodeContentAction:r.PropTypes.oneOfType([r.PropTypes.arrayOf((0,E.toType)("nodeContentActionType",{}).def(v.CLICK)),r.PropTypes.func.def((function(){return["selected"]}))]).def(["selected","expand","click"]),keepSlotData:r.PropTypes.bool.def(!1)},S=c(9911),D=c.n(S),T=c(5800),g=c.n(T),C=c(6870);const m=function(e,n){var t=function(n){return e.schema.get(n)},r=function(e,n){var r;return null===(r=t(e[s.UUID]))||void 0===r?void 0:r[n]},o=function(n,r,o){e.schema.set(n[s.UUID],Object.assign(Object.assign({},t(n[s.UUID])),u({},r,o)))},i=function(e){return r(e,s.PATH)},a=function(e){return r(e,s.UUID)},c=function(e){return r(e,s.IS_ROOT)},d=function(e){return r(e,s.IS_OPEN)},f=function(e){return r(e,s.HAS_CHILD)},p=function(e){return r(e,s.IS_MATCH)},v=function(e){return r(e,s.IS_CHECKED)},_=function(e){return r(e,s.PARENT_ID)},N=function(e){return r(u({},s.UUID,e),s.PARENT_ID)},h=function(e){var n;return"object"===l(e)?d(e):"string"==typeof e&&(null===(n=t(e))||void 0===n?void 0:n[s.IS_OPEN])},E=function(e){return e.split("-").reduce((function(e,t){var r=Number(t);return Array.isArray(e)?e[r]:e[n.children][r]}),n.data)},I=function(e){return E(i(u({},s.UUID,e)))},S=function(e){var n;return u(n={},y[s.IS_LOADING],r(e,s.IS_LOADING)),u(n,y[s.HAS_CHILD],f(e)),u(n,y[s.IS_MATCH],p(e)),u(n,y[s.IS_CHECKED],v(e)),u(n,y[s.IS_OPEN],d(e)),u(n,y[s.IS_ROOT],c(e)),u(n,"fullPath",r(e,s.PATH)),u(n,"uuid",a(e)),u(n,"parentId",r(e,s.PARENT_ID)),n};return{getSchemaVal:t,getNodeAttr:r,getNodeId:a,getNodeParentId:_,getNodeParentIdById:N,getParentNodeData:function(e){return c(u({},s.UUID,e))?u({},n.children,n.data):I(N(e))},getParentNode:function(e){return t(_(e))},setNodeAttr:o,getNodePath:i,isRootNode:c,isNodeOpened:d,hasChildNode:f,isItemOpen:h,isNodeChecked:v,isNodeMatched:p,isNodeLoading:function(e){return r(e,s.IS_LOADING)},checkNodeIsOpen:function(e){return c(e)||function(e){return h(r(e,s.PARENT_ID))}(e)},getSourceNodeByPath:E,getSourceNodeByUID:I,deleteNodeSchema:function(n){return e.schema.delete(n)},resolveScopedSlotParam:S,setTreeNodeLoading:function(e,n){o(e,s.IS_LOADING,n)},extendNodeAttr:function(e){return Object.assign(Object.assign({},r(e,s.SOURCE_ITEM)),u({},s.TREE_NODE_ATTR,S(e)))},getChildNodes:function(n){var t=e.schema;return Array.prototype.filter.call(Array.from(t.keys()),(function(e){return t.get(e)[s.PARENT_ID]===n[s.UUID]}))},extendNodeScopedData:function(e){return{data:r(e,s.SOURCE_ITEM),attributes:S(e)}}}};function A(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var b="1px dashed #c3cdd7",O=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],a=e[n];return"boolean"==typeof a?a?r:o:P(t,e,n,i)},P=function(e,n,t){var r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=n[t];if("string"==typeof i)return"object"===l(e)&&null!==e?(Object.prototype.hasOwnProperty.call(e,i)||console.error("cannot find node label with key ".concat(i)),e[i]):i;if("function"==typeof i){var a=i.apply(void 0,[e].concat(function(e){if(Array.isArray(e))return A(e)}(r=o)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,n){if(e){if("string"==typeof e)return A(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?A(e,n):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()));return"string"==typeof a?a:void console.error("props label with function return value is not string, please check and return string")}},L=function(e,n){return P(e,n,"label")},U=function(e,n){return e.get(n)||{}},x=function(e,n){return{"--level-line":O(n,"levelLine",e,b,null,["tree"]),"--lineHeight":"".concat(n.lineHeight,"px"),"--indent":"".concat(n.indent,"px"),"--offset-left":"".concat(n.offsetLeft,"px")}},R=function(e,n){var t=function(e,n,t){var r;return null===(r=U(e,n))||void 0===r?void 0:r[t]}((arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).schema,e[s.UUID],s.DEPTH);return Object.assign({"--depth":t},"function"==typeof n.levelLine?{"--level-line":O(n,"levelLine",e,b,null,["node"])}:{})},k=function(e,n,t){var r=U(n,e[s.UUID])||{};return{"is-root":r.__is_root,"bk-tree-node":!0,"is-open":r.__is_open,"is-virtual-render":t.virtualRender,"level-line":t.levelLine}},H=function(e,n){var t=U(n,e[s.UUID])||{};return u({"is-checked":t.__is_checked,"is-selected":t.__is_selected,"node-folder":e.is_folder,"node-leaf":e.is_leaf},(0,r.resolveClassName)("node-row"),!0)},w=function(e){return null==e?{__IS_NULL:!0}:"string"==typeof e||"number"==typeof e||"symbol"===l(e)?u({},s.UUID,e):(Object.prototype.hasOwnProperty.call(e,s.UUID)||console.error("setNodeAction Error: node id cannot found"),e)};const j=function(e,n){var t=m(n,e),r=t.setNodeAttr,o=t.getNodePath,i=t.getNodeAttr,a=t.resolveScopedSlotParam,c=t.setTreeNodeLoading,d=function(n,t){if("object"===l(n)&&null!==n){r(t,s.IS_OPEN,!0);var i=Array.isArray(n)?n:[n];return function(e,n,t,r,o){!function(e,n,t,r){var o=e.split("-").reduce((function(e,n){var r=Number(n);return Array.isArray(e)?e[r]:e[t][r]}),n);Object.assign(o,r||{})}(e,n,t,u({},r,o))}(o(t),e.data,e.children,e.children,i),Promise.resolve(n)}return Promise.resolve(n)},f=function(n){var t=e.async||{},o=t.callback,u=void 0===o?null:o,f=t.cache,p=void 0===f||f;if("function"==typeof u&&i(n,s.IS_ASYNC)){if(r(n,s.IS_ASYNC_INIT,!0),!i(n,s.IS_CACHED)){r(n,s.IS_CACHED,p);var v=a(n),y=u(n,(function(e){return d(e,n)}),v);if("object"===l(y)&&null!==y)return c(n,!0),y instanceof Promise?Promise.resolve(y.then((function(e){return d(e,n)})).catch((function(e){return console.error("load remote data error:",e)})).finally((function(){c(n,!1),r(n,s.IS_CACHED,!0)}))):(d(y,n),c(n,!1),Promise.resolve(!0))}return Promise.resolve(!0)}return Promise.resolve(!0)};return{asyncNodeClick:f,deepAutoOpen:function e(){var t=n.data.filter((function(e){return i(e,s.IS_ASYNC)&&e[y[s.IS_OPEN]]&&!i(e,s.IS_ASYNC_INIT)}));t.length&&Promise.all(t.map((function(e){return f(e)}))).then((function(){e()})).catch((function(e){console.warn(e)}))}}},V=function(e,n,i,a,c,d){var f=e.selected,p=m(i,e),v=p.setNodeAttr,y=p.getNodePath,_=p.getSchemaVal,N=p.getNodeAttr,h=p.getNodeId,E=p.getChildNodes,I=p.isRootNode,S=p.hasChildNode,D=p.isItemOpen,T=p.isNodeOpened,A=p.isNodeLoading,b=p.isNodeChecked,O=p.getParentNode,P=p.resolveScopedSlotParam,U=p.extendNodeAttr,x=p.extendNodeScopedData,V=d.registerNextLoop,M=j(e,i),K=M.asyncNodeClick,G=M.deepAutoOpen,q=function(e){if("string"==typeof e)return e;if("object"===l(e)&&null!==e){if(e.__v_isVNode)return e;var n=e.node,t=e.className,r=e.text,i=e.style;return(0,o.h)(n,{class:t,style:i},r)}return null},Y=function(t){if(n.slots.nodeAction)return n.slots.nodeAction(ie(t));var i=null;return A(t)?function(e){var t,r,i;return(null!==(i=null===(r=(t=n.slots).nodeLoading)||void 0===r?void 0:r.call(t,ie(e)))&&void 0!==i?i:A(e))?(0,o.createVNode)(C.Spinner,null,null):""}(t):"function"==typeof e.prefixIcon&&"default"!==(i=e.prefixIcon(ie(t),"node_action"))?q(i):("default"===i||"boolean"==typeof e.prefixIcon&&e.prefixIcon)&&(S(t)||t.async||!e.autoCheckChildren)?D(t)?(0,o.createVNode)(C.DownShape,{class:(0,r.resolveClassName)("node-prefix")},null):(0,o.createVNode)(C.RightShape,{class:(0,r.resolveClassName)("node-prefix")},null):null},F=function(t){if(!e.showNodeTypeIcon)return null;if(n.slots.nodeType)return n.slots.nodeType(ie(t));var i=null;return"function"==typeof e.prefixIcon&&"default"!==(i=e.prefixIcon(ie(t),"node_type"))?q(i):"default"===i||"boolean"==typeof e.prefixIcon&&e.prefixIcon?I(t)||S(t)?function(e){return D(e)?(0,o.createVNode)(C.FolderShapeOpen,{class:[(0,r.resolveClassName)("tree-icon"),(0,r.resolveClassName)("node-prefix")]},null):(0,o.createVNode)(C.Folder,{class:[(0,r.resolveClassName)("tree-icon"),(0,r.resolveClassName)("node-prefix")]},null)}(t):(0,o.createVNode)(C.TextFile,{class:[(0,r.resolveClassName)("tree-icon"),(0,r.resolveClassName)("node-prefix")]},null):null},X=function e(n,t){var r=O(n);r&&(v(r,s.IS_CHECKED,t),I(r)||e(r,t))},z=function e(n,t,r){E(n).forEach((function(n){v(u({},s.UUID,n),t,r),e(u({},s.UUID,n),t,r)}))},B=function(e,r){v(e,s.IS_CHECKED,!!r),z(e,s.IS_CHECKED,!!r),X(e,r),n.emit(t.NODE_CHECKED,c.value.filter((function(e){return b(e)})).map((function(e){return e[s.UUID]})))},W=function(e){return b(e)&&!c.value.filter((function(n){var t;return null===(t=y(n))||void 0===t?void 0:t.startsWith(y(e))})).every((function(e){return b(e)}))},J=function(e){return b(e)||c.value.filter((function(n){var t;return null===(t=y(n))||void 0===t?void 0:t.startsWith(y(e))})).some((function(e){return b(e)}))},Z=function(n){return e.showCheckbox?(0,o.createVNode)(g(),{size:"small",modelValue:J(n),indeterminate:W(n),onChange:function(e){return B(n,!!e)}},null):null},$=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=null===r?!D(e):!!r;if(a||z(e,s.IS_OPEN,a),v(e,s.IS_OPEN,a),i){var l=D(e)?t.NODE_EXPAND:t.NODE_COLLAPSE,u=N(e,s.SOURCE_ITEM);n.emit(l,u,P(e),_(e[s.UUID]),o)}},Q=function(e,n,t){Array.isArray(e)?e.forEach((function(e){return v(w(e),n,t)})):v(w(e),n,t)},ee=function e(n){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=w(n);o[s.IS_NULL]||(r?t?(Q(o,s.IS_OPEN,!0),I(o)||e(N(o,s.PARENT_ID),!0,!0)):$(o,!1,null,!1):Q(o,s.IS_OPEN,t))},ne=function(e,n){T(e)?$(e,!1,n):K(e).finally((function(){N(e,s.IS_LOADING)?V("setNodeOpenedAfterLoading",{type:"once",fn:function(){return $(e,!0,n)}}):$(e,!0,n)}))},te=function n(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=Array.isArray(t)?t:[t];if(a.length){var l=w(a[0]);l[s.IS_NULL]||(!e.selectable||"function"==typeof e.selectable&&!e.selectable(t)||e.disabledFolderSelectable&&!0===(null==t?void 0:t.is_folder)?console.warn("props.selectable is false or undefined, please set selectable with true"):(null!=f&&v(u({},s.UUID,f),s.IS_SELECTED,!r),e.selected&&e.selected!==f&&v(u({},s.UUID,e.selected),s.IS_SELECTED,!r),v(l,s.IS_SELECTED,r),f=h(l),i&&1===a.length&&ee(l,!0,!0),N(l,s.IS_ASYNC)&&K(l).then((function(){(0,o.nextTick)((function(){a.shift(),n(a,r,i)}))}))))}},re=function(n){if(!e.levelLine)return null;var t=N(n,s.DEPTH)+1;return new Array(t).fill("").map((function(e,n){return n})).filter((function(e){return function(e,n){if(I(n))return!1;var t=y(n),r="".concat(t).split("-").slice(0,e+1);if(r.join("-")===t)return!0;var o=r.pop(),i=parseInt(o,10);r.push("".concat(i+1));var a=r.join("-");return c.value.some((function(e){return e[s.PATH]===a}))}(e,n)})).filter((function(e){return e>0})).map((function(e){return(0,o.createVNode)("span",{class:"node-virtual-line",style:(n=t-e,{"--depth":n})},null);var n}))},oe=function(t){var r,o,i,a;return n.slots.node?null===(o=(r=n.slots).node)||void 0===o?void 0:o.call(r,ie(t)):n.slots.default?null===(a=(i=n.slots).default)||void 0===a?void 0:a.call(i,x(t)):[L(t,e)]},ie=function(n){return e.keepSlotData?x(n):U(n)};return{renderTreeNode:function(a){var l,u;return(0,o.createVNode)("div",{"data-tree-node":h(a),key:h(a),class:H(a,i.schema)},[(0,o.createVNode)("div",{class:k(a,i.schema,e),style:R(a,e,i),onClick:function(r){return function(r,o){var i,a=(i=r,"function"==typeof e.nodeContentAction?Reflect.apply(e.nodeContentAction,void 0,[{node:i}]):"string"==typeof e.nodeContentAction?[e.nodeContentAction]:Array.isArray(e.nodeContentAction)?e.nodeContentAction:["selected","expand","click"]);if(a.includes("selected")&&te(r,!0,!1),a.includes("expand")&&(T(r)||ne(r,o)),a.includes("collapse")&&T(r)&&ne(r,o),a.includes("click")){var l=t.NODE_CLICK,u=N(r,s.SOURCE_ITEM);n.emit(l,u,P(r),_(r[s.UUID]),o)}}(a,r)}},[(0,o.createVNode)("div",{class:[(0,r.resolveClassName)("node-action")],onClick:function(e){return function(e,n){e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),ne(n,e)}(e,a)}},[Y(a)]),(0,o.createVNode)("div",{class:(0,r.resolveClassName)("node-content")},[[Z(a),F(a)],(0,o.createVNode)("span",{class:(0,r.resolveClassName)("node-text")},[oe(a)]),null===(u=(l=n.slots).nodeAppend)||void 0===u?void 0:u.call(l,ie(a))]),re(a)])])},handleTreeNodeClick:ne,deepAutoOpen:G,asyncNodeClick:K,setNodeAction:Q,setNodeOpened:$,setSelect:te,setOpen:ee}};var M=c(8022),K=void 0;const G=(0,o.defineComponent)({name:"Tree",props:I,emits:p,setup:function(e,n){var i=function(e){var n,t=function(e){var n,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=e.data,i=e.children,a=[],c=[],d=0,f=new Map;function p(e,n,t,r){if(null!=e&&f.has(e)&&![s.UUID,s.PARENT_ID].includes(n)){var o=f.get(e);Object.prototype.hasOwnProperty.call(o,n)&&"function"==typeof r&&Reflect.apply(r,self,[o,n,t])&&(Object.assign(o,u({},n,t)),p(o[s.PARENT_ID],n,t,r))}}function v(n){var t=null;return"string"==typeof e.nodeKey&&(t=n[e.nodeKey]||(0,M.v4)()),t||n[s.UUID]||(0,M.v4)()}var _=(u(n={},s.IS_OPEN,(function(){return!!e.expandAll})),u(n,s.IS_CHECKED,(function(){return!1})),u(n,s.IS_MATCH,(function(){return!0})),u(n,s.IS_SELECTED,(function(n){return e.selected===n})),u(n,s.IS_CACHED,(function(){return!1})),u(n,s.IS_ASYNC,(function(){return null})),u(n,s.IS_LOADING,(function(){return!1})),n);function N(e,n,t){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,i=o;void 0===o&&"function"==typeof _[t]&&(i=_[t](e,n));var a=y[t];if(Object.prototype.hasOwnProperty.call(n,a))return n[a];var l=(r||[]).find((function(n){return n[s.UUID]===e})),u=void 0;return l&&(u=l[t]),null==u&&(u=i),u}function h(n,t){return!!e.selectable&&N(n,t,s.IS_SELECTED,e.selected===n)}function E(e,n,t){var r,o=N(e,n,s.IS_OPEN),i=!f.has(t)||(null===(r=f.get(t))||void 0===r?void 0:r[s.IS_OPEN]);return o&&i}function I(e){return!e[s.IS_OPEN]}return function n(t){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,y=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,_=t.length,S=0;S<_;S++){var D=t[S];if(Array.isArray(D))n(D,r,o,y);else if("object"===l(D)&&null!==D){var T,g,C=null!==y?"".concat(y,"-").concat(S):"".concat(S),m="".concat(v(D)),A=!!(D[i]||[]).length,b=N(m,D,s.IS_OPEN);e.autoOpenParentNode?b&&p(o,s.IS_OPEN,!0,I):b=E(m,D,o);var O=e.showCheckbox&&N(m,D,s.IS_CHECKED);O&&a.push(m),f.set(m,(u(T={},s.DEPTH,r),u(T,s.INDEX,S),u(T,s.UUID,m),u(T,s.PARENT_ID,o),u(T,s.HAS_CHILD,A),u(T,s.PATH,C),u(T,s.IS_ROOT,null===o),u(T,s.ORDER,d),u(T,s.IS_SELECTED,h(m,D)),u(T,s.IS_MATCH,N(m,D,s.IS_MATCH)),u(T,s.IS_OPEN,b),u(T,s.IS_CHECKED,O),u(T,s.IS_CACHED,N(m,D,s.IS_CACHED)),u(T,s.IS_ASYNC,N(m,D,s.IS_ASYNC)),u(T,s.IS_LOADING,N(m,D,s.IS_LOADING)),u(T,s.SOURCE_ITEM,D),u(T,i,null),T)),d+=1,c.push((u(g={},s.UUID,m),u(g,e.label,D[e.label]),u(g,s.IS_OPEN,b),u(g,i,null),g)),Object.prototype.hasOwnProperty.call(D,i)&&n(D[i]||[],r+1,m,C)}}}(t||o),e.showCheckbox&&(null==a||a.forEach((function(e){Array.from(f.values()).filter((function(n){var t;return null===(t=n[s.PATH])||void 0===t?void 0:t.startsWith(f.get(e)[s.PATH])})).forEach((function(e){return Object.assign(e,u({},s.IS_CHECKED,!0))})),p(e,s.IS_CHECKED,!0,(function(){return!0}))}))),[c,f]},r=t(e),i=new Map,a=[],c=[],d=(0,o.reactive)({data:r[0],schema:r[1],levelLineSchema:{}}),f=(0,o.computed)((function(){return Array.from(d.schema.values())})),p=j(e,d),v=p.asyncNodeClick,_=p.deepAutoOpen,N=function(e,n){(!(arguments.length>2&&void 0!==arguments[2])||arguments[2])&&i.has(e)&&i.delete(e),i.set(e,n)},h=function(e){var n,t=function(e){return"function"==typeof e?{type:"loop",fn:e}:"object"===l(e)&&"string"==typeof e.type&&"function"==typeof e.fn?e:(console.error("loop event error",e),null)}(e);return null!==t&&Reflect.apply(t.fn,K,[]),null!==(n=null==t?void 0:t.type)&&void 0!==n?n:"once"};return(0,o.watch)((function(){return[e.data]}),(function(n){var r,o,a=t(e,n,f.value);d.data=a[0],d.schema=a[1],(null===(r=e.async)||void 0===r?void 0:r.callback)&&"every"===(null===(o=e.async)||void 0===o?void 0:o.deepAutoOpen)&&_(),Array.from(i.keys()).forEach((function(e){var n=i.get(e);if(Array.isArray(n)){var t=[];n.forEach((function(e,n){"once"===h(e)&&t.unshift(n)})),t.length&&t.forEach((function(e){return n.splice(e,1)})),0===n.length&&i.delete(e)}else"once"===h(n)&&i.delete(e)}))}),{deep:!0}),e.selectable&&(0,o.onMounted)((function(){(0,o.watch)((function(){return e.selected}),(function(e){c.length=0,a.forEach((function(n){Reflect.apply(n,K,[e]),c.push((function(){return Reflect.apply(n,K,[e])}))})),N("afterSelectWatch",c)}),{immediate:!0})})),(null===(n=e.async)||void 0===n?void 0:n.callback)&&_(),{flatData:d,schemaValues:f,asyncNodeClick:v,deepAutoOpen:_,afterDataUpdate:function(e){N("afterDataUpdate",e)},registerNextLoop:N,onSelected:function(e){a.push(e)}}}(e),c=i.flatData,d=i.schemaValues,f=i.onSelected,p=i.registerNextLoop,v=m(c,e),_=v.setNodeAttr,N=v.checkNodeIsOpen,h=v.getNodeAttr,E=v.getNodePath,I=v.isRootNode,S=v.isNodeOpened,T=v.isNodeChecked,g=v.isNodeMatched,C=v.hasChildNode,A=function(e){var n,t=(0,o.toRef)(e,"search"),r=null!==(n=e.search)&&void 0!==n?n:{},i=r.openResultNode,a=void 0!==i&&i,u=r.resultType,c=void 0===u?"tree":u,d=function(e){return["string","number","boolean"].includes(l(e))},s=function(e,n){return e===n},f=function(e,n){return new RegExp("".concat(e),"i").test("".concat(n))},p=function(e,n){return Reflect.apply(e,void 0,n)},v=void 0===t.value||!1===t.value,y=(0,o.computed)((function(){return!1!==t.value&&(d(t.value)?"".concat(t.value).length>0:"object"===l(t.value))}));return{searchFn:function(e,n){if(v)return!0;if(d(t.value))return p(f,[t.value,e,n]);var r=t.value,o=r.value,i=void 0===o?"":o,a=r.match,l=void 0===a?"fuzzy":a,u="function"==typeof l?l:"fuzzy"===l?f:s;return 0==="".concat(i).length||p(u,[i,e,n])},refSearch:t,isSearchActive:y,isSearchDisabled:v,openResultNode:a,resultType:c,isTreeUI:"tree"===c}}(e),b=A.searchFn,O=A.isSearchActive,P=A.refSearch,U=A.openResultNode,R=A.isTreeUI;A.isSearchDisabled||(0,o.watch)([P],(function(){c.data.forEach((function(n){var t=b(L(n,e),n);_(n,s.IS_MATCH,t),U&&F(n,!0,!0)}))}));var k=(0,o.computed)((function(){return c.data.filter((function(e){return N(e)&&function(e){return!O.value||(h(e,s.IS_MATCH)||!!R&&d.value.some((function(n){var t;return(null===(t=n[s.PATH])||void 0===t?void 0:t.startsWith(E(e)))&&n[s.IS_MATCH]})))}(e)}))})),H=V(e,n,c,0,d,{registerNextLoop:p}),G=H.renderTreeNode,q=H.handleTreeNodeClick,Y=H.setNodeOpened,F=H.setOpen,X=H.setNodeAction,z=H.setSelect,B=H.asyncNodeClick;f((function(n){z(n,!0,e.autoOpenParentNode)})),n.expose({handleTreeNodeClick:q,isNodeChecked:T,isRootNode:I,isNodeOpened:S,isNodeMatched:g,hasChildNode:C,setOpen:F,setChecked:function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];X(w(e),s.IS_CHECKED,n)},setNodeAction:X,setNodeOpened:Y,setSelect:z,asyncNodeClick:B,getData:function(){return c}});var W=(0,o.ref)(),J=function(e,n){var t=n.slots;return{renderEmpty:function(n){var r,i;return(0,o.createVNode)(D(),{scene:"part",type:n},{default:function(){return[null!==(i=null===(r=t.default)||void 0===r?void 0:r.call(t))&&void 0!==i?i:e.emptyText]}})}}}(e,n),Z=J.renderEmpty;return function(e,n,r,i){var a=m(i,e),l=a.getSourceNodeByUID,c=a.getNodeParentIdById,d=a.getParentNodeData,f=a.extendNodeAttr,p=a.getNodeAttr,v=a.getNodePath,y=a.isRootNode,_=(0,o.computed)((function(){return"function"==typeof e.disableDrag})),N=(0,o.computed)((function(){return"function"==typeof e.disableDrop})),h=function(e){return e.target.closest("[data-tree-node]")},E=function(e){var n,t=null===(n=null==e?void 0:e.dataset)||void 0===n?void 0:n.treeNode;return l(t)},I=function e(n){h(n).removeEventListener("mouseup",e)},S=function(n){var t=h(n),r=E(t);!1===r.draggable||_.value&&e.disableDrag(r)?t.classList.add("bk-tree-drag-disabled"):(t.setAttribute("draggable","true"),t.addEventListener("mouseup",I))},D=function(r){r.preventDefault();var o=h(r),i=f(E(o));if(n.emit(t.NODE_DRAG_OVER,r,o,i),N.value&&(null==e?void 0:e.disableDrop(i)))return r.dataTransfer.effectAllowed="move",r.dataTransfer.dropEffect="none",void o.classList.add("bk-tree-drop-disabled");o.classList.add("bk-tree-drop-active");var a=r.dataTransfer.getData("node-id"),l=o.getAttribute("data-tree-node"),u=C(a,l)?"move":"none";r.dataTransfer.effectAllowed=u,r.dataTransfer.dropEffect=u},T=function(e){e.dataTransfer.effectAllowed="move",e.dataTransfer.dropEffect="move";var r=h(e);e.dataTransfer.setData("text/plain",""),e.dataTransfer.setData("node-id",r.getAttribute("data-tree-node")),n.emit(t.NODE_DRAG_START,e,r)},g=function(r){r.preventDefault(),r.stopPropagation();var o=h(r);o.classList.remove("bk-tree-drop-active","bk-tree-drop-disabled");var i=f(E(o));if(!N.value||!e.disableDrop(i)){var a=r.dataTransfer.getData("node-id"),l=o.getAttribute("data-tree-node");Reflect.apply(e.dragSort?A:b,void 0,[a,l]),n.emit(t.NODE_DROP,r,o,i)}},C=function(e,n){var t=v(u({},s.UUID,e)),r=v(u({},s.UUID,n));return c(e)===c(n)||-1===t.indexOf(r)&&-1===r.indexOf(t)},A=function(n,t){if(C(n,t)){var r=JSON.parse(JSON.stringify(l(n))),o=JSON.parse(JSON.stringify(l(t))),i=d(n),a=d(t),c=p(u({},s.UUID,n),s.INDEX),f=p(u({},s.UUID,t),s.INDEX);null==i||i[e.children].splice(c,1,o),null==a||a[e.children].splice(f,1,r)}},b=function(n,t){var r=l(n),o=l(t),i=null;if(y(u({},s.UUID,n)))i=e.data;else{var a=c(n);if(null!=a){i=l(a);var d=p(u({},s.UUID,n),s.INDEX);null==i||i[e.children].splice(d,1)}}o[e.children]||(o[e.children]=[]),o[e.children].unshift(r)},O=function(e){e.preventDefault();var r=h(e);r.classList.remove("bk-tree-drop-active","bk-tree-drop-disabled"),n.emit(t.NODE_DRAG_LEAVE,e,r)};(0,o.onMounted)((function(){if(e.draggable&&r.value){var n=r.value.$el;n.addEventListener("mousedown",S),n.addEventListener("dragstart",T),n.addEventListener("dragover",D),n.addEventListener("dragleave",O),n.addEventListener("drop",g)}})),(0,o.onUnmounted)((function(){if(e.draggable&&r.value){var n=r.value.$el;n.removeEventListener("mousedown",S),n.removeEventListener("dragstart",T),n.removeEventListener("dragover",D),n.removeEventListener("dragleave",O),n.removeEventListener("drop",g)}}))}(e,n,W,c),function(){return(0,o.createVNode)(a(),{class:(0,r.resolveClassName)("tree"),style:x(null,e),list:k.value,lineHeight:e.lineHeight,enabled:e.virtualRender,contentClassName:(0,r.resolveClassName)("container"),throttleDelay:0,ref:W},{default:function(e){return function(e){var t,r,o;if(e.length)return e.map(G);var i=O.value?"search-empty":"empty";return null!==(o=null===(r=(t=n.slots).empty)||void 0===r?void 0:r.call(t))&&void 0!==o?o:Z(i)}(e.data||[])}})}}}),q=(0,r.withInstall)(G)})(),d})()));
|
package/lib/tree/props.d.ts
CHANGED
@@ -1,4 +1,12 @@
|
|
1
1
|
import { ExtractPropTypes } from 'vue';
|
2
|
+
declare enum TreeSearchMatchEnum {
|
3
|
+
FUZZY = "fuzzy",
|
4
|
+
FULL = "full"
|
5
|
+
}
|
6
|
+
declare enum TreeSearchResultEnum {
|
7
|
+
TREE = "tree",
|
8
|
+
LIST = "list"
|
9
|
+
}
|
2
10
|
/**
|
3
11
|
* Tree Prop: prefixIcon function
|
4
12
|
* @param {} isRoot 是否为分跟节点
|
@@ -7,7 +15,7 @@ import { ExtractPropTypes } from 'vue';
|
|
7
15
|
* @param {} renderType 当前渲染类型(action: 用来标识当前节点状态,展开 | 收起, node_type:节点类型,文件、文件夹)
|
8
16
|
* @param {} item 当前节点数据
|
9
17
|
*/
|
10
|
-
export
|
18
|
+
export type IPrefixIcon = (isRoot: boolean, hasChild: boolean, isOpen: boolean, renderType: string, item: any) => any;
|
11
19
|
export declare const treeProps: {
|
12
20
|
/**
|
13
21
|
* 渲染列表
|
@@ -107,6 +115,12 @@ export declare const treeProps: {
|
|
107
115
|
} & {
|
108
116
|
default: boolean;
|
109
117
|
};
|
118
|
+
disableDrag: import("vue-types").VueTypeValidableDef<(...args: any[]) => any> & {
|
119
|
+
default: (...args: any[]) => any;
|
120
|
+
};
|
121
|
+
disableDrop: import("vue-types").VueTypeValidableDef<(...args: any[]) => any> & {
|
122
|
+
default: (...args: any[]) => any;
|
123
|
+
};
|
110
124
|
/**
|
111
125
|
* 节点拖拽时可交换位置(开启拖拽可交换位置后将不支持改变层级)
|
112
126
|
*/
|
@@ -118,7 +132,26 @@ export declare const treeProps: {
|
|
118
132
|
/**
|
119
133
|
* 节点是否可以选中
|
120
134
|
*/
|
121
|
-
selectable: import("vue-types").
|
135
|
+
selectable: import("vue-types").VueTypeDef<any> & {
|
136
|
+
default: any;
|
137
|
+
};
|
138
|
+
disabledFolderSelectable: import("vue-types").VueTypeValidableDef<boolean> & {
|
139
|
+
default: boolean;
|
140
|
+
} & {
|
141
|
+
default: boolean;
|
142
|
+
};
|
143
|
+
/**
|
144
|
+
* 是否支持多选
|
145
|
+
*/
|
146
|
+
showCheckbox: import("vue-types").VueTypeValidableDef<boolean> & {
|
147
|
+
default: boolean;
|
148
|
+
} & {
|
149
|
+
default: boolean;
|
150
|
+
};
|
151
|
+
/**
|
152
|
+
* 是否显示节点类型Icon
|
153
|
+
*/
|
154
|
+
showNodeTypeIcon: import("vue-types").VueTypeValidableDef<boolean> & {
|
122
155
|
default: boolean;
|
123
156
|
} & {
|
124
157
|
default: boolean;
|
@@ -128,11 +161,7 @@ export declare const treeProps: {
|
|
128
161
|
*/
|
129
162
|
selected: import("vue-types").VueTypeDef<string | number | {
|
130
163
|
[key: string]: any;
|
131
|
-
}
|
132
|
-
default: string | number | (() => {
|
133
|
-
[key: string]: any;
|
134
|
-
});
|
135
|
-
};
|
164
|
+
}>;
|
136
165
|
/**
|
137
166
|
* 是否自动检查当前节点是否有子节点
|
138
167
|
* 节点前面的展开收起Icon会根据判定值做改变
|
@@ -152,17 +181,44 @@ export declare const treeProps: {
|
|
152
181
|
} & {
|
153
182
|
default: boolean;
|
154
183
|
};
|
184
|
+
/**
|
185
|
+
* 默认是否展开所有节点
|
186
|
+
*/
|
187
|
+
expandAll: import("vue-types").VueTypeValidableDef<boolean> & {
|
188
|
+
default: boolean;
|
189
|
+
} & {
|
190
|
+
default: boolean;
|
191
|
+
};
|
192
|
+
/**
|
193
|
+
* 节点内容点击行为
|
194
|
+
* 此处配置每个节点除了展开\收起箭头之外的内容块时的行为
|
195
|
+
* 默认为 ['selected', 'expand', 'click'],点击内容块为选中当前节点
|
196
|
+
*/
|
197
|
+
nodeContentAction: import("vue-types").VueTypeDef<any> & {
|
198
|
+
default: any;
|
199
|
+
};
|
200
|
+
/**
|
201
|
+
* 是否作用域插槽抛出参数是否保持源数据的引用
|
202
|
+
* 如果设置为true,则作用域插槽参数格式为: { data: node, attributes: {} }
|
203
|
+
* 如果设置为false,则作用域插槽参数格式为: { ...node, ...attributes }
|
204
|
+
* attributes 为节点内置属性,包含节点是否展开,是否选中,是否有子节点等等
|
205
|
+
*/
|
206
|
+
keepSlotData: import("vue-types").VueTypeValidableDef<boolean> & {
|
207
|
+
default: boolean;
|
208
|
+
} & {
|
209
|
+
default: boolean;
|
210
|
+
};
|
155
211
|
};
|
156
|
-
|
212
|
+
type AsyncOption = {
|
157
213
|
callback: (item: any, cb: any) => Promise<any>;
|
158
214
|
cache: Boolean;
|
159
215
|
deepAutoOpen?: string;
|
160
216
|
};
|
161
|
-
export
|
217
|
+
export type SearchOption = {
|
162
218
|
value: string | number | boolean;
|
163
|
-
match
|
164
|
-
resultType
|
219
|
+
match?: `${TreeSearchMatchEnum}` | Function;
|
220
|
+
resultType?: `${TreeSearchResultEnum}`;
|
165
221
|
openResultNode: boolean;
|
166
222
|
};
|
167
|
-
export
|
223
|
+
export type TreePropTypes = Readonly<ExtractPropTypes<typeof treeProps>>;
|
168
224
|
export {};
|
package/lib/tree/tree.css
CHANGED
@@ -1,10 +1,150 @@
|
|
1
|
+
.bk-F-scroll-x {
|
2
|
+
overflow-x: auto;
|
3
|
+
scrollbar-color: #a0a0a0 transparent;
|
4
|
+
scrollbar-width: thin;
|
5
|
+
}
|
6
|
+
.bk-F-scroll-x::-webkit-scrollbar {
|
7
|
+
height: 6px;
|
8
|
+
}
|
9
|
+
.bk-F-scroll-y {
|
10
|
+
overflow-y: auto;
|
11
|
+
}
|
12
|
+
.bk-F-scroll-y::-webkit-scrollbar {
|
13
|
+
width: 4px;
|
14
|
+
}
|
15
|
+
.bk-F-scroll-y::-webkit-scrollbar-thumb {
|
16
|
+
border-radius: 4px;
|
17
|
+
}
|
18
|
+
.bk-virtual-render {
|
19
|
+
position: relative;
|
20
|
+
}
|
21
|
+
.bk-virtual-render .bk-virtual-content,
|
22
|
+
.bk-virtual-render.bk-virtual-content {
|
23
|
+
position: absolute;
|
24
|
+
top: 0;
|
25
|
+
bottom: 0;
|
26
|
+
left: 0;
|
27
|
+
width: 100%;
|
28
|
+
height: 100%;
|
29
|
+
}
|
30
|
+
.bk-virtual-render .bk-virtual-section {
|
31
|
+
width: 1px;
|
32
|
+
background: transparent;
|
33
|
+
}
|
34
|
+
.bk-checkbox-group {
|
35
|
+
display: inline-flex;
|
36
|
+
letter-spacing: normal;
|
37
|
+
}
|
38
|
+
.bk-checkbox {
|
39
|
+
display: inline-flex;
|
40
|
+
justify-self: center;
|
41
|
+
align-items: center;
|
42
|
+
font-size: 14px;
|
43
|
+
letter-spacing: normal;
|
44
|
+
color: #63656e;
|
45
|
+
cursor: pointer;
|
46
|
+
user-select: none;
|
47
|
+
}
|
48
|
+
.bk-checkbox ~ .bk-checkbox {
|
49
|
+
margin-left: 30px;
|
50
|
+
}
|
51
|
+
.bk-checkbox.is-checked .bk-checkbox-input {
|
52
|
+
background: #3a84ff;
|
53
|
+
border-color: #3a84ff;
|
54
|
+
transition: all 0.1s;
|
55
|
+
}
|
56
|
+
.bk-checkbox.is-checked .bk-checkbox-input.small::after {
|
57
|
+
width: 3px;
|
58
|
+
height: 6px;
|
59
|
+
}
|
60
|
+
.bk-checkbox.is-checked .bk-checkbox-input::after {
|
61
|
+
position: absolute;
|
62
|
+
top: 50%;
|
63
|
+
left: 50%;
|
64
|
+
width: 4px;
|
65
|
+
height: 8px;
|
66
|
+
border: 2px solid #fff;
|
67
|
+
border-top: 0;
|
68
|
+
border-left: 0;
|
69
|
+
content: '';
|
70
|
+
transform: translate(-50%, -60%) scaleY(1) rotate(45deg);
|
71
|
+
transform-origin: center;
|
72
|
+
}
|
73
|
+
.bk-checkbox.is-indeterminated .bk-checkbox-input {
|
74
|
+
background: #3a84ff;
|
75
|
+
border-color: #3a84ff;
|
76
|
+
transition: all 0.1s;
|
77
|
+
}
|
78
|
+
.bk-checkbox.is-indeterminated .bk-checkbox-input.small::after {
|
79
|
+
width: 6px;
|
80
|
+
height: 2px;
|
81
|
+
}
|
82
|
+
.bk-checkbox.is-indeterminated .bk-checkbox-input::after {
|
83
|
+
position: absolute;
|
84
|
+
top: 50%;
|
85
|
+
left: 50%;
|
86
|
+
width: 8px;
|
87
|
+
height: 2px;
|
88
|
+
background: #fff;
|
89
|
+
border: none;
|
90
|
+
border-radius: 2px;
|
91
|
+
content: '';
|
92
|
+
transform: translate(-50%, -50%);
|
93
|
+
}
|
94
|
+
.bk-checkbox.is-disabled {
|
95
|
+
color: #c4c6cc;
|
96
|
+
cursor: not-allowed;
|
97
|
+
}
|
98
|
+
.bk-checkbox.is-disabled .bk-checkbox-input {
|
99
|
+
background: #fafbfd;
|
100
|
+
border-color: #dcdee5;
|
101
|
+
}
|
102
|
+
.bk-checkbox.is-disabled .bk-checkbox-input::after {
|
103
|
+
background: #dcdee5;
|
104
|
+
}
|
105
|
+
.bk-checkbox.is-disabled.is-checked .bk-checkbox-input {
|
106
|
+
background: #a3c5fd;
|
107
|
+
border-color: #a3c5fd;
|
108
|
+
}
|
109
|
+
.bk-checkbox.is-disabled.is-checked .bk-checkbox-input::after {
|
110
|
+
background: #a3c5fd;
|
111
|
+
}
|
112
|
+
.bk-checkbox-input {
|
113
|
+
position: relative;
|
114
|
+
display: inline-block;
|
115
|
+
width: 16px;
|
116
|
+
height: 16px;
|
117
|
+
vertical-align: middle;
|
118
|
+
border: 1px solid #979ba5;
|
119
|
+
border-radius: 2px;
|
120
|
+
}
|
121
|
+
.bk-checkbox-input.small {
|
122
|
+
width: 14px;
|
123
|
+
height: 14px;
|
124
|
+
}
|
125
|
+
.bk-checkbox-original {
|
126
|
+
position: absolute;
|
127
|
+
top: 0;
|
128
|
+
left: 0;
|
129
|
+
z-index: -1;
|
130
|
+
width: 0;
|
131
|
+
height: 0;
|
132
|
+
}
|
133
|
+
.bk-checkbox-label {
|
134
|
+
display: inline-block;
|
135
|
+
margin-left: 6px;
|
136
|
+
vertical-align: middle;
|
137
|
+
}
|
138
|
+
.bk-tree {
|
139
|
+
font-size: 14px;
|
140
|
+
}
|
1
141
|
.bk-tree .bk-node-row {
|
2
142
|
padding-left: calc(var(--offset-left));
|
3
143
|
}
|
4
144
|
.bk-tree .bk-node-row.is-selected {
|
5
145
|
background-color: #ebf2ff;
|
6
146
|
}
|
7
|
-
.bk-tree
|
147
|
+
.bk-tree-node {
|
8
148
|
position: relative;
|
9
149
|
display: flex;
|
10
150
|
height: var(--lineHeight);
|
@@ -13,10 +153,10 @@
|
|
13
153
|
cursor: pointer;
|
14
154
|
align-items: center;
|
15
155
|
}
|
16
|
-
.bk-tree
|
156
|
+
.bk-tree-node:not(.is-root) {
|
17
157
|
margin-left: calc(var(--depth)*var(--indent));
|
18
158
|
}
|
19
|
-
.bk-tree
|
159
|
+
.bk-tree-node:not(.is-root).level-line::before {
|
20
160
|
position: absolute;
|
21
161
|
top: calc(50% + 1px);
|
22
162
|
left: calc(0px - var(--indent) + 6px);
|
@@ -27,7 +167,10 @@
|
|
27
167
|
border-bottom: var(--level-line);
|
28
168
|
content: '';
|
29
169
|
}
|
30
|
-
.bk-tree .bk-
|
170
|
+
.bk-tree-node.is-open .bk-node-action {
|
171
|
+
color: #63656e;
|
172
|
+
}
|
173
|
+
.bk-tree-node .node-virtual-line {
|
31
174
|
position: absolute;
|
32
175
|
top: -12px;
|
33
176
|
bottom: 50%;
|
@@ -36,18 +179,44 @@
|
|
36
179
|
width: 0;
|
37
180
|
border-left: var(--level-line);
|
38
181
|
}
|
39
|
-
.bk-tree
|
182
|
+
.bk-tree-node .bk-node-prefix {
|
183
|
+
display: flex;
|
184
|
+
width: 14px;
|
185
|
+
height: 14px;
|
186
|
+
align-items: center;
|
187
|
+
justify-content: center;
|
188
|
+
}
|
189
|
+
.bk-tree-node .bk-node-action {
|
190
|
+
margin-right: 6px;
|
191
|
+
color: #979ba5;
|
192
|
+
}
|
193
|
+
.bk-tree-node .bk-tree-icon {
|
40
194
|
margin: 0 6px 0 4px;
|
41
195
|
}
|
42
|
-
.bk-tree
|
196
|
+
.bk-tree-node .bk-node-content {
|
43
197
|
display: flex;
|
44
198
|
flex: 1;
|
45
199
|
align-items: center;
|
46
200
|
min-width: 0;
|
47
201
|
}
|
48
|
-
.bk-tree
|
202
|
+
.bk-tree-node .bk-node-content .bk-checkbox {
|
203
|
+
margin: 0;
|
204
|
+
}
|
205
|
+
.bk-tree-node .bk-node-content .bk-checkbox .bk-checkbox-input {
|
206
|
+
margin: 0;
|
207
|
+
}
|
208
|
+
.bk-tree-node .bk-node-content .bk-node-text {
|
49
209
|
flex: 1;
|
50
210
|
overflow: hidden;
|
51
211
|
text-overflow: ellipsis;
|
52
212
|
white-space: nowrap;
|
53
213
|
}
|
214
|
+
.bk-tree-drop-active {
|
215
|
+
background: #f5f7fa;
|
216
|
+
}
|
217
|
+
.bk-tree-drop-disabled {
|
218
|
+
background: #ffd5d5;
|
219
|
+
}
|
220
|
+
.bk-tree-drop-disabled .bk-tree-node {
|
221
|
+
cursor: no-drop;
|
222
|
+
}
|
package/lib/tree/tree.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { TreePropTypes as defineTypes } from './props';
|
2
|
-
export
|
2
|
+
export type TreePropTypes = defineTypes;
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
4
4
|
data: import("vue-types").VueTypeDef<any[]> & {
|
5
5
|
default: () => any[];
|
@@ -59,23 +59,38 @@ declare const _default: import("vue").DefineComponent<{
|
|
59
59
|
} & {
|
60
60
|
default: boolean;
|
61
61
|
};
|
62
|
+
disableDrag: import("vue-types").VueTypeValidableDef<(...args: any[]) => any> & {
|
63
|
+
default: (...args: any[]) => any;
|
64
|
+
};
|
65
|
+
disableDrop: import("vue-types").VueTypeValidableDef<(...args: any[]) => any> & {
|
66
|
+
default: (...args: any[]) => any;
|
67
|
+
};
|
62
68
|
dragSort: import("vue-types").VueTypeValidableDef<boolean> & {
|
63
69
|
default: boolean;
|
64
70
|
} & {
|
65
71
|
default: boolean;
|
66
72
|
};
|
67
|
-
selectable: import("vue-types").
|
73
|
+
selectable: import("vue-types").VueTypeDef<any> & {
|
74
|
+
default: any;
|
75
|
+
};
|
76
|
+
disabledFolderSelectable: import("vue-types").VueTypeValidableDef<boolean> & {
|
77
|
+
default: boolean;
|
78
|
+
} & {
|
79
|
+
default: boolean;
|
80
|
+
};
|
81
|
+
showCheckbox: import("vue-types").VueTypeValidableDef<boolean> & {
|
82
|
+
default: boolean;
|
83
|
+
} & {
|
84
|
+
default: boolean;
|
85
|
+
};
|
86
|
+
showNodeTypeIcon: import("vue-types").VueTypeValidableDef<boolean> & {
|
68
87
|
default: boolean;
|
69
88
|
} & {
|
70
89
|
default: boolean;
|
71
90
|
};
|
72
91
|
selected: import("vue-types").VueTypeDef<string | number | {
|
73
92
|
[key: string]: any;
|
74
|
-
}
|
75
|
-
default: string | number | (() => {
|
76
|
-
[key: string]: any;
|
77
|
-
});
|
78
|
-
};
|
93
|
+
}>;
|
79
94
|
autoCheckChildren: import("vue-types").VueTypeValidableDef<boolean> & {
|
80
95
|
default: boolean;
|
81
96
|
} & {
|
@@ -86,10 +101,28 @@ declare const _default: import("vue").DefineComponent<{
|
|
86
101
|
} & {
|
87
102
|
default: boolean;
|
88
103
|
};
|
104
|
+
expandAll: import("vue-types").VueTypeValidableDef<boolean> & {
|
105
|
+
default: boolean;
|
106
|
+
} & {
|
107
|
+
default: boolean;
|
108
|
+
};
|
109
|
+
nodeContentAction: import("vue-types").VueTypeDef<any> & {
|
110
|
+
default: any;
|
111
|
+
};
|
112
|
+
keepSlotData: import("vue-types").VueTypeValidableDef<boolean> & {
|
113
|
+
default: boolean;
|
114
|
+
} & {
|
115
|
+
default: boolean;
|
116
|
+
};
|
89
117
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
90
118
|
nodeClick: (..._args: any[]) => boolean;
|
91
119
|
nodeCollapse: (..._args: any[]) => boolean;
|
92
120
|
nodeExpand: (..._args: any[]) => boolean;
|
121
|
+
nodeChecked: (..._args: any[]) => boolean;
|
122
|
+
nodeDragStart: (..._args: any[]) => boolean;
|
123
|
+
nodeDragOver: (..._args: any[]) => boolean;
|
124
|
+
nodeDragLeave: (..._args: any[]) => boolean;
|
125
|
+
nodeDrop: (..._args: any[]) => boolean;
|
93
126
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
94
127
|
data: import("vue-types").VueTypeDef<any[]> & {
|
95
128
|
default: () => any[];
|
@@ -149,23 +182,38 @@ declare const _default: import("vue").DefineComponent<{
|
|
149
182
|
} & {
|
150
183
|
default: boolean;
|
151
184
|
};
|
185
|
+
disableDrag: import("vue-types").VueTypeValidableDef<(...args: any[]) => any> & {
|
186
|
+
default: (...args: any[]) => any;
|
187
|
+
};
|
188
|
+
disableDrop: import("vue-types").VueTypeValidableDef<(...args: any[]) => any> & {
|
189
|
+
default: (...args: any[]) => any;
|
190
|
+
};
|
152
191
|
dragSort: import("vue-types").VueTypeValidableDef<boolean> & {
|
153
192
|
default: boolean;
|
154
193
|
} & {
|
155
194
|
default: boolean;
|
156
195
|
};
|
157
|
-
selectable: import("vue-types").
|
196
|
+
selectable: import("vue-types").VueTypeDef<any> & {
|
197
|
+
default: any;
|
198
|
+
};
|
199
|
+
disabledFolderSelectable: import("vue-types").VueTypeValidableDef<boolean> & {
|
200
|
+
default: boolean;
|
201
|
+
} & {
|
202
|
+
default: boolean;
|
203
|
+
};
|
204
|
+
showCheckbox: import("vue-types").VueTypeValidableDef<boolean> & {
|
205
|
+
default: boolean;
|
206
|
+
} & {
|
207
|
+
default: boolean;
|
208
|
+
};
|
209
|
+
showNodeTypeIcon: import("vue-types").VueTypeValidableDef<boolean> & {
|
158
210
|
default: boolean;
|
159
211
|
} & {
|
160
212
|
default: boolean;
|
161
213
|
};
|
162
214
|
selected: import("vue-types").VueTypeDef<string | number | {
|
163
215
|
[key: string]: any;
|
164
|
-
}
|
165
|
-
default: string | number | (() => {
|
166
|
-
[key: string]: any;
|
167
|
-
});
|
168
|
-
};
|
216
|
+
}>;
|
169
217
|
autoCheckChildren: import("vue-types").VueTypeValidableDef<boolean> & {
|
170
218
|
default: boolean;
|
171
219
|
} & {
|
@@ -176,29 +224,52 @@ declare const _default: import("vue").DefineComponent<{
|
|
176
224
|
} & {
|
177
225
|
default: boolean;
|
178
226
|
};
|
227
|
+
expandAll: import("vue-types").VueTypeValidableDef<boolean> & {
|
228
|
+
default: boolean;
|
229
|
+
} & {
|
230
|
+
default: boolean;
|
231
|
+
};
|
232
|
+
nodeContentAction: import("vue-types").VueTypeDef<any> & {
|
233
|
+
default: any;
|
234
|
+
};
|
235
|
+
keepSlotData: import("vue-types").VueTypeValidableDef<boolean> & {
|
236
|
+
default: boolean;
|
237
|
+
} & {
|
238
|
+
default: boolean;
|
239
|
+
};
|
179
240
|
}>> & {
|
180
241
|
onNodeClick?: (...args: any[]) => any;
|
181
242
|
onNodeCollapse?: (...args: any[]) => any;
|
182
243
|
onNodeExpand?: (...args: any[]) => any;
|
244
|
+
onNodeChecked?: (...args: any[]) => any;
|
245
|
+
onNodeDragStart?: (...args: any[]) => any;
|
246
|
+
onNodeDragOver?: (...args: any[]) => any;
|
247
|
+
onNodeDragLeave?: (...args: any[]) => any;
|
248
|
+
onNodeDrop?: (...args: any[]) => any;
|
183
249
|
}, {
|
184
|
-
data: any[];
|
185
250
|
search: string | number | boolean | import("./props").SearchOption;
|
251
|
+
data: any[];
|
186
252
|
draggable: boolean;
|
187
253
|
lineHeight: number;
|
188
254
|
prefixIcon: any;
|
189
|
-
selected: string | number | {
|
190
|
-
[key: string]: any;
|
191
|
-
};
|
192
255
|
children: string;
|
256
|
+
offsetLeft: number;
|
193
257
|
emptyText: string;
|
194
258
|
nodeKey: string;
|
195
259
|
indent: number;
|
196
260
|
levelLine: any;
|
197
261
|
virtualRender: boolean;
|
198
|
-
|
262
|
+
disableDrag: (...args: any[]) => any;
|
263
|
+
disableDrop: (...args: any[]) => any;
|
199
264
|
dragSort: boolean;
|
200
|
-
selectable:
|
265
|
+
selectable: any;
|
266
|
+
disabledFolderSelectable: boolean;
|
267
|
+
showCheckbox: boolean;
|
268
|
+
showNodeTypeIcon: boolean;
|
201
269
|
autoCheckChildren: boolean;
|
202
270
|
autoOpenParentNode: boolean;
|
203
|
-
|
271
|
+
expandAll: boolean;
|
272
|
+
nodeContentAction: any;
|
273
|
+
keepSlotData: boolean;
|
274
|
+
}, {}>;
|
204
275
|
export default _default;
|