vxe-pc-ui 4.20.24 → 4.20.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/all.esm.js +15151 -10366
- package/dist/style.css +1 -1
- package/dist/style.mini.css +1 -1
- package/es/alert/src/alert.js +61 -36
- package/es/anchor/src/anchor-link.js +39 -20
- package/es/anchor/src/anchor.js +74 -45
- package/es/avatar/src/avatar.js +47 -27
- package/es/backtop/src/backtop.js +65 -40
- package/es/badge/src/badge.js +32 -16
- package/es/breadcrumb/src/breadcrumb-item.js +52 -27
- package/es/breadcrumb/src/breadcrumb.js +11 -8
- package/es/button/src/button-group.js +24 -18
- package/es/button/src/button.js +284 -185
- package/es/calendar/src/calendar.js +571 -358
- package/es/card/src/card.js +123 -68
- package/es/carousel/src/carousel-item.js +14 -7
- package/es/carousel/src/carousel.js +174 -112
- package/es/cascader/src/cascader.js +526 -380
- package/es/checkbox/src/button.js +90 -55
- package/es/checkbox/src/checkbox.js +60 -40
- package/es/checkbox/src/group.js +34 -26
- package/es/collapse/src/collapse-pane.js +33 -16
- package/es/collapse/src/collapse.js +133 -79
- package/es/color-picker/src/color-picker.js +489 -350
- package/es/components.d.ts +3 -1
- package/es/components.js +3 -2
- package/es/context-menu/src/context-menu.js +190 -110
- package/es/countdown/src/countdown.js +91 -59
- package/es/date-panel/src/date-panel.js +760 -450
- package/es/date-picker/src/date-picker.js +331 -228
- package/es/date-range-picker/src/date-range-picker.js +366 -265
- package/es/divider/src/divider.js +26 -12
- package/es/drawer/src/drawer.js +254 -154
- package/es/dynamics/index.js +38 -25
- package/es/empty/src/empty.js +53 -29
- package/es/form/render/index.js +66 -41
- package/es/form/src/form-config-item.js +22 -16
- package/es/form/src/form-group.js +23 -14
- package/es/form/src/form-item.js +23 -17
- package/es/form/src/form.js +139 -95
- package/es/form/src/itemInfo.js +2 -1
- package/es/form/src/render.js +207 -127
- package/es/form/src/util.js +8 -4
- package/es/icon/src/icon.js +14 -10
- package/es/icon/style.css +1 -1
- package/es/icon/style.mini.css +1 -1
- package/es/icon-picker/src/icon-picker.js +250 -157
- package/es/image/src/group.js +26 -20
- package/es/image/src/image.js +33 -32
- package/es/image/src/preview.js +182 -122
- package/es/image/src/util.js +6 -3
- package/es/index.d.ts +3 -0
- package/es/index.esm.js +12 -0
- package/es/index.js +12 -0
- package/es/input/src/input.js +820 -507
- package/es/layout-aside/src/layout-aside.js +54 -38
- package/es/layout-body/src/layout-body.js +39 -27
- package/es/layout-container/src/layout-container.js +16 -9
- package/es/layout-footer/src/layout-footer.js +16 -7
- package/es/layout-header/src/layout-header.js +15 -7
- package/es/link/src/link.js +65 -44
- package/es/list/src/list.js +453 -333
- package/es/loading/index.js +8 -5
- package/es/loading/src/loading.js +60 -33
- package/es/mention/src/mention.js +2 -1
- package/es/menu/src/menu.js +341 -210
- package/es/modal/index.js +60 -37
- package/es/modal/src/modal.js +303 -205
- package/es/notice-bar/src/notice-bar.js +64 -37
- package/es/number-input/src/number-input.js +249 -172
- package/es/pager/src/pager.js +346 -202
- package/es/password-input/src/password-input.js +145 -105
- package/es/print/src/page-break.js +2 -1
- package/es/print/src/print.js +184 -99
- package/es/pulldown/src/pulldown.js +113 -71
- package/es/radio/src/button.js +92 -57
- package/es/radio/src/group.js +33 -25
- package/es/radio/src/radio.js +61 -41
- package/es/rate/src/rate.js +48 -36
- package/es/result/src/result.js +67 -35
- package/es/row/src/col.js +30 -16
- package/es/row/src/row.js +21 -14
- package/es/scrollbar/src/scrollbar.js +177 -145
- package/es/segmented/src/segmented.js +93 -60
- package/es/select/src/optgroup.js +7 -3
- package/es/select/src/select.js +483 -340
- package/es/select/src/util.js +6 -3
- package/es/slider/src/slider.js +108 -80
- package/es/space/src/space.js +43 -26
- package/es/splitter/src/splitter-panel.js +50 -25
- package/es/splitter/src/splitter.js +219 -144
- package/es/steps/src/steps.js +10 -5
- package/es/style.css +1 -1
- package/es/style.mini.css +1 -1
- package/es/switch/src/switch.js +115 -64
- package/es/table-select/src/table-select.js +232 -153
- package/es/table-transfer/src/table-transfer.js +10 -5
- package/es/tabs/src/tab-pane.js +33 -16
- package/es/tabs/src/tabs.js +363 -230
- package/es/tag/src/tag.js +61 -43
- package/es/text/src/text.js +89 -65
- package/es/text-ellipsis/src/text-ellipsis.js +82 -51
- package/es/textarea/src/textarea.js +116 -86
- package/es/timeline/src/timeline-item.js +2 -1
- package/es/timeline/src/timeline.js +2 -1
- package/es/tip/src/tip.js +53 -29
- package/es/tooltip/src/tooltip.js +114 -74
- package/es/tour/src/tour.js +2 -1
- package/es/transfer/src/transfer.js +42 -25
- package/es/tree/src/tree.js +709 -492
- package/es/tree-select/src/tree-select.js +320 -225
- package/es/ui/index.d.ts +0 -1
- package/es/ui/index.js +46 -3
- package/es/ui/src/dom.js +9 -6
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/utils.d.ts +1 -1
- package/es/upload/src/upload.js +614 -398
- package/es/vxe-icon/style.css +1 -1
- package/es/vxe-icon/style.mini.css +1 -1
- package/es/watermark/src/util.js +15 -12
- package/es/watermark/src/watermark.js +55 -25
- package/lib/alert/src/alert.js +62 -37
- package/lib/anchor/src/anchor-link.js +39 -20
- package/lib/anchor/src/anchor.js +75 -46
- package/lib/avatar/src/avatar.js +52 -32
- package/lib/backtop/src/backtop.js +81 -56
- package/lib/badge/src/badge.js +35 -19
- package/lib/breadcrumb/src/breadcrumb-item.js +52 -27
- package/lib/breadcrumb/src/breadcrumb.js +13 -10
- package/lib/button/src/button-group.js +27 -21
- package/lib/button/src/button.js +306 -207
- package/lib/calendar/src/calendar.js +575 -362
- package/lib/card/src/card.js +133 -78
- package/lib/carousel/src/carousel-item.js +15 -8
- package/lib/carousel/src/carousel.js +182 -120
- package/lib/cascader/src/cascader.js +555 -409
- package/lib/checkbox/src/button.js +93 -58
- package/lib/checkbox/src/checkbox.js +63 -43
- package/lib/checkbox/src/group.js +37 -29
- package/lib/collapse/src/collapse-pane.js +34 -17
- package/lib/collapse/src/collapse.js +139 -85
- package/lib/color-picker/src/color-picker.js +516 -377
- package/lib/components.js +3 -2
- package/lib/context-menu/src/context-menu.js +212 -132
- package/lib/countdown/src/countdown.js +95 -63
- package/lib/date-panel/src/date-panel.js +776 -466
- package/lib/date-picker/src/date-picker.js +377 -274
- package/lib/date-range-picker/src/date-range-picker.js +401 -300
- package/lib/divider/src/divider.js +31 -17
- package/lib/drawer/src/drawer.js +255 -155
- package/lib/dynamics/index.js +38 -25
- package/lib/empty/src/empty.js +55 -31
- package/lib/form/render/index.js +68 -43
- package/lib/form/src/form-config-item.js +24 -18
- package/lib/form/src/form-group.js +25 -16
- package/lib/form/src/form-item.js +25 -19
- package/lib/form/src/form.js +140 -96
- package/lib/form/src/itemInfo.js +4 -3
- package/lib/form/src/render.js +214 -134
- package/lib/form/src/util.js +9 -5
- package/lib/icon/src/icon.js +17 -13
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.mini.css +1 -1
- package/lib/icon-picker/src/icon-picker.js +251 -158
- package/lib/image/src/group.js +26 -20
- package/lib/image/src/image.js +41 -40
- package/lib/image/src/preview.js +206 -146
- package/lib/image/src/util.js +6 -3
- package/lib/index.common.js +12 -0
- package/lib/index.js +12 -0
- package/lib/index.umd.js +15359 -10558
- package/lib/index.umd.min.js +3 -3
- package/lib/input/src/input.js +878 -565
- package/lib/layout-aside/src/layout-aside.js +61 -45
- package/lib/layout-body/src/layout-body.js +47 -35
- package/lib/layout-container/src/layout-container.js +18 -11
- package/lib/layout-footer/src/layout-footer.js +17 -8
- package/lib/layout-header/src/layout-header.js +16 -8
- package/lib/link/src/link.js +69 -48
- package/lib/list/src/list.js +456 -336
- package/lib/loading/index.js +8 -5
- package/lib/loading/src/loading.js +69 -42
- package/lib/mention/src/mention.js +4 -3
- package/lib/menu/src/menu.js +351 -220
- package/lib/modal/index.js +60 -37
- package/lib/modal/src/modal.js +306 -208
- package/lib/notice-bar/src/notice-bar.js +70 -43
- package/lib/number-input/src/number-input.js +290 -213
- package/lib/pager/src/pager.js +347 -203
- package/lib/password-input/src/password-input.js +155 -115
- package/lib/print/src/page-break.js +3 -2
- package/lib/print/src/print.js +193 -108
- package/lib/pulldown/src/pulldown.js +128 -86
- package/lib/radio/src/button.js +96 -61
- package/lib/radio/src/group.js +37 -29
- package/lib/radio/src/radio.js +65 -45
- package/lib/rate/src/rate.js +50 -38
- package/lib/result/src/result.js +68 -36
- package/lib/row/src/col.js +32 -18
- package/lib/row/src/row.js +25 -18
- package/lib/scrollbar/src/scrollbar.js +178 -146
- package/lib/segmented/src/segmented.js +97 -64
- package/lib/select/src/optgroup.js +7 -3
- package/lib/select/src/select.js +486 -343
- package/lib/select/src/util.js +6 -3
- package/lib/slider/src/slider.js +122 -94
- package/lib/space/src/space.js +57 -40
- package/lib/splitter/src/splitter-panel.js +51 -26
- package/lib/splitter/src/splitter.js +233 -158
- package/lib/steps/src/steps.js +11 -6
- package/lib/style.css +1 -1
- package/lib/style.mini.css +1 -1
- package/lib/switch/src/switch.js +116 -65
- package/lib/table-select/src/table-select.js +234 -155
- package/lib/table-transfer/src/table-transfer.js +12 -7
- package/lib/tabs/src/tab-pane.js +34 -17
- package/lib/tabs/src/tabs.js +365 -232
- package/lib/tag/src/tag.js +67 -49
- package/lib/text/src/text.js +100 -76
- package/lib/text-ellipsis/src/text-ellipsis.js +86 -55
- package/lib/textarea/src/textarea.js +127 -97
- package/lib/timeline/src/timeline-item.js +3 -2
- package/lib/timeline/src/timeline.js +4 -3
- package/lib/tip/src/tip.js +58 -34
- package/lib/tooltip/src/tooltip.js +116 -76
- package/lib/tour/src/tour.js +4 -3
- package/lib/transfer/src/transfer.js +44 -27
- package/lib/tree/src/tree.js +717 -500
- package/lib/tree-select/src/tree-select.js +351 -256
- package/lib/ui/index.js +46 -4
- package/lib/ui/src/dom.js +9 -6
- package/lib/ui/src/log.js +1 -1
- package/lib/upload/src/upload.js +708 -492
- package/lib/vxe-icon/style/style.css +1 -1
- package/lib/vxe-icon/style/style.mini.css +1 -1
- package/lib/watermark/src/util.js +15 -12
- package/lib/watermark/src/watermark.js +60 -30
- package/package.json +10 -4
- package/packages/alert/index.ts +16 -16
- package/packages/alert/src/alert.ts +148 -126
- package/packages/anchor/index.ts +16 -16
- package/packages/anchor/src/anchor-link.ts +139 -121
- package/packages/anchor/src/anchor.ts +266 -237
- package/packages/anchor/src/util.ts +23 -23
- package/packages/anchor-link/index.ts +16 -16
- package/packages/avatar/index.ts +16 -16
- package/packages/avatar/src/avatar.ts +166 -149
- package/packages/backtop/index.ts +16 -16
- package/packages/backtop/src/backtop.ts +337 -313
- package/packages/badge/index.ts +16 -16
- package/packages/badge/src/badge.ts +131 -118
- package/packages/breadcrumb/index.ts +16 -16
- package/packages/breadcrumb/src/breadcrumb-item.ts +129 -106
- package/packages/breadcrumb/src/breadcrumb.ts +94 -92
- package/packages/breadcrumb-item/index.ts +16 -16
- package/packages/button/index.ts +16 -16
- package/packages/button/src/button-group.ts +116 -110
- package/packages/button/src/button.ts +975 -855
- package/packages/button-group/index.ts +16 -16
- package/packages/calendar/index.ts +16 -16
- package/packages/calendar/src/calendar.ts +1566 -1352
- package/packages/card/index.ts +16 -16
- package/packages/card/src/card.ts +285 -236
- package/packages/carousel/index.ts +16 -16
- package/packages/carousel/src/carousel-item.ts +120 -102
- package/packages/carousel/src/carousel.ts +475 -414
- package/packages/carousel/src/util.ts +21 -21
- package/packages/carousel-item/index.ts +16 -16
- package/packages/cascader/index.ts +16 -16
- package/packages/cascader/src/cascader.ts +2074 -1896
- package/packages/cascader/src/util.ts +9 -9
- package/packages/checkbox/index.ts +16 -16
- package/packages/checkbox/src/button.ts +267 -221
- package/packages/checkbox/src/checkbox.ts +219 -199
- package/packages/checkbox/src/group.ts +292 -269
- package/packages/checkbox-button/index.ts +16 -16
- package/packages/checkbox-group/index.ts +16 -16
- package/packages/col/index.ts +16 -16
- package/packages/collapse/index.ts +16 -16
- package/packages/collapse/src/collapse-pane.ts +142 -114
- package/packages/collapse/src/collapse.ts +453 -384
- package/packages/collapse/src/util.ts +21 -21
- package/packages/collapse-pane/index.ts +16 -16
- package/packages/color-picker/index.ts +31 -31
- package/packages/color-picker/src/color-picker.ts +1310 -1147
- package/packages/color-picker/src/util.ts +436 -423
- package/packages/components.ts +350 -349
- package/packages/context-menu/index.ts +54 -54
- package/packages/context-menu/src/context-menu.ts +773 -681
- package/packages/countdown/index.ts +16 -16
- package/packages/countdown/src/countdown.ts +295 -262
- package/packages/date-panel/index.ts +16 -16
- package/packages/date-panel/src/date-panel.ts +2214 -1900
- package/packages/date-panel/src/util.ts +354 -326
- package/packages/date-picker/index.ts +16 -16
- package/packages/date-picker/src/date-picker.ts +1884 -1752
- package/packages/date-range-picker/index.ts +16 -16
- package/packages/date-range-picker/src/date-range-picker.ts +1728 -1604
- package/packages/divider/index.ts +16 -16
- package/packages/divider/src/divider.ts +105 -93
- package/packages/drawer/index.ts +78 -78
- package/packages/drawer/src/drawer.ts +920 -802
- package/packages/drawer/src/store.ts +3 -3
- package/packages/dynamics/index.ts +124 -117
- package/packages/empty/index.ts +16 -16
- package/packages/empty/src/empty.ts +124 -103
- package/packages/form/index.ts +16 -16
- package/packages/form/render/index.ts +646 -614
- package/packages/form/src/form-config-item.ts +85 -80
- package/packages/form/src/form-group.ts +96 -86
- package/packages/form/src/form-item.ts +181 -174
- package/packages/form/src/form.ts +1122 -1069
- package/packages/form/src/itemInfo.ts +84 -82
- package/packages/form/src/render.ts +470 -387
- package/packages/form/src/util.ts +98 -93
- package/packages/form-gather/index.ts +26 -26
- package/packages/form-group/index.ts +16 -16
- package/packages/form-item/index.ts +16 -16
- package/packages/icon/index.ts +16 -16
- package/packages/icon/src/icon.ts +78 -75
- package/packages/icon-picker/index.ts +16 -16
- package/packages/icon-picker/src/icon-picker.ts +922 -809
- package/packages/image/index.ts +16 -16
- package/packages/image/src/group.ts +159 -153
- package/packages/image/src/image.ts +298 -298
- package/packages/image/src/preview.ts +749 -672
- package/packages/image/src/util.ts +62 -59
- package/packages/image-group/index.ts +16 -16
- package/packages/image-preview/index.ts +19 -19
- package/packages/index.ts +20 -4
- package/packages/input/index.ts +16 -16
- package/packages/input/src/input.ts +3201 -2863
- package/packages/language/fr-FR.ts +15 -15
- package/packages/language/it-IT.ts +4 -4
- package/packages/language/uk-UA.ts +1 -1
- package/packages/language/uz-UZ.ts +13 -13
- package/packages/language/zh-CN.ts +907 -907
- package/packages/layout-aside/index.ts +16 -16
- package/packages/layout-aside/src/layout-aside.ts +172 -156
- package/packages/layout-body/index.ts +16 -16
- package/packages/layout-body/src/layout-body.ts +191 -181
- package/packages/layout-container/index.ts +16 -16
- package/packages/layout-container/src/layout-container.ts +108 -92
- package/packages/layout-footer/index.ts +16 -16
- package/packages/layout-footer/src/layout-footer.ts +81 -74
- package/packages/layout-header/index.ts +16 -16
- package/packages/layout-header/src/layout-header.ts +79 -73
- package/packages/link/index.ts +16 -16
- package/packages/link/src/link.ts +180 -161
- package/packages/list/index.ts +16 -16
- package/packages/list/src/list.ts +2690 -2564
- package/packages/list/src/store.ts +10 -10
- package/packages/list/src/util.ts +10 -11
- package/packages/loading/index.ts +39 -36
- package/packages/loading/src/loading.ts +179 -152
- package/packages/mention/index.ts +16 -16
- package/packages/mention/src/mention.ts +69 -71
- package/packages/menu/index.ts +16 -16
- package/packages/menu/src/menu.ts +1000 -857
- package/packages/modal/index.ts +164 -141
- package/packages/modal/src/modal.ts +1803 -1681
- package/packages/modal/src/store.ts +3 -3
- package/packages/notice-bar/index.ts +16 -16
- package/packages/notice-bar/src/notice-bar.ts +207 -181
- package/packages/number-input/index.ts +16 -16
- package/packages/number-input/src/number-input.ts +1322 -1242
- package/packages/number-input/src/util.ts +25 -25
- package/packages/optgroup/index.ts +16 -16
- package/packages/option/index.ts +16 -16
- package/packages/pager/index.ts +16 -16
- package/packages/pager/src/pager.ts +919 -775
- package/packages/password-input/index.ts +16 -16
- package/packages/password-input/src/password-input.ts +523 -482
- package/packages/print/index.ts +18 -18
- package/packages/print/src/page-break.ts +104 -92
- package/packages/print/src/print.ts +366 -281
- package/packages/print/src/util.ts +299 -304
- package/packages/print-page-break/index.ts +16 -16
- package/packages/pulldown/index.ts +16 -16
- package/packages/pulldown/src/pulldown.ts +505 -445
- package/packages/radio/index.ts +16 -16
- package/packages/radio/src/button.ts +290 -243
- package/packages/radio/src/group.ts +275 -252
- package/packages/radio/src/radio.ts +237 -218
- package/packages/radio-button/index.ts +16 -16
- package/packages/radio-group/index.ts +16 -16
- package/packages/rate/index.ts +16 -16
- package/packages/rate/src/rate.ts +203 -192
- package/packages/result/index.ts +16 -16
- package/packages/result/src/result.ts +141 -112
- package/packages/row/index.ts +16 -16
- package/packages/row/src/col.ts +171 -159
- package/packages/row/src/row.ts +143 -138
- package/packages/scrollbar/index.ts +16 -16
- package/packages/scrollbar/src/scrollbar.ts +626 -595
- package/packages/segmented/index.ts +16 -16
- package/packages/segmented/src/segmented.ts +297 -264
- package/packages/select/index.ts +16 -16
- package/packages/select/src/optgroup.ts +53 -49
- package/packages/select/src/option-info.ts +20 -20
- package/packages/select/src/option.ts +47 -47
- package/packages/select/src/select.ts +2390 -2214
- package/packages/select/src/util.ts +50 -47
- package/packages/slider/index.ts +16 -16
- package/packages/slider/src/slider.ts +547 -506
- package/packages/space/index.ts +16 -16
- package/packages/space/src/space.ts +225 -209
- package/packages/split/index.ts +16 -16
- package/packages/split-pane/index.ts +17 -17
- package/packages/splitter/index.ts +16 -16
- package/packages/splitter/src/splitter-panel.ts +199 -163
- package/packages/splitter/src/splitter.ts +1110 -1020
- package/packages/splitter/src/util.ts +21 -21
- package/packages/splitter-panel/index.ts +16 -16
- package/packages/steps/index.ts +16 -16
- package/packages/steps/src/steps.ts +69 -68
- package/packages/switch/index.ts +16 -16
- package/packages/switch/src/switch.ts +300 -245
- package/packages/tab-pane/index.ts +16 -16
- package/packages/table-select/index.ts +16 -16
- package/packages/table-select/src/table-select.ts +1103 -999
- package/packages/table-transfer/index.ts +16 -16
- package/packages/table-transfer/src/table-transfer.ts +104 -91
- package/packages/tabs/index.ts +16 -16
- package/packages/tabs/src/tab-pane.ts +132 -117
- package/packages/tabs/src/tabs.ts +1137 -997
- package/packages/tabs/src/util.ts +21 -21
- package/packages/tag/index.ts +16 -16
- package/packages/tag/src/tag.ts +204 -187
- package/packages/text/index.ts +16 -16
- package/packages/text/src/text.ts +282 -260
- package/packages/text-ellipsis/index.ts +16 -16
- package/packages/text-ellipsis/src/text-ellipsis.ts +312 -282
- package/packages/textarea/index.ts +16 -16
- package/packages/textarea/src/textarea.ts +526 -495
- package/packages/timeline/index.ts +16 -16
- package/packages/timeline/src/timeline-item.ts +65 -67
- package/packages/timeline/src/timeline.ts +70 -71
- package/packages/timeline-item/index.ts +16 -16
- package/packages/tip/index.ts +19 -19
- package/packages/tip/src/tip.ts +150 -129
- package/packages/tooltip/index.ts +72 -72
- package/packages/tooltip/src/tooltip.ts +669 -627
- package/packages/tour/index.ts +16 -16
- package/packages/tour/src/tour.ts +70 -71
- package/packages/transfer/index.ts +16 -16
- package/packages/transfer/src/transfer.ts +130 -117
- package/packages/tree/index.ts +16 -16
- package/packages/tree/src/store.ts +10 -10
- package/packages/tree/src/tree.ts +4077 -3852
- package/packages/tree/src/util.ts +51 -51
- package/packages/tree-select/index.ts +16 -16
- package/packages/tree-select/src/tree-select.ts +1217 -1094
- package/packages/ui/index.ts +836 -793
- package/packages/ui/src/anime.ts +51 -52
- package/packages/ui/src/comp.ts +3 -3
- package/packages/ui/src/dom.ts +357 -354
- package/packages/ui/src/log.ts +19 -19
- package/packages/ui/src/utils.ts +79 -79
- package/packages/ui/src/vn.ts +39 -39
- package/packages/upload/index.ts +20 -20
- package/packages/upload/src/upload.ts +2271 -2021
- package/packages/upload/src/util.ts +109 -109
- package/packages/watermark/index.ts +33 -33
- package/packages/watermark/src/util.ts +186 -180
- package/packages/watermark/src/watermark.ts +196 -168
- package/types/all.d.ts +552 -552
- package/types/components/alert.d.ts +83 -87
- package/types/components/anchor-link.d.ts +88 -91
- package/types/components/anchor.d.ts +97 -104
- package/types/components/avatar.d.ts +85 -88
- package/types/components/backtop.d.ts +119 -122
- package/types/components/badge.d.ts +77 -80
- package/types/components/breadcrumb-item.d.ts +77 -80
- package/types/components/breadcrumb.d.ts +83 -87
- package/types/components/button-group.d.ts +118 -120
- package/types/components/button.d.ts +331 -339
- package/types/components/calendar.d.ts +247 -264
- package/types/components/card.d.ts +111 -113
- package/types/components/carousel-item.d.ts +73 -75
- package/types/components/carousel.d.ts +130 -134
- package/types/components/cascader.d.ts +336 -386
- package/types/components/checkbox-button.d.ts +109 -114
- package/types/components/checkbox-group.d.ts +152 -154
- package/types/components/checkbox.d.ts +123 -128
- package/types/components/col.d.ts +77 -80
- package/types/components/colgroup.d.ts +64 -69
- package/types/components/collapse-pane.d.ts +86 -89
- package/types/components/collapse.d.ts +123 -133
- package/types/components/color-picker.d.ts +275 -280
- package/types/components/column.d.ts +834 -851
- package/types/components/context-menu.d.ts +282 -289
- package/types/components/countdown.d.ts +108 -112
- package/types/components/date-panel.d.ts +319 -331
- package/types/components/date-picker.d.ts +361 -384
- package/types/components/date-range-picker.d.ts +351 -371
- package/types/components/divider.d.ts +72 -75
- package/types/components/drawer.d.ts +333 -344
- package/types/components/empty.d.ts +75 -78
- package/types/components/flow-design.d.ts +73 -85
- package/types/components/flow-view.d.ts +73 -85
- package/types/components/form-design.d.ts +370 -376
- package/types/components/form-gather.d.ts +120 -124
- package/types/components/form-group.d.ts +73 -77
- package/types/components/form-item.d.ts +395 -413
- package/types/components/form-view.d.ts +179 -183
- package/types/components/form.d.ts +499 -495
- package/types/components/gantt-module/gantt-view.d.ts +195 -200
- package/types/components/gantt-module/index.d.ts +1 -1
- package/types/components/gantt-plugins/extend-gantt-chart.d.ts +137 -131
- package/types/components/gantt-plugins/index.d.ts +1 -1
- package/types/components/gantt.d.ts +1248 -1399
- package/types/components/grid.d.ts +1289 -1317
- package/types/components/icon-picker.d.ts +242 -253
- package/types/components/icon.d.ts +332 -87
- package/types/components/image-group.d.ts +124 -127
- package/types/components/image-preview.d.ts +167 -167
- package/types/components/image.d.ts +166 -173
- package/types/components/input.d.ts +429 -453
- package/types/components/layout-aside.d.ts +123 -123
- package/types/components/layout-body.d.ts +110 -113
- package/types/components/layout-container.d.ts +73 -75
- package/types/components/layout-footer.d.ts +71 -73
- package/types/components/layout-header.d.ts +67 -69
- package/types/components/link.d.ts +107 -111
- package/types/components/list-design.d.ts +189 -190
- package/types/components/list-view.d.ts +193 -199
- package/types/components/list.d.ts +678 -715
- package/types/components/loading.d.ts +98 -103
- package/types/components/mention.d.ts +70 -77
- package/types/components/menu.d.ts +284 -295
- package/types/components/modal.d.ts +567 -584
- package/types/components/notice-bar.d.ts +102 -106
- package/types/components/number-input.d.ts +359 -365
- package/types/components/optgroup.d.ts +85 -88
- package/types/components/option.d.ts +94 -103
- package/types/components/pager.d.ts +330 -335
- package/types/components/password-input.d.ts +143 -156
- package/types/components/print-page-break.d.ts +65 -69
- package/types/components/print.d.ts +243 -245
- package/types/components/pulldown.d.ts +231 -239
- package/types/components/radio-button.d.ts +113 -118
- package/types/components/radio-group.d.ts +151 -153
- package/types/components/radio.d.ts +129 -134
- package/types/components/rate.d.ts +83 -88
- package/types/components/result.d.ts +81 -84
- package/types/components/row.d.ts +77 -81
- package/types/components/scrollbar.d.ts +299 -305
- package/types/components/segmented.d.ts +119 -123
- package/types/components/select.d.ts +598 -616
- package/types/components/slider.d.ts +137 -151
- package/types/components/space.d.ts +120 -127
- package/types/components/split-pane.d.ts +126 -133
- package/types/components/split.d.ts +301 -312
- package/types/components/splitter-panel.d.ts +123 -130
- package/types/components/splitter.d.ts +290 -301
- package/types/components/steps.d.ts +63 -68
- package/types/components/switch.d.ts +127 -133
- package/types/components/tab-pane.d.ts +111 -114
- package/types/components/table-module/custom.d.ts +123 -123
- package/types/components/table-module/edit.d.ts +297 -276
- package/types/components/table-module/export.d.ts +88 -96
- package/types/components/table-module/filter.d.ts +144 -144
- package/types/components/table-module/index.d.ts +7 -7
- package/types/components/table-module/keyboard.d.ts +26 -26
- package/types/components/table-module/menu.d.ts +46 -46
- package/types/components/table-module/validator.d.ts +53 -53
- package/types/components/table-plugins/extend-cell-area.d.ts +781 -781
- package/types/components/table-plugins/extend-pivot-table.d.ts +59 -58
- package/types/components/table-plugins/filters-combination.d.ts +15 -15
- package/types/components/table-plugins/filters-complex-input.d.ts +9 -9
- package/types/components/table-plugins/index.d.ts +4 -4
- package/types/components/table-select.d.ts +268 -276
- package/types/components/table-transfer.d.ts +80 -84
- package/types/components/table.d.ts +7530 -8000
- package/types/components/tabs.d.ts +314 -352
- package/types/components/tag.d.ts +108 -114
- package/types/components/text-ellipsis.d.ts +107 -112
- package/types/components/text.d.ts +112 -122
- package/types/components/textarea.d.ts +261 -275
- package/types/components/timeline-item.d.ts +66 -75
- package/types/components/timeline.d.ts +70 -77
- package/types/components/tip.d.ts +81 -83
- package/types/components/toolbar.d.ts +327 -336
- package/types/components/tooltip.d.ts +250 -255
- package/types/components/tour.d.ts +70 -77
- package/types/components/transfer.d.ts +80 -84
- package/types/components/tree-select.d.ts +361 -376
- package/types/components/tree.d.ts +994 -1036
- package/types/components/upload.d.ts +477 -518
- package/types/components/watermark.d.ts +116 -120
- package/types/handles/form-design.d.ts +50 -50
- package/types/handles/index.d.ts +3 -3
- package/types/handles/list-design.d.ts +1 -2
- package/types/handles/table.d.ts +15 -15
- package/types/index.d.ts +8 -8
- package/types/ui/commands.d.ts +57 -57
- package/types/ui/formats.d.ts +62 -62
- package/types/ui/global-config.d.ts +269 -269
- package/types/ui/global-icon.d.ts +315 -315
- package/types/ui/hooks.d.ts +13 -13
- package/types/ui/index.d.ts +100 -100
- package/types/ui/interceptor.d.ts +52 -52
- package/types/ui/menus.d.ts +89 -89
- package/types/ui/renderer.d.ts +1033 -1047
- package/types/ui/validators.d.ts +37 -38
- /package/dist/{iconfont.1792979107495.ttf → iconfont.1793007755017.ttf} +0 -0
- /package/dist/{iconfont.1792979107495.woff → iconfont.1793007755017.woff} +0 -0
- /package/dist/{iconfont.1792979107495.woff2 → iconfont.1793007755017.woff2} +0 -0
- /package/es/icon/{iconfont.1792979107495.ttf → iconfont.1793007755017.ttf} +0 -0
- /package/es/icon/{iconfont.1792979107495.woff → iconfont.1793007755017.woff} +0 -0
- /package/es/icon/{iconfont.1792979107495.woff2 → iconfont.1793007755017.woff2} +0 -0
- /package/es/{iconfont.1792979107495.ttf → iconfont.1793007755017.ttf} +0 -0
- /package/es/{iconfont.1792979107495.woff → iconfont.1793007755017.woff} +0 -0
- /package/es/{iconfont.1792979107495.woff2 → iconfont.1793007755017.woff2} +0 -0
- /package/es/vxe-icon/{iconfont.1792979107495.ttf → iconfont.1793007755017.ttf} +0 -0
- /package/es/vxe-icon/{iconfont.1792979107495.woff → iconfont.1793007755017.woff} +0 -0
- /package/es/vxe-icon/{iconfont.1792979107495.woff2 → iconfont.1793007755017.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1792979107495.ttf → iconfont.1793007755017.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1792979107495.woff → iconfont.1793007755017.woff} +0 -0
- /package/lib/icon/style/{iconfont.1792979107495.woff2 → iconfont.1793007755017.woff2} +0 -0
- /package/lib/{iconfont.1792979107495.ttf → iconfont.1793007755017.ttf} +0 -0
- /package/lib/{iconfont.1792979107495.woff → iconfont.1793007755017.woff} +0 -0
- /package/lib/{iconfont.1792979107495.woff2 → iconfont.1793007755017.woff2} +0 -0
- /package/lib/vxe-icon/style/{iconfont.1792979107495.ttf → iconfont.1793007755017.ttf} +0 -0
- /package/lib/vxe-icon/style/{iconfont.1792979107495.woff → iconfont.1793007755017.woff} +0 -0
- /package/lib/vxe-icon/style/{iconfont.1792979107495.woff2 → iconfont.1793007755017.woff2} +0 -0
|
@@ -1,1036 +1,994 @@
|
|
|
1
|
-
import { RenderFunction, SetupContext, Ref, ComputedRef } from 'vue'
|
|
2
|
-
import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, VxeComponentSizeType, ValueOf, VxeComponentIsVScrollbar, VxeUseInitVScrollbarReactData, VxeUseInitVScrollbarInternalData } from '@vxe-ui/core'
|
|
3
|
-
import { VxeContextMenuPropTypes, VxeContextMenuDefines } from './context-menu'
|
|
4
|
-
import { VxeTooltipPropTypes } from './tooltip'
|
|
5
|
-
import { VxeScrollbarProps } from './scrollbar'
|
|
6
|
-
|
|
7
|
-
/* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
|
|
8
|
-
|
|
9
|
-
export declare const VxeTree: DefineVxeComponentApp<VxeTreeProps, VxeTreeEventProps, VxeTreeSlots, VxeTreeMethods>
|
|
10
|
-
export type VxeTreeComponent = DefineVxeComponentOptions<VxeTreeProps, VxeTreeEventProps>
|
|
11
|
-
|
|
12
|
-
export type VxeTreeInstance<D = any> = DefineVxeComponentInstance<VxeTreeProps<D>, VxeTreeConstructor<D>>
|
|
13
|
-
|
|
14
|
-
export interface VxeTreeConstructor<D = any> extends VxeComponentBaseOptions, VxeTreeMethods<D> {
|
|
15
|
-
props: VxeTreeProps
|
|
16
|
-
context: SetupContext<VxeTreeEmits>
|
|
17
|
-
internalData: TreeInternalData
|
|
18
|
-
reactData: TreeReactData
|
|
19
|
-
getRefMaps(): TreePrivateRef
|
|
20
|
-
getComputeMaps(): TreePrivateComputed
|
|
21
|
-
renderVN: RenderFunction
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export interface TreePrivateRef {
|
|
25
|
-
refElem: Ref<HTMLDivElement | undefined>
|
|
26
|
-
}
|
|
27
|
-
export interface VxeTreePrivateRef extends TreePrivateRef {
|
|
28
|
-
|
|
29
|
-
export namespace VxeTreePropTypes {
|
|
30
|
-
export type Data<D = any> = D[]
|
|
31
|
-
export type Loading = boolean
|
|
32
|
-
export type AutoResize = boolean
|
|
33
|
-
export type ShowOverflow = boolean
|
|
34
|
-
export type EmptyText = string | number
|
|
35
|
-
/**
|
|
36
|
-
* 提示信息配置项
|
|
37
|
-
*/
|
|
38
|
-
export interface TooltipConfig<D = any> {
|
|
39
|
-
/**
|
|
40
|
-
* 当 show-overflow=true 时,默认使用指定提示类型
|
|
41
|
-
*/
|
|
42
|
-
mode?: 'ellipsis' | 'title' | 'tooltip' | '' | null
|
|
43
|
-
/**
|
|
44
|
-
* 所有节点开启工具提示
|
|
45
|
-
*/
|
|
46
|
-
showAll?: boolean
|
|
47
|
-
theme?: VxeTooltipPropTypes.Theme
|
|
48
|
-
/**
|
|
49
|
-
* 鼠标是否可进入到工具提示中
|
|
50
|
-
*/
|
|
51
|
-
enterable?: VxeTooltipPropTypes.Enterable
|
|
52
|
-
enterDelay?: VxeTooltipPropTypes.EnterDelay
|
|
53
|
-
leaveDelay?: VxeTooltipPropTypes.LeaveDelay
|
|
54
|
-
width?: VxeTooltipPropTypes.Width
|
|
55
|
-
height?: VxeTooltipPropTypes.Height
|
|
56
|
-
minWidth?: VxeTooltipPropTypes.MinWidth
|
|
57
|
-
minHeight?: VxeTooltipPropTypes.MinHeight
|
|
58
|
-
maxWidth?: VxeTooltipPropTypes.MaxWidth
|
|
59
|
-
maxHeight?: VxeTooltipPropTypes.MaxHeight
|
|
60
|
-
/**
|
|
61
|
-
* 显示为 HTML 标签
|
|
62
|
-
*/
|
|
63
|
-
useHtml?: VxeTooltipPropTypes.UseHtml
|
|
64
|
-
/**
|
|
65
|
-
* 固定方向
|
|
66
|
-
*/
|
|
67
|
-
placement?: VxeTooltipPropTypes.Placement
|
|
68
|
-
/**
|
|
69
|
-
* 默认方向
|
|
70
|
-
*/
|
|
71
|
-
defaultPlacement?: VxeTooltipPropTypes.DefaultPlacement
|
|
72
|
-
popupClassName?: VxeTooltipPropTypes.PopupClassName
|
|
73
|
-
/**
|
|
74
|
-
* 该方法可以通过返回值来重写默认的提示内容,可以返回 null 使用默认的提示内容,可以返回空内容去掉指定单元格的提示内容
|
|
75
|
-
*/
|
|
76
|
-
contentMethod?(params: {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
*
|
|
85
|
-
*/
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
export type
|
|
93
|
-
export type
|
|
94
|
-
export type
|
|
95
|
-
export type
|
|
96
|
-
export type
|
|
97
|
-
export type
|
|
98
|
-
export type
|
|
99
|
-
export type
|
|
100
|
-
export type
|
|
101
|
-
export type
|
|
102
|
-
export type
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
*
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
export type
|
|
117
|
-
export type
|
|
118
|
-
export type
|
|
119
|
-
export
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
export
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
*
|
|
536
|
-
*/
|
|
537
|
-
|
|
538
|
-
/**
|
|
539
|
-
*
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
/**
|
|
610
|
-
*
|
|
611
|
-
*/
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
*
|
|
620
|
-
*/
|
|
621
|
-
|
|
622
|
-
/**
|
|
623
|
-
*
|
|
624
|
-
*/
|
|
625
|
-
|
|
626
|
-
/**
|
|
627
|
-
*
|
|
628
|
-
*/
|
|
629
|
-
|
|
630
|
-
/**
|
|
631
|
-
*
|
|
632
|
-
*/
|
|
633
|
-
|
|
634
|
-
/**
|
|
635
|
-
*
|
|
636
|
-
*/
|
|
637
|
-
|
|
638
|
-
/**
|
|
639
|
-
*
|
|
640
|
-
*/
|
|
641
|
-
|
|
642
|
-
/**
|
|
643
|
-
*
|
|
644
|
-
*/
|
|
645
|
-
|
|
646
|
-
/**
|
|
647
|
-
*
|
|
648
|
-
*/
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
/**
|
|
680
|
-
*
|
|
681
|
-
*/
|
|
682
|
-
|
|
683
|
-
/**
|
|
684
|
-
* 用于
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
*
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
/**
|
|
722
|
-
*
|
|
723
|
-
*/
|
|
724
|
-
|
|
725
|
-
/**
|
|
726
|
-
*
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
}
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
}
|
|
890
|
-
|
|
891
|
-
export interface
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
export type
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
}
|
|
970
|
-
|
|
971
|
-
export interface
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
export type NodeDragstart<D = any> = (params: VxeTreeDefines.NodeDragstartEventParams<D>) => void
|
|
996
|
-
export type NodeDragover<D = any> = (params: VxeTreeDefines.NodeDragoverEventParams<D>) => void
|
|
997
|
-
export type NodeDragend<D = any> = (params: VxeTreeDefines.NodeDragendEventParams<D>) => void
|
|
998
|
-
export type NodeExpand<D = any> = (params: VxeTreeDefines.NodeExpandEventParams<D>) => void
|
|
999
|
-
export type NodeMenu<D = any> = (params: VxeTreeDefines.NodeMenuEventParams<D>) => void
|
|
1000
|
-
export type MenuClick<D = any> = (params: VxeTreeDefines.MenuClickEventParams<D>) => void
|
|
1001
|
-
}
|
|
1002
|
-
|
|
1003
|
-
export namespace VxeTreeSlotTypes {
|
|
1004
|
-
export interface DefaultSlotParams {
|
|
1005
|
-
node: any
|
|
1006
|
-
isExpand: boolean
|
|
1007
|
-
}
|
|
1008
|
-
export interface IconSlotParams {
|
|
1009
|
-
node: any
|
|
1010
|
-
isExpand: boolean
|
|
1011
|
-
}
|
|
1012
|
-
export interface TitleSlotParams extends DefaultSlotParams {}
|
|
1013
|
-
export interface ExtraSlotParams extends DefaultSlotParams {}
|
|
1014
|
-
|
|
1015
|
-
export interface HeaderSlotParams {}
|
|
1016
|
-
export interface FooterSlotParams {}
|
|
1017
|
-
export interface LoadingSlotParams {}
|
|
1018
|
-
export interface TooltipSlotParams {
|
|
1019
|
-
node: any
|
|
1020
|
-
}
|
|
1021
|
-
export interface EmptySlotParams {}
|
|
1022
|
-
}
|
|
1023
|
-
|
|
1024
|
-
export interface VxeTreeSlots {
|
|
1025
|
-
icon?: (params: VxeTreeSlotTypes.IconSlotParams) => any
|
|
1026
|
-
title?: (params: VxeTreeSlotTypes.TitleSlotParams) => any
|
|
1027
|
-
extra?: (params: VxeTreeSlotTypes.ExtraSlotParams) => any
|
|
1028
|
-
header?: (params: VxeTreeSlotTypes.HeaderSlotParams) => any
|
|
1029
|
-
footer?: (params: VxeTreeSlotTypes.FooterSlotParams) => any
|
|
1030
|
-
loading?: (params: VxeTreeSlotTypes.LoadingSlotParams) => any
|
|
1031
|
-
tooltip?: (params: VxeTreeSlotTypes.TooltipSlotParams) => any
|
|
1032
|
-
empty?: (params: VxeTreeSlotTypes.EmptySlotParams) => any
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
|
-
export const Tree: typeof VxeTree
|
|
1036
|
-
export default VxeTree
|
|
1
|
+
import { RenderFunction, SetupContext, Ref, ComputedRef } from 'vue'
|
|
2
|
+
import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentBaseOptions, VxeComponentEventParams, VxeComponentSizeType, ValueOf, VxeComponentIsVScrollbar, VxeUseInitVScrollbarReactData, VxeUseInitVScrollbarInternalData } from '@vxe-ui/core'
|
|
3
|
+
import { VxeContextMenuPropTypes, VxeContextMenuDefines } from './context-menu'
|
|
4
|
+
import { VxeTooltipPropTypes } from './tooltip'
|
|
5
|
+
import { VxeScrollbarProps } from './scrollbar'
|
|
6
|
+
|
|
7
|
+
/* eslint-disable no-use-before-define,@typescript-eslint/ban-types */
|
|
8
|
+
|
|
9
|
+
export declare const VxeTree: DefineVxeComponentApp<VxeTreeProps, VxeTreeEventProps, VxeTreeSlots, VxeTreeMethods>
|
|
10
|
+
export type VxeTreeComponent = DefineVxeComponentOptions<VxeTreeProps, VxeTreeEventProps>
|
|
11
|
+
|
|
12
|
+
export type VxeTreeInstance<D = any> = DefineVxeComponentInstance<VxeTreeProps<D>, VxeTreeConstructor<D>>
|
|
13
|
+
|
|
14
|
+
export interface VxeTreeConstructor<D = any> extends VxeComponentBaseOptions, VxeTreeMethods<D> {
|
|
15
|
+
props: VxeTreeProps
|
|
16
|
+
context: SetupContext<VxeTreeEmits>
|
|
17
|
+
internalData: TreeInternalData
|
|
18
|
+
reactData: TreeReactData
|
|
19
|
+
getRefMaps(): TreePrivateRef
|
|
20
|
+
getComputeMaps(): TreePrivateComputed
|
|
21
|
+
renderVN: RenderFunction
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface TreePrivateRef {
|
|
25
|
+
refElem: Ref<HTMLDivElement | undefined>
|
|
26
|
+
}
|
|
27
|
+
export interface VxeTreePrivateRef extends TreePrivateRef {}
|
|
28
|
+
|
|
29
|
+
export namespace VxeTreePropTypes {
|
|
30
|
+
export type Data<D = any> = D[]
|
|
31
|
+
export type Loading = boolean
|
|
32
|
+
export type AutoResize = boolean
|
|
33
|
+
export type ShowOverflow = boolean
|
|
34
|
+
export type EmptyText = string | number
|
|
35
|
+
/**
|
|
36
|
+
* 提示信息配置项
|
|
37
|
+
*/
|
|
38
|
+
export interface TooltipConfig<D = any> {
|
|
39
|
+
/**
|
|
40
|
+
* 当 show-overflow=true 时,默认使用指定提示类型
|
|
41
|
+
*/
|
|
42
|
+
mode?: 'ellipsis' | 'title' | 'tooltip' | '' | null
|
|
43
|
+
/**
|
|
44
|
+
* 所有节点开启工具提示
|
|
45
|
+
*/
|
|
46
|
+
showAll?: boolean
|
|
47
|
+
theme?: VxeTooltipPropTypes.Theme
|
|
48
|
+
/**
|
|
49
|
+
* 鼠标是否可进入到工具提示中
|
|
50
|
+
*/
|
|
51
|
+
enterable?: VxeTooltipPropTypes.Enterable
|
|
52
|
+
enterDelay?: VxeTooltipPropTypes.EnterDelay
|
|
53
|
+
leaveDelay?: VxeTooltipPropTypes.LeaveDelay
|
|
54
|
+
width?: VxeTooltipPropTypes.Width
|
|
55
|
+
height?: VxeTooltipPropTypes.Height
|
|
56
|
+
minWidth?: VxeTooltipPropTypes.MinWidth
|
|
57
|
+
minHeight?: VxeTooltipPropTypes.MinHeight
|
|
58
|
+
maxWidth?: VxeTooltipPropTypes.MaxWidth
|
|
59
|
+
maxHeight?: VxeTooltipPropTypes.MaxHeight
|
|
60
|
+
/**
|
|
61
|
+
* 显示为 HTML 标签
|
|
62
|
+
*/
|
|
63
|
+
useHtml?: VxeTooltipPropTypes.UseHtml
|
|
64
|
+
/**
|
|
65
|
+
* 固定方向
|
|
66
|
+
*/
|
|
67
|
+
placement?: VxeTooltipPropTypes.Placement
|
|
68
|
+
/**
|
|
69
|
+
* 默认方向
|
|
70
|
+
*/
|
|
71
|
+
defaultPlacement?: VxeTooltipPropTypes.DefaultPlacement
|
|
72
|
+
popupClassName?: VxeTooltipPropTypes.PopupClassName
|
|
73
|
+
/**
|
|
74
|
+
* 该方法可以通过返回值来重写默认的提示内容,可以返回 null 使用默认的提示内容,可以返回空内容去掉指定单元格的提示内容
|
|
75
|
+
*/
|
|
76
|
+
contentMethod?(params: { $tree: VxeTreeConstructor<D>; node: D; $event: any }): string | boolean | null | void
|
|
77
|
+
}
|
|
78
|
+
export interface LoadingConfig {
|
|
79
|
+
/**
|
|
80
|
+
* 显示图标
|
|
81
|
+
*/
|
|
82
|
+
icon?: string
|
|
83
|
+
/**
|
|
84
|
+
* 显示文字
|
|
85
|
+
*/
|
|
86
|
+
text?: string
|
|
87
|
+
}
|
|
88
|
+
export type Accordion = boolean
|
|
89
|
+
export type Height = string | number
|
|
90
|
+
export type MinHeight = string | number
|
|
91
|
+
export type MaxHeight = string | number
|
|
92
|
+
export type ParentField = string
|
|
93
|
+
export type ValueField = string
|
|
94
|
+
export type KeyField = string
|
|
95
|
+
export type TitleField = string
|
|
96
|
+
export type ChildrenField = string
|
|
97
|
+
export type HasChildField = string
|
|
98
|
+
export type MapChildrenField = string
|
|
99
|
+
export type Transform = boolean
|
|
100
|
+
export type RootParentValue = string | number | null
|
|
101
|
+
export type RootValues = (string | number)[]
|
|
102
|
+
export type Trigger = '' | 'default' | 'node'
|
|
103
|
+
/**
|
|
104
|
+
* 已废弃,请使用 nodeConfig.isCurrent
|
|
105
|
+
* @deprecated
|
|
106
|
+
*/
|
|
107
|
+
export type IsCurrent = boolean
|
|
108
|
+
/**
|
|
109
|
+
* 已废弃,请使用 nodeConfig.isHover
|
|
110
|
+
* @deprecated
|
|
111
|
+
*/
|
|
112
|
+
export type IsHover = boolean
|
|
113
|
+
export type ShowLine = boolean
|
|
114
|
+
export type Indent = number
|
|
115
|
+
export type ExpandAll = boolean
|
|
116
|
+
export type ExpandNodeKeys = string[] | number[]
|
|
117
|
+
export type ShowRadio = boolean
|
|
118
|
+
export type CheckNodeKey = string | number | null
|
|
119
|
+
export interface RadioConfig<D = any> {
|
|
120
|
+
strict?: boolean
|
|
121
|
+
visibleMode?: 'all' | 'first' | 'last' | '' | null
|
|
122
|
+
visibleMethod?: (params: { $tree: VxeTreeConstructor; node: D }) => boolean
|
|
123
|
+
checkMode?: 'all' | 'first' | 'last' | '' | null
|
|
124
|
+
checkMethod?: (params: { $tree: VxeTreeConstructor; node: D }) => boolean
|
|
125
|
+
highlight?: boolean
|
|
126
|
+
showIcon?: boolean
|
|
127
|
+
trigger?: '' | 'default' | 'node'
|
|
128
|
+
}
|
|
129
|
+
export type CheckNodeKeys = (string | number | null)[]
|
|
130
|
+
export type ShowCheckbox = boolean
|
|
131
|
+
export interface CheckboxConfig<D = any> {
|
|
132
|
+
showHeader?: boolean
|
|
133
|
+
checkStrictly?: boolean
|
|
134
|
+
highlight?: boolean
|
|
135
|
+
visibleMode?: 'all' | 'first' | 'last' | '' | null
|
|
136
|
+
visibleMethod?: (params: { $tree: VxeTreeConstructor; node: D }) => boolean
|
|
137
|
+
checkMode?: 'all' | 'first' | 'last' | '' | null
|
|
138
|
+
checkMethod?: (params: { $tree: VxeTreeConstructor; node: D }) => boolean
|
|
139
|
+
showIcon?: boolean
|
|
140
|
+
trigger?: '' | 'default' | 'node'
|
|
141
|
+
nodeStyle?: {
|
|
142
|
+
indeterminateColor?: string
|
|
143
|
+
checkedColor?: string
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
export interface NodeConfig<D = any> {
|
|
147
|
+
isHover?: boolean
|
|
148
|
+
isCurrent?: boolean
|
|
149
|
+
currentMethod?: (params: { node: D }) => boolean
|
|
150
|
+
trigger?: '' | 'default' | 'all' | 'parent' | 'child'
|
|
151
|
+
}
|
|
152
|
+
export type Lazy = boolean
|
|
153
|
+
export type VisibleMethod<D = any> = (params: { $tree: VxeTreeConstructor; node: D }) => boolean
|
|
154
|
+
export type ToggleMethod<D = any> = (params: { $tree: VxeTreeConstructor; expanded: boolean; node: D }) => boolean
|
|
155
|
+
export type LoadMethod<D = any> = (params: { $tree: VxeTreeConstructor; node: D }) => Promise<any[]>
|
|
156
|
+
export type ShowIcon = boolean
|
|
157
|
+
export type IconOpen = string
|
|
158
|
+
export type IconClose = string
|
|
159
|
+
export type IconLoaded = string
|
|
160
|
+
export type Size = VxeComponentSizeType
|
|
161
|
+
|
|
162
|
+
export type Drag = boolean
|
|
163
|
+
export interface DragConfig<D = any> {
|
|
164
|
+
/**
|
|
165
|
+
* 自定义图标
|
|
166
|
+
*/
|
|
167
|
+
icon?: string
|
|
168
|
+
/**
|
|
169
|
+
* 是否显示拖拽按钮图标
|
|
170
|
+
*/
|
|
171
|
+
showIcon?: boolean
|
|
172
|
+
/**
|
|
173
|
+
* 显示拖拽提示,拖拽过程中显示信息
|
|
174
|
+
*/
|
|
175
|
+
showDragTip?: boolean
|
|
176
|
+
/**
|
|
177
|
+
* 触发拖拽方式
|
|
178
|
+
*/
|
|
179
|
+
trigger?: 'default' | 'node' | '' | null
|
|
180
|
+
/**
|
|
181
|
+
* 是否允许同级行拖拽,用于树结构,启用后允许同层级之间进行拖拽
|
|
182
|
+
*/
|
|
183
|
+
isPeerDrag?: boolean
|
|
184
|
+
/**
|
|
185
|
+
* 是否允许同级/跨层行拖拽,用于树结构,启用后允许跨层级拖拽(除了上级拖到子级)
|
|
186
|
+
*/
|
|
187
|
+
isCrossDrag?: boolean
|
|
188
|
+
/**
|
|
189
|
+
* 需要 isCrossDrag,是否允许拖拽成目标行的子级
|
|
190
|
+
*/
|
|
191
|
+
isToChildDrag?: boolean
|
|
192
|
+
/**
|
|
193
|
+
* 需要 isCrossDrag,是否允许将自己拖拽到子级行中
|
|
194
|
+
*/
|
|
195
|
+
isSelfToChildDrag?: boolean
|
|
196
|
+
/**
|
|
197
|
+
* 是否允许在不同树之间进行拖拽
|
|
198
|
+
*/
|
|
199
|
+
isCrossTreeDrag?: boolean
|
|
200
|
+
/**
|
|
201
|
+
* 是否显示拖拽辅助状态显示
|
|
202
|
+
*/
|
|
203
|
+
showGuidesStatus?: boolean
|
|
204
|
+
/**
|
|
205
|
+
* 是否显示拖拽动画,启用后由数据量的大小来影响渲染性能
|
|
206
|
+
*/
|
|
207
|
+
animation?: boolean
|
|
208
|
+
/**
|
|
209
|
+
* 是否禁用拖拽按钮
|
|
210
|
+
*/
|
|
211
|
+
disabledMethod?(params: { $tree: VxeTreeConstructor; node: D }): boolean
|
|
212
|
+
/**
|
|
213
|
+
* 是否显示拖拽按钮
|
|
214
|
+
*/
|
|
215
|
+
visibleMethod?(params: { $tree: VxeTreeConstructor; node: D }): boolean
|
|
216
|
+
/**
|
|
217
|
+
* 自定义提示内容
|
|
218
|
+
*/
|
|
219
|
+
tooltipMethod?(params: { $tree: VxeTreeConstructor; node: D }): string | number | null
|
|
220
|
+
/**
|
|
221
|
+
* 拖拽开始时是否允许行拖拽调整顺序的方法,该方法的返回值用来决定是否允许被拖拽
|
|
222
|
+
*/
|
|
223
|
+
dragStartMethod?(params: VxeTreeDefines.NodeDragstartEventParams<D>): boolean
|
|
224
|
+
/**
|
|
225
|
+
* 拖拽结束时是否允许行拖拽调整顺序的方法,该方法的返回值用来决定是否允许被拖拽调整顺序
|
|
226
|
+
*/
|
|
227
|
+
dragEndMethod?(params: Omit<VxeTreeDefines.NodeDragendEventParams<D>, '_index'>): Promise<boolean> | boolean
|
|
228
|
+
/**
|
|
229
|
+
* 用于 isToChildDrag,在拖拽完成后,该方法的返回值用于决定是否拖拽成子级
|
|
230
|
+
*/
|
|
231
|
+
dragToChildMethod?(params: Omit<VxeTreeDefines.NodeDragToChildMethod<D>, '_index'>): boolean
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export interface MenuConfig<D = any> {
|
|
235
|
+
/**
|
|
236
|
+
* 是否启用
|
|
237
|
+
*/
|
|
238
|
+
enabled?: boolean
|
|
239
|
+
/**
|
|
240
|
+
* 菜单配置
|
|
241
|
+
*/
|
|
242
|
+
options: VxeContextMenuPropTypes.Options
|
|
243
|
+
/**
|
|
244
|
+
* 该函数的返回值用来决定是否允许显示右键菜单(对于需要对菜单进行权限控制时可能会用到)
|
|
245
|
+
*/
|
|
246
|
+
visibleMethod?(params: { $tree: VxeTreeConstructor; options: VxeContextMenuPropTypes.Options; node: D }): boolean
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* 根据指定值来筛选数据
|
|
251
|
+
*/
|
|
252
|
+
export type FilterValue = string | number | null | undefined
|
|
253
|
+
export interface FilterConfig<D = any> {
|
|
254
|
+
/**
|
|
255
|
+
* 过滤后是否自动展开与收起所有节点
|
|
256
|
+
*/
|
|
257
|
+
autoExpandAll?: boolean
|
|
258
|
+
/**
|
|
259
|
+
* 过滤之前的方法
|
|
260
|
+
*/
|
|
261
|
+
beforeFilterMethod?(params: { $tree: VxeTreeConstructor; filterValue: FilterValue }): void
|
|
262
|
+
/**
|
|
263
|
+
* 自定义过滤数据方法
|
|
264
|
+
*/
|
|
265
|
+
filterMethod?: (params: { $tree: VxeTreeConstructor; node: D; filterValue: FilterValue }) => boolean
|
|
266
|
+
/**
|
|
267
|
+
* 过滤之后的方法
|
|
268
|
+
*/
|
|
269
|
+
afterFilterMethod?(params: { $tree: VxeTreeConstructor; filterValue: FilterValue }): void
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
export interface VirtualYConfig {
|
|
273
|
+
/**
|
|
274
|
+
* 指定大于指定行时自动启动纵向虚拟滚动,如果为 0 则总是启用,如果为 -1 则关闭
|
|
275
|
+
*/
|
|
276
|
+
gt?: number
|
|
277
|
+
/**
|
|
278
|
+
* 指定每次渲染的数据额外数据,额外数据越大渲染次数就越少,但每次渲染耗时就越久
|
|
279
|
+
*/
|
|
280
|
+
oSize?: number
|
|
281
|
+
/**
|
|
282
|
+
* 是否启用
|
|
283
|
+
*/
|
|
284
|
+
enabled?: boolean
|
|
285
|
+
}
|
|
286
|
+
export type UseScrollbar = VxeComponentIsVScrollbar
|
|
287
|
+
export interface ScrollbarConfig extends Pick<VxeScrollbarProps, 'xConfig' | 'yConfig' | 'padding' | 'autoHide' | 'fluentOverlay' | 'visible'> {
|
|
288
|
+
/**
|
|
289
|
+
* 滚动条宽度
|
|
290
|
+
*/
|
|
291
|
+
width?: number | string
|
|
292
|
+
/**
|
|
293
|
+
* 滚动条高度
|
|
294
|
+
*/
|
|
295
|
+
height?: number | string
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
export interface VxeTreeProps<D = any> {
|
|
300
|
+
/**
|
|
301
|
+
* 数据源
|
|
302
|
+
*/
|
|
303
|
+
data?: VxeTreePropTypes.Data<D>
|
|
304
|
+
autoResize?: VxeTreePropTypes.AutoResize
|
|
305
|
+
/**
|
|
306
|
+
* 高度
|
|
307
|
+
*/
|
|
308
|
+
height?: VxeTreePropTypes.Height
|
|
309
|
+
/**
|
|
310
|
+
* 最小高度
|
|
311
|
+
*/
|
|
312
|
+
minHeight?: VxeTreePropTypes.MinHeight
|
|
313
|
+
/**
|
|
314
|
+
* 最大高度
|
|
315
|
+
*/
|
|
316
|
+
maxHeight?: VxeTreePropTypes.MaxHeight
|
|
317
|
+
loading?: VxeTreePropTypes.Loading
|
|
318
|
+
loadingConfig?: VxeTreePropTypes.LoadingConfig
|
|
319
|
+
/**
|
|
320
|
+
* 空数据时显示的内容
|
|
321
|
+
*/
|
|
322
|
+
emptyText?: VxeTreePropTypes.EmptyText
|
|
323
|
+
accordion?: VxeTreePropTypes.Accordion
|
|
324
|
+
parentField?: VxeTreePropTypes.ParentField
|
|
325
|
+
valueField?: VxeTreePropTypes.ValueField
|
|
326
|
+
keyField?: VxeTreePropTypes.KeyField
|
|
327
|
+
titleField?: VxeTreePropTypes.TitleField
|
|
328
|
+
childrenField?: VxeTreePropTypes.ChildrenField
|
|
329
|
+
hasChildField?: VxeTreePropTypes.HasChildField
|
|
330
|
+
mapChildrenField?: VxeTreePropTypes.MapChildrenField
|
|
331
|
+
showOverflow?: VxeTreePropTypes.ShowOverflow
|
|
332
|
+
tooltipConfig?: VxeTreePropTypes.TooltipConfig
|
|
333
|
+
/**
|
|
334
|
+
* 默认展开所有节点(只会在初始化时被触发一次)
|
|
335
|
+
*/
|
|
336
|
+
expandAll?: VxeTreePropTypes.ExpandAll
|
|
337
|
+
/**
|
|
338
|
+
* 默认展开指定节点(只会在初始化时被触发一次)
|
|
339
|
+
*/
|
|
340
|
+
expandNodeKeys?: VxeTreePropTypes.ExpandNodeKeys
|
|
341
|
+
transform?: VxeTreePropTypes.Transform
|
|
342
|
+
/**
|
|
343
|
+
* 用于 transform 模式,指定根节点的父级节点值
|
|
344
|
+
*/
|
|
345
|
+
rootParentValue?: VxeTreePropTypes.RootParentValue
|
|
346
|
+
/**
|
|
347
|
+
* 用于 transform 模式,指定根节点的值
|
|
348
|
+
*/
|
|
349
|
+
rootValues?: VxeTreePropTypes.RootValues
|
|
350
|
+
trigger?: VxeTreePropTypes.Trigger
|
|
351
|
+
/**
|
|
352
|
+
* 已废弃,请使用 nodeConfig.isCurrent
|
|
353
|
+
* @deprecated
|
|
354
|
+
*/
|
|
355
|
+
isCurrent?: VxeTreePropTypes.IsCurrent
|
|
356
|
+
/**
|
|
357
|
+
* 已废弃,请使用 nodeConfig.isHover
|
|
358
|
+
* @deprecated
|
|
359
|
+
*/
|
|
360
|
+
isHover?: VxeTreePropTypes.IsHover
|
|
361
|
+
showLine?: VxeTreePropTypes.ShowLine
|
|
362
|
+
indent?: VxeTreePropTypes.Indent
|
|
363
|
+
showRadio?: VxeTreePropTypes.ShowRadio
|
|
364
|
+
checkNodeKey?: VxeTreePropTypes.CheckNodeKey
|
|
365
|
+
radioConfig?: VxeTreePropTypes.RadioConfig<D>
|
|
366
|
+
showCheckbox?: VxeTreePropTypes.ShowCheckbox
|
|
367
|
+
checkNodeKeys?: VxeTreePropTypes.CheckNodeKeys
|
|
368
|
+
checkboxConfig?: VxeTreePropTypes.CheckboxConfig<D>
|
|
369
|
+
nodeConfig?: VxeTreePropTypes.NodeConfig<D>
|
|
370
|
+
menuConfig?: VxeTreePropTypes.MenuConfig<D>
|
|
371
|
+
filterValue?: VxeTreePropTypes.FilterValue
|
|
372
|
+
filterConfig?: VxeTreePropTypes.FilterConfig
|
|
373
|
+
lazy?: VxeTreePropTypes.Lazy
|
|
374
|
+
visibleMethod?: VxeTreePropTypes.VisibleMethod<D>
|
|
375
|
+
toggleMethod?: VxeTreePropTypes.ToggleMethod<D>
|
|
376
|
+
/**
|
|
377
|
+
* 该方法用于异步加载子节点
|
|
378
|
+
*/
|
|
379
|
+
loadMethod?: VxeTreePropTypes.LoadMethod<D>
|
|
380
|
+
drag?: VxeTreePropTypes.Drag
|
|
381
|
+
dragConfig?: VxeTreePropTypes.DragConfig
|
|
382
|
+
showIcon?: VxeTreePropTypes.ShowIcon
|
|
383
|
+
iconOpen?: VxeTreePropTypes.IconOpen
|
|
384
|
+
iconClose?: VxeTreePropTypes.IconClose
|
|
385
|
+
iconLoaded?: VxeTreePropTypes.IconLoaded
|
|
386
|
+
size?: VxeTreePropTypes.Size
|
|
387
|
+
virtualYConfig?: VxeTreePropTypes.VirtualYConfig
|
|
388
|
+
/**
|
|
389
|
+
* 使用虚拟滚动条
|
|
390
|
+
*/
|
|
391
|
+
useScrollbar?: VxeTreePropTypes.UseScrollbar
|
|
392
|
+
/**
|
|
393
|
+
* 滚动条配置项
|
|
394
|
+
*/
|
|
395
|
+
scrollbarConfig?: VxeTreePropTypes.ScrollbarConfig
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
export interface TreePrivateComputed<D = any> {
|
|
399
|
+
computeKeyField: ComputedRef<string>
|
|
400
|
+
computeParentField: ComputedRef<string>
|
|
401
|
+
computeChildrenField: ComputedRef<string>
|
|
402
|
+
computeMapChildrenField: ComputedRef<string>
|
|
403
|
+
computeRadioOpts: ComputedRef<VxeTreePropTypes.RadioConfig<D>>
|
|
404
|
+
computeCheckboxOpts: ComputedRef<VxeTreePropTypes.CheckboxConfig<D>>
|
|
405
|
+
computeNodeOpts: ComputedRef<VxeTreePropTypes.NodeConfig<D>>
|
|
406
|
+
computeDragOpts: ComputedRef<VxeTreePropTypes.DragConfig<D>>
|
|
407
|
+
}
|
|
408
|
+
export interface VxeTreePrivateComputed extends TreePrivateComputed {}
|
|
409
|
+
|
|
410
|
+
export interface TreeReactData extends VxeUseInitVScrollbarReactData {
|
|
411
|
+
parentHeight: number
|
|
412
|
+
customHeight: number
|
|
413
|
+
customMinHeight: number
|
|
414
|
+
customMaxHeight: number
|
|
415
|
+
currentNode: any
|
|
416
|
+
scrollYLoad: boolean
|
|
417
|
+
bodyHeight: number
|
|
418
|
+
topSpaceHeight: number
|
|
419
|
+
selectRadioKey: VxeTreePropTypes.CheckNodeKey | null
|
|
420
|
+
treeList: any[]
|
|
421
|
+
updateExpandedFlag: number
|
|
422
|
+
updateCheckboxFlag: number
|
|
423
|
+
|
|
424
|
+
insertNodeFlag: number
|
|
425
|
+
removeNodeFlag: number
|
|
426
|
+
|
|
427
|
+
dragNode: any
|
|
428
|
+
dragTipText: string
|
|
429
|
+
isCrossDragNode: boolean
|
|
430
|
+
|
|
431
|
+
tooltipStore: {
|
|
432
|
+
visible: boolean
|
|
433
|
+
node: any
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
export interface TreeInternalData extends VxeUseInitVScrollbarInternalData {
|
|
438
|
+
initialized?: boolean
|
|
439
|
+
lastFilterValue?: string
|
|
440
|
+
afterTreeList: any[]
|
|
441
|
+
treeFullData: any[]
|
|
442
|
+
afterVisibleList: any[]
|
|
443
|
+
nodeMaps: Record<string, VxeTreeDefines.NodeCacheItem>
|
|
444
|
+
indeterminateNodeMaps: Record<string, any>
|
|
445
|
+
selectCheckboxMaps: Record<string, any>
|
|
446
|
+
treeExpandedMaps: Record<string, boolean>
|
|
447
|
+
treeExpandLazyLoadedMaps: Record<string, boolean>
|
|
448
|
+
|
|
449
|
+
resizeObserver?: ResizeObserver
|
|
450
|
+
|
|
451
|
+
scrollYStore: {
|
|
452
|
+
startIndex: number
|
|
453
|
+
endIndex: number
|
|
454
|
+
visibleSize: number
|
|
455
|
+
offsetSize: number
|
|
456
|
+
rowHeight: number
|
|
457
|
+
}
|
|
458
|
+
lastScrollTime: number
|
|
459
|
+
hpTimeout?: undefined | number
|
|
460
|
+
tipTimeout?: any
|
|
461
|
+
|
|
462
|
+
insertNodeMaps: Record<string, any>
|
|
463
|
+
removeNodeMaps: Record<string, any>
|
|
464
|
+
|
|
465
|
+
prevDragNode?: any
|
|
466
|
+
prevDragToChild?: boolean
|
|
467
|
+
prevDragPos?: 'top' | 'bottom' | ''
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
export interface TreeMethods<D = any> {
|
|
471
|
+
dispatchEvent(type: ValueOf<VxeTreeEmits>, params: Record<string, any>, evnt: Event | null): void
|
|
472
|
+
/**
|
|
473
|
+
* 获取滚动视图元素
|
|
474
|
+
*/
|
|
475
|
+
getScrollViewElem(): HTMLElement | null | undefined
|
|
476
|
+
/**
|
|
477
|
+
* 加载数据
|
|
478
|
+
*/
|
|
479
|
+
loadData(data: any[]): Promise<any>
|
|
480
|
+
/**
|
|
481
|
+
* 加载数据并清除所有状态
|
|
482
|
+
*/
|
|
483
|
+
reloadData(data: any[]): Promise<any>
|
|
484
|
+
/**
|
|
485
|
+
* 根据节点获取的主键
|
|
486
|
+
* @param node
|
|
487
|
+
*/
|
|
488
|
+
getNodeId(node: any): string
|
|
489
|
+
/**
|
|
490
|
+
* 根据唯一主键获取节点
|
|
491
|
+
* @param nodeid
|
|
492
|
+
*/
|
|
493
|
+
getNodeById(nodeid: string): D
|
|
494
|
+
/**
|
|
495
|
+
* 获取当前选中节点的主键
|
|
496
|
+
*/
|
|
497
|
+
getCurrentNodeId(): string | number | null
|
|
498
|
+
/**
|
|
499
|
+
* 获取当前选中节点
|
|
500
|
+
*/
|
|
501
|
+
getCurrentNode(): any | null
|
|
502
|
+
/**
|
|
503
|
+
* 清除当前选中节点
|
|
504
|
+
*/
|
|
505
|
+
clearCurrentNode(): Promise<any>
|
|
506
|
+
/**
|
|
507
|
+
* 根据主键设置当前节点是否被选中
|
|
508
|
+
*/
|
|
509
|
+
setCurrentNodeId(nodeKey: string | number | null): Promise<any>
|
|
510
|
+
/**
|
|
511
|
+
* 根据节点设置当前节点是否被选中
|
|
512
|
+
*/
|
|
513
|
+
setCurrentNode(node: any): Promise<any>
|
|
514
|
+
/**
|
|
515
|
+
* 只对 show-radio 有效,获取单选框的节点对应的键值
|
|
516
|
+
*/
|
|
517
|
+
getRadioNodeId(): string | number | null
|
|
518
|
+
/**
|
|
519
|
+
* 只对 show-radio 有效,获取单选框的节点
|
|
520
|
+
*/
|
|
521
|
+
getRadioNode(): any | null
|
|
522
|
+
/**
|
|
523
|
+
* 用于 showRadio,手动清空单选框的
|
|
524
|
+
*/
|
|
525
|
+
clearRadioNode(): Promise<any>
|
|
526
|
+
/**
|
|
527
|
+
* 只对 show-radio 有效,通过键值设置节点是否被选中
|
|
528
|
+
*/
|
|
529
|
+
setRadioNodeId(nodeKey: string | number | null): Promise<any>
|
|
530
|
+
/**
|
|
531
|
+
* 用于 showRadio 单选框,设置指定节点为选中状态
|
|
532
|
+
*/
|
|
533
|
+
setRadioNode(node: any): Promise<any>
|
|
534
|
+
/**
|
|
535
|
+
* 只对 show-checkbox 有效,获取复选框的节点对应的键值
|
|
536
|
+
*/
|
|
537
|
+
getCheckboxNodeIds(): (string | number)[]
|
|
538
|
+
/**
|
|
539
|
+
* 只对 show-checkbox 有效,获取复选框的节点
|
|
540
|
+
*/
|
|
541
|
+
getCheckboxNodes(): D[]
|
|
542
|
+
/**
|
|
543
|
+
* 只对 show-checkbox 有效,获取复选框的节点
|
|
544
|
+
*/
|
|
545
|
+
getCheckboxRecords(): D[]
|
|
546
|
+
/**
|
|
547
|
+
* 用于 showCheckbox,手动清空复选框的
|
|
548
|
+
*/
|
|
549
|
+
clearCheckboxNode(): Promise<{
|
|
550
|
+
checkNodes: D[]
|
|
551
|
+
checkNodeKeys: (string | number)[]
|
|
552
|
+
}>
|
|
553
|
+
/**
|
|
554
|
+
* 用于 showCheckbox,设置所有节点的选中状态
|
|
555
|
+
*/
|
|
556
|
+
setAllCheckboxNode(checked: boolean): Promise<{
|
|
557
|
+
checkNodes: D[]
|
|
558
|
+
checkNodeKeys: (string | number)[]
|
|
559
|
+
}>
|
|
560
|
+
/**
|
|
561
|
+
* 用于 showCheckbox 复选框,设置指定节点为选中状态,第二个参数为选中与否
|
|
562
|
+
*/
|
|
563
|
+
setCheckboxNode(nodeList: any | any[], checked: boolean): Promise<any>
|
|
564
|
+
/**
|
|
565
|
+
* 用于 showCheckbox 复选框,设置指定节点 key 为选中状态,第二个参数为选中与否
|
|
566
|
+
*/
|
|
567
|
+
setCheckboxByNodeId(nodeKeys: string | number | null | (string | number | null)[], checked: boolean): Promise<any>
|
|
568
|
+
/**
|
|
569
|
+
* 已废弃,请使用 clearAllExpandNode
|
|
570
|
+
* @deprecated
|
|
571
|
+
*/
|
|
572
|
+
clearExpandNode(): Promise<any>
|
|
573
|
+
/**
|
|
574
|
+
* 手动清除所有树节点的展开状态
|
|
575
|
+
*/
|
|
576
|
+
clearAllExpandNode(): Promise<any>
|
|
577
|
+
/**
|
|
578
|
+
* 设置指定节点 key 为展开状态,第二个参数为选中与否
|
|
579
|
+
*/
|
|
580
|
+
setExpandByNodeId(nodeKeys: string | number | null | (string | number | null)[], expanded: boolean): Promise<any>
|
|
581
|
+
/**
|
|
582
|
+
* 设置指定节点为展开状态
|
|
583
|
+
*/
|
|
584
|
+
setExpandNode(nodeList: any | any[], expanded: boolean): Promise<any>
|
|
585
|
+
/**
|
|
586
|
+
* 根据节点主键切换指定节点为展开状态
|
|
587
|
+
*/
|
|
588
|
+
toggleExpandByNodeId(nodeKeys: string | number | null | (string | number | null)[]): Promise<any>
|
|
589
|
+
/**
|
|
590
|
+
* 切换指定节点为展开状态
|
|
591
|
+
*/
|
|
592
|
+
toggleExpandNode(nodeList: any | any[]): Promise<any>
|
|
593
|
+
/**
|
|
594
|
+
* 设置全部节点为展开状态
|
|
595
|
+
*/
|
|
596
|
+
setAllExpandNode(expanded: boolean): Promise<any>
|
|
597
|
+
/**
|
|
598
|
+
* 获取已展开的节点对应的键值
|
|
599
|
+
*/
|
|
600
|
+
getExpandNodeIds(): (string | number)[]
|
|
601
|
+
/**
|
|
602
|
+
* 获取已展开的节点
|
|
603
|
+
*/
|
|
604
|
+
getExpandNodes(): D[]
|
|
605
|
+
/**
|
|
606
|
+
* 重新懒加载展开节点
|
|
607
|
+
*/
|
|
608
|
+
reloadExpandNode(node: any): Promise<any>
|
|
609
|
+
/**
|
|
610
|
+
* 清除指定节点的懒加载状态,恢复成未加载之前状态
|
|
611
|
+
*/
|
|
612
|
+
clearExpandLoaded(node: any): Promise<any>
|
|
613
|
+
loadChildrenNode(node: any, childRecords: any[]): Promise<any>
|
|
614
|
+
/**
|
|
615
|
+
* 判断指定节点是否为展开状态
|
|
616
|
+
*/
|
|
617
|
+
isExpandByNode(node: any): boolean
|
|
618
|
+
/**
|
|
619
|
+
* 用于 show-radio,根据节点主键判断指定节点是否为选中状态
|
|
620
|
+
*/
|
|
621
|
+
isCheckedByRadioNodeId(nodeKey: string | number | null): boolean
|
|
622
|
+
/**
|
|
623
|
+
* 用于 show-radio,判断指定节点是否为选中状态
|
|
624
|
+
*/
|
|
625
|
+
isCheckedByRadioNode(node: any): boolean
|
|
626
|
+
/**
|
|
627
|
+
* 用于 show-checkbox,根据节点主键判断指定节点是否为选中状态
|
|
628
|
+
*/
|
|
629
|
+
isCheckedByCheckboxNodeId(nodeKey: string | number | null): boolean
|
|
630
|
+
/**
|
|
631
|
+
* 用于 show-checkbox,判断指定节点是否为半选状态
|
|
632
|
+
*/
|
|
633
|
+
isIndeterminateByCheckboxNode(node: any): boolean
|
|
634
|
+
/**
|
|
635
|
+
* 用于 show-checkbox,判断指定节点是否为选中状态
|
|
636
|
+
*/
|
|
637
|
+
isCheckedByCheckboxNode(node: any): boolean
|
|
638
|
+
/**
|
|
639
|
+
* 用于 show-checkbox,获取半选状态的节点
|
|
640
|
+
*/
|
|
641
|
+
getCheckboxIndeterminateNodes(): D[]
|
|
642
|
+
/**
|
|
643
|
+
* 重新计算列表
|
|
644
|
+
*/
|
|
645
|
+
recalculate(): Promise<void>
|
|
646
|
+
/**
|
|
647
|
+
* 获取数据的全量数据
|
|
648
|
+
*/
|
|
649
|
+
getFullData(): D[]
|
|
650
|
+
|
|
651
|
+
/**
|
|
652
|
+
* 如果有滚动条,则滚动到对应的位置
|
|
653
|
+
*/
|
|
654
|
+
scrollTo(
|
|
655
|
+
x:
|
|
656
|
+
| {
|
|
657
|
+
top?: number | null
|
|
658
|
+
left?: number | null
|
|
659
|
+
}
|
|
660
|
+
| number
|
|
661
|
+
| null
|
|
662
|
+
| undefined,
|
|
663
|
+
y?: number | null
|
|
664
|
+
): Promise<void>
|
|
665
|
+
/**
|
|
666
|
+
* 如果有滚动条,则滚动到指定的节点位置
|
|
667
|
+
*/
|
|
668
|
+
scrollToNode(node: any): Promise<void>
|
|
669
|
+
/**
|
|
670
|
+
* 如果有滚动条,则根据节点主键滚动到对应的节点位置
|
|
671
|
+
*/
|
|
672
|
+
scrollToNodeId(nodeKey: string | number | null): Promise<void>
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
* 手动清除滚动相关信息,还原到初始状态
|
|
676
|
+
*/
|
|
677
|
+
clearScroll(): Promise<void>
|
|
678
|
+
|
|
679
|
+
/**
|
|
680
|
+
* 往表格插入临时数据,从第一个节点新增一个节点或多个节点新数据
|
|
681
|
+
*/
|
|
682
|
+
insert(records: any): Promise<{ node: D; nodes: D[] }>
|
|
683
|
+
/**
|
|
684
|
+
* 用于 transform 模式,往表格指定节点中插入临时数据
|
|
685
|
+
* 如果 node 为空则从插入到顶部,如果为树结构,则插入到目标节点顶部
|
|
686
|
+
* 如果 node 为 -1 则从插入到底部,如果为树结构,则插入到目标节点底部
|
|
687
|
+
* 如果 node 为有效节点则插入到该节点的位置,如果为树结构,则有插入到效的目标节点该节点的位置
|
|
688
|
+
*/
|
|
689
|
+
insertAt(records: any, targetNodeOrNodeKey?: any | -1 | null): Promise<{ node: D; nodes: D[] }>
|
|
690
|
+
/**
|
|
691
|
+
* 用于 transform 模式,与 insertAt 节点为一致,区别就是会插入指定目标的到下一节点
|
|
692
|
+
*/
|
|
693
|
+
insertNextAt(records: any, targetNodeOrNodeKey?: any | -1 | null): Promise<{ node: D; nodes: D[] }>
|
|
694
|
+
/**
|
|
695
|
+
* 用于树结构,往指定节点插入子级临时数据,从子级的第一行新增一行或多行新数据
|
|
696
|
+
*/
|
|
697
|
+
insertChild(records: any, parentNodeOrParentId: any): Promise<{ node: D; nodes: D[] }>
|
|
698
|
+
/**
|
|
699
|
+
* 用于树结构,往指定节点插入子级临时数据
|
|
700
|
+
* 如果 targetNode 为空则从插入到顶部,如果为树结构,则插入到目标节点顶部
|
|
701
|
+
* 如果 targetNode 为 -1 则从插入到底部,如果为树结构,则插入到目标节点底部
|
|
702
|
+
* 如果 targetNode 为有效行则插入到该行的位置,如果为树结构,则有插入到效的目标节点该行的位置
|
|
703
|
+
*/
|
|
704
|
+
insertChildAt(records: any, parentNodeOrParentId: any, targetNodeOrNodeid: any | -1 | null): Promise<{ node: D; nodes: D[] }>
|
|
705
|
+
/**
|
|
706
|
+
* 与 insertChildAt 行为一致,区别就是会插入指定目标子级的到下一行
|
|
707
|
+
*/
|
|
708
|
+
insertChildNextAt(records: any, parentNodeOrParentId: any, targetNodeOrNodeid: any | -1 | null): Promise<{ node: D; nodes: D[] }>
|
|
709
|
+
/**
|
|
710
|
+
* 判断行是否为新增的临时数据
|
|
711
|
+
*/
|
|
712
|
+
isInsertByNode(node: any | null): boolean
|
|
713
|
+
/**
|
|
714
|
+
* 用于 transform 模式,删除指定节点数据,指定 node 或 [node, ...] 删除多条数据,如果为空则删除所有数据
|
|
715
|
+
*/
|
|
716
|
+
remove(nodes?: any | any[]): Promise<{ node: D; nodes: D[] }>
|
|
717
|
+
/**
|
|
718
|
+
* 用于 transform 模式,获取新增的临时数据
|
|
719
|
+
*/
|
|
720
|
+
getInsertRecords(): D[]
|
|
721
|
+
/**
|
|
722
|
+
* 用于 transform 模式,获取已删除的数据
|
|
723
|
+
*/
|
|
724
|
+
getRemoveRecords(): D[]
|
|
725
|
+
/**
|
|
726
|
+
* 判断数据是否被删除
|
|
727
|
+
*/
|
|
728
|
+
isRemoveByNode(node: any | null): boolean
|
|
729
|
+
/**
|
|
730
|
+
* 手动关闭工具提示
|
|
731
|
+
*/
|
|
732
|
+
closeTooltip(): Promise<void>
|
|
733
|
+
/**
|
|
734
|
+
* 获取列表数据集
|
|
735
|
+
* 获取新增、删除的数据
|
|
736
|
+
*/
|
|
737
|
+
getRecordset(): {
|
|
738
|
+
insertRecords: D[]
|
|
739
|
+
removeRecords: D[]
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
export interface VxeTreeMethods<D = any> extends TreeMethods<D> {}
|
|
743
|
+
|
|
744
|
+
export interface TreePrivateMethods {
|
|
745
|
+
/**
|
|
746
|
+
* @private
|
|
747
|
+
*/
|
|
748
|
+
handleData(force?: boolean): void
|
|
749
|
+
/**
|
|
750
|
+
* @private
|
|
751
|
+
*/
|
|
752
|
+
cacheNodeMap(): void
|
|
753
|
+
/**
|
|
754
|
+
* @private
|
|
755
|
+
*/
|
|
756
|
+
updateAfterDataIndex(): void
|
|
757
|
+
/**
|
|
758
|
+
* @private
|
|
759
|
+
*/
|
|
760
|
+
updateCheckboxStatus(): void
|
|
761
|
+
/**
|
|
762
|
+
* @private
|
|
763
|
+
*/
|
|
764
|
+
updateYSpace(): void
|
|
765
|
+
/**
|
|
766
|
+
* @private
|
|
767
|
+
*/
|
|
768
|
+
findNodeIndexOf(list: any[], node: any): number
|
|
769
|
+
/**
|
|
770
|
+
* @private
|
|
771
|
+
*/
|
|
772
|
+
eqNode(node1: any, node2: any): boolean
|
|
773
|
+
/**
|
|
774
|
+
* @private
|
|
775
|
+
*/
|
|
776
|
+
handleCrossTreeNodeDragInsertEvent(evnt: DragEvent): void
|
|
777
|
+
/**
|
|
778
|
+
* @private
|
|
779
|
+
*/
|
|
780
|
+
handleCrossTreeNodeDragCancelEvent(evnt: DragEvent): void
|
|
781
|
+
/**
|
|
782
|
+
* @private
|
|
783
|
+
*/
|
|
784
|
+
handleCrossTreeNodeDragFinishEvent(evnt: DragEvent): void
|
|
785
|
+
/**
|
|
786
|
+
* @private
|
|
787
|
+
*/
|
|
788
|
+
handleCrossTreeNodeDragoverEmptyEvent(evnt: DragEvent): void
|
|
789
|
+
/**
|
|
790
|
+
* @private
|
|
791
|
+
*/
|
|
792
|
+
hideCrossTreeNodeDropClearStatus(): void
|
|
793
|
+
}
|
|
794
|
+
export interface VxeTreePrivateMethods extends TreePrivateMethods {}
|
|
795
|
+
|
|
796
|
+
export type VxeTreeEmits = [
|
|
797
|
+
'update:modelValue',
|
|
798
|
+
'update:checkNodeKey',
|
|
799
|
+
'update:checkNodeKeys',
|
|
800
|
+
'node-click',
|
|
801
|
+
'node-dblclick',
|
|
802
|
+
'current-change',
|
|
803
|
+
'radio-change',
|
|
804
|
+
'checkbox-change',
|
|
805
|
+
'load-success',
|
|
806
|
+
'load-error',
|
|
807
|
+
'scroll',
|
|
808
|
+
'node-dragstart',
|
|
809
|
+
'node-dragover',
|
|
810
|
+
'node-dragend',
|
|
811
|
+
'node-remove-dragend',
|
|
812
|
+
'node-insert-dragend',
|
|
813
|
+
'node-expand',
|
|
814
|
+
'node-menu',
|
|
815
|
+
'menu-click'
|
|
816
|
+
]
|
|
817
|
+
|
|
818
|
+
export namespace VxeTreeDefines {
|
|
819
|
+
export interface TreeEventParams<D = any> extends VxeComponentEventParams {
|
|
820
|
+
$tree: VxeTreeConstructor<D>
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
export interface NodeCacheItem {
|
|
824
|
+
item: any
|
|
825
|
+
index: number
|
|
826
|
+
$index: number
|
|
827
|
+
_index: number
|
|
828
|
+
items: any[]
|
|
829
|
+
nodes: any[]
|
|
830
|
+
parent: any
|
|
831
|
+
level: number
|
|
832
|
+
treeIndex: number
|
|
833
|
+
lineCount: number
|
|
834
|
+
treeLoaded: boolean
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
export interface NodeDragstartEventParams<D = any> {
|
|
838
|
+
node: D
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
export interface NodeDragoverEventParams<D = any> {
|
|
842
|
+
oldNode: D
|
|
843
|
+
targetNode: D
|
|
844
|
+
dragNode: D
|
|
845
|
+
dragPos: 'top' | 'bottom'
|
|
846
|
+
offsetIndex: 0 | 1
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
export interface NodeDragendEventParams<D = any> {
|
|
850
|
+
newNode: D
|
|
851
|
+
oldNode: D
|
|
852
|
+
dragNode: D
|
|
853
|
+
dragPos: 'top' | 'bottom'
|
|
854
|
+
dragToChild: boolean
|
|
855
|
+
offsetIndex: 0 | 1
|
|
856
|
+
_index: {
|
|
857
|
+
newIndex: number
|
|
858
|
+
oldIndex: number
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
export interface NodeDragToChildMethod<D = any> extends NodeDragendEventParams<D> {}
|
|
863
|
+
|
|
864
|
+
export interface NodeClickParams<D = any> {
|
|
865
|
+
node: D
|
|
866
|
+
}
|
|
867
|
+
export interface NodeClickEventParams<D = any> extends TreeEventParams<D>, NodeClickParams<D> {}
|
|
868
|
+
|
|
869
|
+
export interface NodeDblclickEventParams<D = any> extends NodeClickEventParams<D> {}
|
|
870
|
+
|
|
871
|
+
export interface CurrentChangeEventParams<D = any> extends TreeEventParams<D> {
|
|
872
|
+
node: D
|
|
873
|
+
checked: boolean
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
export interface RadioChangeEventParams<D = any> extends TreeEventParams<D> {
|
|
877
|
+
node: D
|
|
878
|
+
checked: boolean
|
|
879
|
+
value: VxeTreePropTypes.CheckNodeKey
|
|
880
|
+
}
|
|
881
|
+
export interface CheckboxChangeEventParams<D = any> extends TreeEventParams<D> {
|
|
882
|
+
node: D
|
|
883
|
+
checked: boolean
|
|
884
|
+
value: VxeTreePropTypes.CheckNodeKeys
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
export interface LoadSuccessEventParams<D = any> extends TreeEventParams<D> {
|
|
888
|
+
node: D
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
export interface LoadErrorEventParams<D = any> extends TreeEventParams<D> {
|
|
892
|
+
node: D
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
export interface NodeExpandEventParams<D = any> extends NodeClickEventParams<D> {
|
|
896
|
+
expanded: boolean
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
export interface NodeMenuEventParams<D = any> extends TreeEventParams<D> {
|
|
900
|
+
node: D
|
|
901
|
+
}
|
|
902
|
+
export interface MenuClickEventParams<D = any> extends TreeEventParams<D> {
|
|
903
|
+
node: D
|
|
904
|
+
menu: VxeContextMenuDefines.MenuFirstOption | VxeContextMenuDefines.MenuChildOption
|
|
905
|
+
|
|
906
|
+
/**
|
|
907
|
+
* @deprecated
|
|
908
|
+
*/
|
|
909
|
+
option: VxeContextMenuDefines.MenuFirstOption | VxeContextMenuDefines.MenuChildOption
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
export type VxeTreeEventProps<D = any> = {
|
|
914
|
+
onNodeClick?: VxeTreeEvents.NodeClick<D>
|
|
915
|
+
onNodeDblclick?: VxeTreeEvents.NodeDblclick<D>
|
|
916
|
+
onCurrentChange?: VxeTreeEvents.CurrentChange<D>
|
|
917
|
+
onRadioChange?: VxeTreeEvents.RadioChange<D>
|
|
918
|
+
onCheckboxChange?: VxeTreeEvents.CheckboxChange<D>
|
|
919
|
+
onLoadSuccess?: VxeTreeEvents.LoadSuccess<D>
|
|
920
|
+
onLoadError?: VxeTreeEvents.LoadError<D>
|
|
921
|
+
onNodeDragstart?: VxeTreeEvents.NodeDragstart<D>
|
|
922
|
+
onNodeDragover?: VxeTreeEvents.NodeDragover<D>
|
|
923
|
+
onNodeDragend?: VxeTreeEvents.NodeDragend<D>
|
|
924
|
+
onNodeExpand?: VxeTreeEvents.NodeExpand<D>
|
|
925
|
+
onNodeMenu?: VxeTreeEvents.NodeMenu<D>
|
|
926
|
+
onMenuClick?: VxeTreeEvents.MenuClick<D>
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
export interface VxeTreeListeners<D = any> {
|
|
930
|
+
nodeClick?: VxeTreeEvents.NodeClick<D>
|
|
931
|
+
nodeDblclick?: VxeTreeEvents.NodeDblclick<D>
|
|
932
|
+
currentChange?: VxeTreeEvents.CurrentChange<D>
|
|
933
|
+
radioChange?: VxeTreeEvents.RadioChange<D>
|
|
934
|
+
checkboxChange?: VxeTreeEvents.CheckboxChange<D>
|
|
935
|
+
loadSuccess?: VxeTreeEvents.LoadSuccess<D>
|
|
936
|
+
loadError?: VxeTreeEvents.LoadError<D>
|
|
937
|
+
nodeDragstart?: VxeTreeEvents.NodeDragstart<D>
|
|
938
|
+
nodeDragover?: VxeTreeEvents.NodeDragover<D>
|
|
939
|
+
nodeDragend?: VxeTreeEvents.NodeDragend<D>
|
|
940
|
+
nodeExpand?: VxeTreeEvents.NodeExpand<D>
|
|
941
|
+
nodeMenu?: VxeTreeEvents.NodeMenu<D>
|
|
942
|
+
menuClick?: VxeTreeEvents.MenuClick<D>
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
export namespace VxeTreeEvents {
|
|
946
|
+
export type NodeClick<D = any> = (params: VxeTreeDefines.NodeClickEventParams<D>) => void
|
|
947
|
+
export type NodeDblclick<D = any> = (params: VxeTreeDefines.NodeDblclickEventParams<D>) => void
|
|
948
|
+
export type CurrentChange<D = any> = (params: VxeTreeDefines.CurrentChangeEventParams<D>) => void
|
|
949
|
+
export type RadioChange<D = any> = (params: VxeTreeDefines.RadioChangeEventParams<D>) => void
|
|
950
|
+
export type CheckboxChange<D = any> = (params: VxeTreeDefines.CheckboxChangeEventParams<D>) => void
|
|
951
|
+
export type LoadSuccess<D = any> = (params: VxeTreeDefines.LoadSuccessEventParams<D>) => void
|
|
952
|
+
export type LoadError<D = any> = (params: VxeTreeDefines.LoadErrorEventParams<D>) => void
|
|
953
|
+
export type NodeDragstart<D = any> = (params: VxeTreeDefines.NodeDragstartEventParams<D>) => void
|
|
954
|
+
export type NodeDragover<D = any> = (params: VxeTreeDefines.NodeDragoverEventParams<D>) => void
|
|
955
|
+
export type NodeDragend<D = any> = (params: VxeTreeDefines.NodeDragendEventParams<D>) => void
|
|
956
|
+
export type NodeExpand<D = any> = (params: VxeTreeDefines.NodeExpandEventParams<D>) => void
|
|
957
|
+
export type NodeMenu<D = any> = (params: VxeTreeDefines.NodeMenuEventParams<D>) => void
|
|
958
|
+
export type MenuClick<D = any> = (params: VxeTreeDefines.MenuClickEventParams<D>) => void
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
export namespace VxeTreeSlotTypes {
|
|
962
|
+
export interface DefaultSlotParams {
|
|
963
|
+
node: any
|
|
964
|
+
isExpand: boolean
|
|
965
|
+
}
|
|
966
|
+
export interface IconSlotParams {
|
|
967
|
+
node: any
|
|
968
|
+
isExpand: boolean
|
|
969
|
+
}
|
|
970
|
+
export interface TitleSlotParams extends DefaultSlotParams {}
|
|
971
|
+
export interface ExtraSlotParams extends DefaultSlotParams {}
|
|
972
|
+
|
|
973
|
+
export interface HeaderSlotParams {}
|
|
974
|
+
export interface FooterSlotParams {}
|
|
975
|
+
export interface LoadingSlotParams {}
|
|
976
|
+
export interface TooltipSlotParams {
|
|
977
|
+
node: any
|
|
978
|
+
}
|
|
979
|
+
export interface EmptySlotParams {}
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
export interface VxeTreeSlots {
|
|
983
|
+
icon?: (params: VxeTreeSlotTypes.IconSlotParams) => any
|
|
984
|
+
title?: (params: VxeTreeSlotTypes.TitleSlotParams) => any
|
|
985
|
+
extra?: (params: VxeTreeSlotTypes.ExtraSlotParams) => any
|
|
986
|
+
header?: (params: VxeTreeSlotTypes.HeaderSlotParams) => any
|
|
987
|
+
footer?: (params: VxeTreeSlotTypes.FooterSlotParams) => any
|
|
988
|
+
loading?: (params: VxeTreeSlotTypes.LoadingSlotParams) => any
|
|
989
|
+
tooltip?: (params: VxeTreeSlotTypes.TooltipSlotParams) => any
|
|
990
|
+
empty?: (params: VxeTreeSlotTypes.EmptySlotParams) => any
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
export const Tree: typeof VxeTree
|
|
994
|
+
export default VxeTree
|