bkui-vue 2.0.1-beta.3 → 2.0.1-beta.31

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