bkui-vue 2.0.1-beta.8 → 2.0.1-beta.81

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 (442) hide show
  1. package/README.md +15 -0
  2. package/dist/index.cjs.js +167 -167
  3. package/dist/index.esm.js +32462 -31824
  4. package/dist/index.umd.js +167 -167
  5. package/dist/style.css +1 -1
  6. package/dist/style.variable.css +1 -1
  7. package/lib/affix/affix.css +130 -0
  8. package/lib/affix/affix.variable.css +262 -1
  9. package/lib/affix/index.js +7 -7
  10. package/lib/alert/alert.css +133 -3
  11. package/lib/alert/alert.d.ts +5 -12
  12. package/lib/alert/alert.variable.css +262 -1
  13. package/lib/alert/index.d.ts +11 -26
  14. package/lib/alert/index.js +6 -6
  15. package/lib/backtop/backtop.css +133 -3
  16. package/lib/backtop/backtop.d.ts +1 -1
  17. package/lib/backtop/backtop.variable.css +395 -4
  18. package/lib/backtop/index.d.ts +3 -3
  19. package/lib/backtop/index.js +6 -6
  20. package/lib/badge/badge.css +156 -26
  21. package/lib/badge/badge.variable.css +262 -1
  22. package/lib/badge/index.js +1 -1
  23. package/lib/breadcrumb/breadcrumb.css +135 -5
  24. package/lib/breadcrumb/breadcrumb.variable.css +397 -6
  25. package/lib/button/button.css +417 -243
  26. package/lib/button/button.d.ts +8 -8
  27. package/lib/button/button.less +74 -71
  28. package/lib/button/button.variable.css +450 -145
  29. package/lib/button/index.d.ts +11 -11
  30. package/lib/button/index.js +6 -7
  31. package/lib/card/card.css +134 -4
  32. package/lib/card/card.variable.css +396 -5
  33. package/lib/cascader/cascader-panel.d.ts +6 -1
  34. package/lib/cascader/cascader.css +153 -23
  35. package/lib/cascader/cascader.d.ts +5 -1
  36. package/lib/cascader/cascader.variable.css +415 -24
  37. package/lib/cascader/index.d.ts +1 -0
  38. package/lib/cascader/index.js +110 -40
  39. package/lib/cascader/interface.d.ts +1 -1
  40. package/lib/checkbox/checkbox-group.d.ts +0 -16
  41. package/lib/checkbox/checkbox.css +147 -9
  42. package/lib/checkbox/checkbox.d.ts +39 -7
  43. package/lib/checkbox/checkbox.less +12 -0
  44. package/lib/checkbox/checkbox.variable.css +270 -1
  45. package/lib/checkbox/index.d.ts +57 -22
  46. package/lib/checkbox/index.js +21 -8
  47. package/lib/checkbox/type.d.ts +1 -1
  48. package/lib/code-diff/code-diff.css +130 -0
  49. package/lib/code-diff/code-diff.variable.css +262 -1
  50. package/lib/code-diff/index.js +8 -8
  51. package/lib/collapse/collapse.css +131 -1
  52. package/lib/collapse/collapse.variable.css +262 -1
  53. package/lib/collapse/index.js +2 -2
  54. package/lib/collapse/utils.d.ts +2 -2
  55. package/lib/collapse-transition/collapse-transition.css +130 -0
  56. package/lib/collapse-transition/collapse-transition.variable.css +262 -1
  57. package/lib/color-picker/color-picker.css +130 -0
  58. package/lib/color-picker/color-picker.d.ts +16 -0
  59. package/lib/color-picker/color-picker.variable.css +262 -1
  60. package/lib/color-picker/index.d.ts +23 -0
  61. package/lib/color-picker/index.js +52 -45
  62. package/lib/components.d.ts +32 -32
  63. package/lib/components.js +31 -31
  64. package/lib/config-provider/config-provider.css +130 -0
  65. package/lib/config-provider/config-provider.variable.css +262 -1
  66. package/lib/config-provider/index.d.ts +1 -1
  67. package/lib/container/container.css +130 -0
  68. package/lib/container/container.variable.css +392 -1
  69. package/lib/container/index.js +6 -7
  70. package/lib/date-picker/base/date-table.d.ts +1 -1
  71. package/lib/date-picker/base/month-table.d.ts +1 -1
  72. package/lib/date-picker/base/picker-dropdown.d.ts +1 -1
  73. package/lib/date-picker/base/year-table.d.ts +1 -1
  74. package/lib/date-picker/date-picker.css +147 -17
  75. package/lib/date-picker/date-picker.d.ts +0 -10
  76. package/lib/date-picker/date-picker.variable.css +262 -1
  77. package/lib/date-picker/index.d.ts +0 -22
  78. package/lib/date-picker/index.js +256 -219
  79. package/lib/date-picker/interface.d.ts +9 -9
  80. package/lib/date-picker/panel/date-range.d.ts +5 -5
  81. package/lib/date-picker/panel/date.d.ts +1 -1
  82. package/lib/date-picker/panel/time-range.d.ts +1 -10
  83. package/lib/date-picker/panel/time.d.ts +2 -11
  84. package/lib/date-picker/props.d.ts +1 -5
  85. package/lib/date-picker/time-picker.d.ts +0 -9
  86. package/lib/date-picker/utils.d.ts +1 -1
  87. package/lib/dialog/dialog.css +138 -8
  88. package/lib/dialog/dialog.d.ts +42 -26
  89. package/lib/dialog/dialog.variable.css +400 -9
  90. package/lib/dialog/index.d.ts +90 -56
  91. package/lib/dialog/index.js +25 -23
  92. package/lib/dialog/props.d.ts +18 -11
  93. package/lib/directives/index.d.ts +4 -3
  94. package/lib/directives/index.js +198 -176
  95. package/lib/directives/tooltips.d.ts +1 -1
  96. package/lib/dist.index.js +2 -4
  97. package/lib/divider/divider.css +133 -3
  98. package/lib/divider/divider.d.ts +5 -5
  99. package/lib/divider/divider.variable.css +262 -1
  100. package/lib/divider/index.d.ts +11 -11
  101. package/lib/divider/index.js +2 -2
  102. package/lib/divider/props.d.ts +2 -2
  103. package/lib/dropdown/dropdown-item.d.ts +1 -1
  104. package/lib/dropdown/dropdown-menu.d.ts +1 -1
  105. package/lib/dropdown/dropdown.css +130 -0
  106. package/lib/dropdown/dropdown.d.ts +5 -5
  107. package/lib/dropdown/dropdown.variable.css +392 -1
  108. package/lib/dropdown/index.d.ts +13 -13
  109. package/lib/dropdown/index.js +7 -7
  110. package/lib/exception/exception.css +130 -0
  111. package/lib/exception/exception.d.ts +9 -9
  112. package/lib/exception/exception.variable.css +262 -1
  113. package/lib/exception/index.d.ts +11 -11
  114. package/lib/exception/index.js +10 -10
  115. package/lib/exception/typings/index.d.ts +1 -1
  116. package/lib/fixed-navbar/fixed-navbar.css +134 -4
  117. package/lib/fixed-navbar/fixed-navbar.variable.css +262 -1
  118. package/lib/fixed-navbar/index.js +2 -2
  119. package/lib/form/form-item.d.ts +7 -19
  120. package/lib/form/form.css +130 -0
  121. package/lib/form/form.d.ts +2 -2
  122. package/lib/form/form.variable.css +262 -1
  123. package/lib/form/index.d.ts +7 -14
  124. package/lib/form/index.js +22 -21
  125. package/lib/form/type.d.ts +2 -2
  126. package/lib/icon/index.d.ts +11 -11
  127. package/lib/icon/index.js +11 -11
  128. package/lib/image/image-viewer.css +130 -0
  129. package/lib/image/image-viewer.d.ts +1 -1
  130. package/lib/image/image-viewer.variable.css +262 -1
  131. package/lib/image/image.css +130 -0
  132. package/lib/image/image.variable.css +392 -1
  133. package/lib/image/index.js +20 -21
  134. package/lib/index.d.ts +9 -3
  135. package/lib/index.js +5 -29
  136. package/lib/info-box/index.js +17 -18
  137. package/lib/info-box/info-box.css +134 -4
  138. package/lib/info-box/info-box.d.ts +15 -15
  139. package/lib/info-box/info-box.variable.css +262 -1
  140. package/lib/input/index.d.ts +15 -15
  141. package/lib/input/index.js +63 -516
  142. package/lib/input/input.css +225 -73
  143. package/lib/input/input.d.ts +15 -15
  144. package/lib/input/input.less +30 -1
  145. package/lib/input/input.variable.css +487 -74
  146. package/lib/link/index.d.ts +11 -11
  147. package/lib/link/index.js +3 -3
  148. package/lib/link/link.css +146 -16
  149. package/lib/link/link.d.ts +5 -5
  150. package/lib/link/link.variable.css +262 -1
  151. package/lib/loading/index.d.ts +12 -11
  152. package/lib/loading/index.js +10 -8
  153. package/lib/loading/loading.css +146 -16
  154. package/lib/loading/loading.d.ts +8 -8
  155. package/lib/loading/loading.variable.css +408 -17
  156. package/lib/locale/index.d.ts +1 -1
  157. package/lib/menu/index.js +0 -1
  158. package/lib/menu/menu.css +148 -18
  159. package/lib/menu/menu.variable.css +410 -19
  160. package/lib/menu/submenu.css +130 -0
  161. package/lib/menu/submenu.variable.css +262 -1
  162. package/lib/menu/utils.d.ts +3 -3
  163. package/lib/message/index.js +18 -18
  164. package/lib/message/message.css +153 -22
  165. package/lib/message/message.less +3 -2
  166. package/lib/message/message.variable.css +264 -2
  167. package/lib/message/messageConstructor.d.ts +16 -16
  168. package/lib/modal/index.d.ts +49 -8
  169. package/lib/modal/index.js +49 -28
  170. package/lib/modal/modal.css +134 -4
  171. package/lib/modal/modal.d.ts +19 -3
  172. package/lib/modal/modal.variable.css +396 -5
  173. package/lib/modal/props.mixin.d.ts +8 -1
  174. package/lib/navigation/index.js +20 -20
  175. package/lib/navigation/navigation.css +132 -2
  176. package/lib/navigation/navigation.d.ts +1 -1
  177. package/lib/navigation/navigation.variable.css +262 -1
  178. package/lib/notify/index.js +4 -4
  179. package/lib/notify/notify.css +137 -7
  180. package/lib/notify/notify.variable.css +262 -1
  181. package/lib/notify/notifyConstructor.d.ts +5 -5
  182. package/lib/overflow-title/components/overflow-title.d.ts +9 -16
  183. package/lib/overflow-title/index.d.ts +19 -34
  184. package/lib/overflow-title/index.js +75 -18
  185. package/lib/overflow-title/props.d.ts +18 -21
  186. package/lib/pagination/index.d.ts +0 -19
  187. package/lib/pagination/index.js +61 -23
  188. package/lib/pagination/pagination.css +139 -9
  189. package/lib/pagination/pagination.d.ts +0 -13
  190. package/lib/pagination/pagination.less +14 -13
  191. package/lib/pagination/pagination.variable.css +270 -9
  192. package/lib/pagination/type.d.ts +1 -1
  193. package/lib/pagination/use-limit.d.ts +1 -1
  194. package/lib/pagination/use-total.d.ts +1 -1
  195. package/lib/plugin-popover/index.js +20 -21
  196. package/lib/pop-confirm/index.d.ts +11 -43
  197. package/lib/pop-confirm/index.js +27 -28
  198. package/lib/pop-confirm/pop-confirm.css +133 -1
  199. package/lib/pop-confirm/pop-confirm.d.ts +5 -19
  200. package/lib/pop-confirm/pop-confirm.less +3 -1
  201. package/lib/pop-confirm/pop-confirm.variable.css +265 -2
  202. package/lib/pop-confirm/props.d.ts +5 -11
  203. package/lib/popover/const.d.ts +3 -3
  204. package/lib/popover/index.d.ts +19 -19
  205. package/lib/popover/index.js +20 -21
  206. package/lib/popover/plugin-popover.d.ts +1 -1
  207. package/lib/popover/popover.css +130 -0
  208. package/lib/popover/popover.d.ts +7 -7
  209. package/lib/popover/popover.variable.css +262 -1
  210. package/lib/popover/props.d.ts +4 -4
  211. package/lib/preset.d.ts +0 -1
  212. package/lib/preset.js +0 -1
  213. package/lib/process/index.js +3 -3
  214. package/lib/process/process.css +143 -13
  215. package/lib/process/process.variable.css +262 -1
  216. package/lib/progress/index.d.ts +11 -11
  217. package/lib/progress/index.js +10 -11
  218. package/lib/progress/progress.css +134 -4
  219. package/lib/progress/progress.d.ts +7 -7
  220. package/lib/progress/progress.variable.css +396 -5
  221. package/lib/radio/index.d.ts +21 -21
  222. package/lib/radio/index.js +28 -17
  223. package/lib/radio/radio-button.d.ts +7 -7
  224. package/lib/radio/radio-group.d.ts +7 -7
  225. package/lib/radio/radio.css +172 -42
  226. package/lib/radio/radio.d.ts +7 -7
  227. package/lib/radio/radio.variable.css +262 -1
  228. package/lib/radio/type.d.ts +1 -1
  229. package/lib/rate/index.js +8 -8
  230. package/lib/rate/rate.css +130 -0
  231. package/lib/rate/rate.variable.css +262 -1
  232. package/lib/resize-layout/index.d.ts +34 -11
  233. package/lib/resize-layout/index.js +33 -14
  234. package/lib/resize-layout/resize-layout.css +130 -0
  235. package/lib/resize-layout/resize-layout.d.ts +16 -5
  236. package/lib/resize-layout/resize-layout.variable.css +262 -1
  237. package/lib/scrollbar/css/scrollbar.css +239 -0
  238. package/lib/scrollbar/css/scrollbar.less +139 -0
  239. package/lib/scrollbar/css/scrollbar.variable.css +499 -0
  240. package/lib/scrollbar/handlers/click-rail.d.ts +2 -0
  241. package/lib/scrollbar/handlers/drag-thumb.d.ts +1 -0
  242. package/lib/scrollbar/handlers/keyboard.d.ts +2 -0
  243. package/lib/scrollbar/handlers/mouse-wheel.d.ts +2 -0
  244. package/lib/scrollbar/handlers/touch.d.ts +4 -0
  245. package/lib/scrollbar/helper/class-names.d.ts +21 -0
  246. package/lib/scrollbar/helper/css.d.ts +3 -0
  247. package/lib/scrollbar/helper/dom.d.ts +4 -0
  248. package/lib/scrollbar/helper/event-manager.d.ts +20 -0
  249. package/lib/scrollbar/helper/util.d.ts +11 -0
  250. package/lib/scrollbar/index.d.ts +133 -13
  251. package/lib/scrollbar/index.js +1332 -18434
  252. package/lib/scrollbar/process-scroll-diff.d.ts +1 -0
  253. package/lib/scrollbar/update-geometry.d.ts +8 -0
  254. package/lib/search-select/index.d.ts +100 -78
  255. package/lib/search-select/index.js +344 -213
  256. package/lib/search-select/input.d.ts +17 -6
  257. package/lib/search-select/menu.d.ts +13 -1
  258. package/lib/search-select/search-select.css +163 -35
  259. package/lib/search-select/search-select.d.ts +33 -43
  260. package/lib/search-select/search-select.less +2 -2
  261. package/lib/search-select/search-select.variable.css +425 -36
  262. package/lib/search-select/selected.d.ts +35 -10
  263. package/lib/search-select/utils.d.ts +6 -6
  264. package/lib/select/common.d.ts +4 -4
  265. package/lib/select/index.d.ts +155 -77
  266. package/lib/select/index.js +296 -197
  267. package/lib/select/option.d.ts +5 -6
  268. package/lib/select/select.css +175 -43
  269. package/lib/select/select.d.ts +62 -28
  270. package/lib/select/select.less +7 -4
  271. package/lib/select/select.variable.css +437 -44
  272. package/lib/select/selectTagInput.d.ts +7 -6
  273. package/lib/select/type.d.ts +10 -11
  274. package/lib/shared/frame-throttle.d.ts +15 -0
  275. package/lib/shared/index.d.ts +2 -1
  276. package/lib/shared/index.js +110 -47
  277. package/lib/shared/popover.d.ts +3 -3
  278. package/lib/shared/token.d.ts +1 -1
  279. package/lib/shared/vue-types.d.ts +48 -48
  280. package/lib/shared/z-index-manager.d.ts +6 -6
  281. package/lib/sideslider/index.d.ts +41 -7
  282. package/lib/sideslider/index.js +12 -11
  283. package/lib/sideslider/sideslider.css +138 -9
  284. package/lib/sideslider/sideslider.d.ts +19 -3
  285. package/lib/sideslider/sideslider.less +7 -8
  286. package/lib/sideslider/sideslider.variable.css +269 -9
  287. package/lib/slider/index.js +21 -23
  288. package/lib/slider/slider.css +135 -5
  289. package/lib/slider/slider.variable.css +262 -1
  290. package/lib/steps/index.d.ts +14 -29
  291. package/lib/steps/index.js +3 -4
  292. package/lib/steps/steps.css +168 -38
  293. package/lib/steps/steps.d.ts +8 -18
  294. package/lib/steps/steps.variable.css +262 -1
  295. package/lib/styles/index.d.ts +1 -0
  296. package/lib/styles/mixins/animate.css +130 -0
  297. package/lib/styles/mixins/animate.variable.css +262 -1
  298. package/lib/styles/mixins/mixins.css +130 -0
  299. package/lib/styles/mixins/mixins.variable.css +130 -0
  300. package/lib/styles/mixins/popper.css +130 -0
  301. package/lib/styles/mixins/popper.variable.css +262 -1
  302. package/lib/styles/mixins/scroll.css +130 -0
  303. package/lib/styles/mixins/scroll.variable.css +262 -1
  304. package/lib/styles/reset.css +130 -0
  305. package/lib/styles/reset.variable.css +262 -1
  306. package/lib/{scrollbar/scrollbar.variable.css → styles/themes/themes.css} +2 -76
  307. package/lib/styles/themes/themes.less +299 -129
  308. package/lib/styles/themes/themes.variable.css +130 -0
  309. package/lib/swiper/index.js +5 -5
  310. package/lib/swiper/swiper.css +130 -0
  311. package/lib/swiper/swiper.variable.css +262 -1
  312. package/lib/switcher/index.d.ts +11 -11
  313. package/lib/switcher/index.js +2 -2
  314. package/lib/switcher/switcher.css +147 -17
  315. package/lib/switcher/switcher.d.ts +9 -9
  316. package/lib/switcher/switcher.variable.css +409 -18
  317. package/lib/tab/index.d.ts +44 -114
  318. package/lib/tab/index.js +60 -49
  319. package/lib/tab/props.d.ts +25 -50
  320. package/lib/tab/tab-nav.d.ts +26 -66
  321. package/lib/tab/tab-panel.d.ts +22 -0
  322. package/lib/tab/tab.css +211 -17
  323. package/lib/tab/tab.d.ts +10 -54
  324. package/lib/tab/tab.less +91 -4
  325. package/lib/tab/tab.variable.css +326 -1
  326. package/lib/table/components/ghost-body.d.ts +2 -0
  327. package/lib/table/components/table-cell.d.ts +22 -0
  328. package/lib/table/components/table-column.d.ts +23 -126
  329. package/lib/table/const.d.ts +23 -10
  330. package/lib/table/events.d.ts +16 -112
  331. package/lib/table/hooks/use-cell.d.ts +20 -0
  332. package/lib/table/hooks/use-column-resize.d.ts +7 -0
  333. package/lib/table/hooks/use-column-template.d.ts +5 -0
  334. package/lib/table/hooks/use-columns.d.ts +69 -0
  335. package/lib/table/{plugins → hooks}/use-draggable.d.ts +2 -2
  336. package/lib/table/hooks/use-fixed-column.d.ts +10 -0
  337. package/lib/table/hooks/use-head.d.ts +16 -0
  338. package/lib/table/hooks/use-layout.d.ts +25 -0
  339. package/lib/table/hooks/use-pagination.d.ts +16 -0
  340. package/lib/table/hooks/use-render.d.ts +21 -0
  341. package/lib/table/hooks/use-rows.d.ts +30 -0
  342. package/lib/table/hooks/use-settings.d.ts +136 -0
  343. package/lib/table/{plugins → hooks}/use-shift-key.d.ts +4 -2
  344. package/lib/table/index.d.ts +112 -634
  345. package/lib/table/index.js +4089 -3559
  346. package/lib/table/plugins/head-filter.css +135 -0
  347. package/lib/table/plugins/head-filter.d.ts +2 -1
  348. package/lib/table/plugins/head-filter.less +4 -0
  349. package/lib/table/plugins/head-filter.variable.css +267 -1
  350. package/lib/table/plugins/head-sort.css +130 -0
  351. package/lib/table/plugins/head-sort.variable.css +262 -1
  352. package/lib/table/plugins/settings.css +131 -0
  353. package/lib/table/plugins/settings.less +1 -0
  354. package/lib/table/plugins/settings.variable.css +263 -1
  355. package/lib/table/props.d.ts +125 -62
  356. package/lib/table/table.css +753 -431
  357. package/lib/table/table.d.ts +51 -185
  358. package/lib/table/table.less +244 -112
  359. package/lib/table/table.variable.css +1058 -475
  360. package/lib/table/utils.d.ts +49 -21
  361. package/lib/table-column/index.d.ts +30 -289
  362. package/lib/table-column/index.js +17385 -46
  363. package/lib/tag/index.d.ts +11 -11
  364. package/lib/tag/index.js +2 -3
  365. package/lib/tag/tag.css +136 -6
  366. package/lib/tag/tag.d.ts +5 -5
  367. package/lib/tag/tag.less +1 -1
  368. package/lib/tag/tag.variable.css +263 -2
  369. package/lib/tag-input/common.d.ts +2 -2
  370. package/lib/tag-input/index.d.ts +14 -11
  371. package/lib/tag-input/index.js +72 -52
  372. package/lib/tag-input/tag-input.css +157 -27
  373. package/lib/tag-input/tag-input.d.ts +8 -19
  374. package/lib/tag-input/tag-input.less +9 -9
  375. package/lib/tag-input/tag-input.variable.css +271 -10
  376. package/lib/tag-input/tag-props.d.ts +2 -2
  377. package/lib/time-picker/index.d.ts +0 -19
  378. package/lib/time-picker/time-picker.css +130 -0
  379. package/lib/time-picker/time-picker.variable.css +262 -1
  380. package/lib/timeline/index.js +2 -2
  381. package/lib/timeline/timeline.css +149 -19
  382. package/lib/timeline/timeline.variable.css +262 -1
  383. package/lib/transfer/const.d.ts +2 -2
  384. package/lib/transfer/index.js +3 -5
  385. package/lib/transfer/transfer.css +149 -19
  386. package/lib/transfer/transfer.variable.css +262 -1
  387. package/lib/tree/constant.d.ts +22 -20
  388. package/lib/tree/index.d.ts +41 -27
  389. package/lib/tree/index.js +109 -58
  390. package/lib/tree/props.d.ts +18 -11
  391. package/lib/tree/tree.css +242 -78
  392. package/lib/tree/tree.d.ts +17 -17
  393. package/lib/tree/tree.variable.css +504 -79
  394. package/lib/tree/use-empty.d.ts +1 -1
  395. package/lib/tree/use-node-action.d.ts +10 -9
  396. package/lib/tree/use-node-async.d.ts +2 -1
  397. package/lib/tree/use-node-attribute.d.ts +42 -34
  398. package/lib/tree/use-search.d.ts +1 -1
  399. package/lib/tree/use-tree-init.d.ts +8 -5
  400. package/lib/tree/util.d.ts +21 -21
  401. package/lib/upload/index.d.ts +27 -4
  402. package/lib/upload/index.js +86 -42
  403. package/lib/upload/props.d.ts +7 -2
  404. package/lib/upload/upload.css +157 -27
  405. package/lib/upload/upload.d.ts +13 -2
  406. package/lib/upload/upload.type.d.ts +12 -6
  407. package/lib/upload/upload.variable.css +419 -28
  408. package/lib/upload/use-file-handler.d.ts +1 -1
  409. package/lib/virtual-render/index.d.ts +12 -46
  410. package/lib/virtual-render/index.js +17468 -148
  411. package/lib/virtual-render/props.d.ts +2 -9
  412. package/lib/virtual-render/use-fix-top.d.ts +1 -1
  413. package/lib/virtual-render/use-scrollbar.d.ts +4 -17
  414. package/lib/virtual-render/v-virtual-render.d.ts +7 -1
  415. package/lib/virtual-render/virtual-render.css +225 -69
  416. package/lib/virtual-render/virtual-render.d.ts +6 -22
  417. package/lib/virtual-render/virtual-render.less +2 -11
  418. package/lib/virtual-render/virtual-render.variable.css +487 -70
  419. package/lib/volar.components.d.ts +2 -0
  420. package/package.json +17 -55
  421. package/lib/scrollbar/scrollbar-core/can-use-dom.d.ts +0 -2
  422. package/lib/scrollbar/scrollbar-core/helpers.d.ts +0 -5
  423. package/lib/scrollbar/scrollbar-core/index.d.ts +0 -241
  424. package/lib/scrollbar/scrollbar-core/mouse-wheel.d.ts +0 -5
  425. package/lib/scrollbar/scrollbar-core/scrollbar-width.d.ts +0 -1
  426. package/lib/scrollbar/scrollbar.css +0 -75
  427. package/lib/scrollbar/scrollbar.less +0 -94
  428. package/lib/table/plugins/col-group.d.ts +0 -38
  429. package/lib/table/plugins/settings.d.ts +0 -16
  430. package/lib/table/plugins/use-active-columns.d.ts +0 -16
  431. package/lib/table/plugins/use-column-resize.d.ts +0 -35
  432. package/lib/table/plugins/use-column-template.d.ts +0 -7
  433. package/lib/table/plugins/use-fixed-column.d.ts +0 -27
  434. package/lib/table/plugins/use-head-cell.d.ts +0 -7
  435. package/lib/table/plugins/use-pagination.d.ts +0 -23
  436. package/lib/table/use-attributes.d.ts +0 -62
  437. package/lib/table/use-column.d.ts +0 -275
  438. package/lib/table/use-common.d.ts +0 -1679
  439. package/lib/table/use-render.d.ts +0 -11
  440. /package/lib/table/{plugins → components}/body-empty.d.ts +0 -0
  441. /package/lib/table/{plugins → hooks}/use-observer-resize.d.ts +0 -0
  442. /package/lib/table/{plugins → hooks}/use-scroll-loading.d.ts +0 -0
@@ -481,7 +481,19 @@ function _defineProperty(obj, key, value) {
481
481
  var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
482
482
  var external_vue_y = x => () => x
483
483
  const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createTextVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["inject"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.inject, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["provide"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.provide, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["resolveDirective"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.resolveDirective, ["shallowRef"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.shallowRef, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch, ["withDirectives"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives });
484
- ;// CONCATENATED MODULE: ../../node_modules/resize-detector/esm/index.js
484
+ ;// CONCATENATED MODULE: external "../config-provider"
485
+ var config_provider_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
486
+ var config_provider_y = x => () => x
487
+ const config_provider_namespaceObject = config_provider_x({ ["useLocale"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__.useLocale, ["usePrefix"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__.usePrefix });
488
+ ;// CONCATENATED MODULE: external "../directives"
489
+ var directives_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
490
+ var directives_y = x => () => x
491
+ const directives_namespaceObject = directives_x({ ["clickoutside"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_directives_45d4776f__.clickoutside });
492
+ ;// CONCATENATED MODULE: external "../icon"
493
+ var icon_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
494
+ var icon_y = x => () => x
495
+ const icon_namespaceObject = icon_x({ ["Close"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Close, ["Error"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Error, ["ExclamationCircleShape"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.ExclamationCircleShape, ["Search"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Search });
496
+ ;// CONCATENATED MODULE: ../../node_modules/@blueking/fork-resize-detector/esm/index.js
485
497
  var raf = null;
486
498
  function requestAnimationFrame (callback) {
487
499
  if (!raf) {
@@ -547,7 +559,7 @@ function getComputedStyle (elem, prop, pseudo) {
547
559
  }
548
560
 
549
561
  function getRenderInfo (elem) {
550
- if (!document.documentElement.contains(elem)) {
562
+ if (!elem || !document.documentElement.contains(elem)) {
551
563
  return {
552
564
  detached: true,
553
565
  rendered: false
@@ -555,7 +567,7 @@ function getRenderInfo (elem) {
555
567
  }
556
568
 
557
569
  var current = elem;
558
- while (current !== document) {
570
+ while (current && current !== document) {
559
571
  if (getComputedStyle(current, 'display') === 'none') {
560
572
  return {
561
573
  detached: false,
@@ -797,18 +809,6 @@ function resetTriggers (elem) {
797
809
 
798
810
 
799
811
 
800
- ;// CONCATENATED MODULE: external "../config-provider"
801
- var config_provider_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
802
- var config_provider_y = x => () => x
803
- const config_provider_namespaceObject = config_provider_x({ ["useLocale"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__.useLocale, ["usePrefix"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__.usePrefix });
804
- ;// CONCATENATED MODULE: external "../directives"
805
- var directives_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
806
- var directives_y = x => () => x
807
- const directives_namespaceObject = directives_x({ ["clickoutside"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_directives_45d4776f__.clickoutside });
808
- ;// CONCATENATED MODULE: external "../icon"
809
- var icon_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
810
- var icon_y = x => () => x
811
- const icon_namespaceObject = icon_x({ ["Close"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Close, ["Error"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Error, ["ExclamationCircleShape"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.ExclamationCircleShape, ["Search"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Search });
812
812
  ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
813
813
  function _arrayWithHoles(arr) {
814
814
  if (Array.isArray(arr)) return arr;
@@ -1014,27 +1014,27 @@ function _createClass(Constructor, protoProps, staticProps) {
1014
1014
  var ValueBehavior;
1015
1015
  (function (ValueBehavior) {
1016
1016
  ValueBehavior["ALL"] = "all";
1017
- ValueBehavior["NEEDKEY"] = "need-key";
1017
+ ValueBehavior["NEED_KEY"] = "need-key";
1018
1018
  })(ValueBehavior || (ValueBehavior = {}));
1019
1019
  var DeleteBehavior;
1020
1020
  (function (DeleteBehavior) {
1021
1021
  DeleteBehavior["CHAR"] = "delete-char";
1022
1022
  DeleteBehavior["VALUE"] = "delete-value";
1023
1023
  })(DeleteBehavior || (DeleteBehavior = {}));
1024
- var SEARCH_SLECT_PROVIDER_KEY = Symbol('SEARCH_SLECT_PROVIDER_KEY');
1024
+ var SEARCH_SELECT_PROVIDER_KEY = Symbol('SEARCH_SELECT_PROVIDER_KEY');
1025
1025
  var useSearchSelectProvider = function useSearchSelectProvider(data) {
1026
- (0,external_vue_namespaceObject.provide)(SEARCH_SLECT_PROVIDER_KEY, data);
1026
+ (0,external_vue_namespaceObject.provide)(SEARCH_SELECT_PROVIDER_KEY, data);
1027
1027
  };
1028
1028
  var useSearchSelectInject = function useSearchSelectInject() {
1029
- return (0,external_vue_namespaceObject.inject)(SEARCH_SLECT_PROVIDER_KEY);
1029
+ return (0,external_vue_namespaceObject.inject)(SEARCH_SELECT_PROVIDER_KEY);
1030
1030
  };
1031
1031
  var SearchInputMode;
1032
1032
  (function (SearchInputMode) {
1033
1033
  SearchInputMode["DEFAULT"] = "default";
1034
1034
  SearchInputMode["EDIT"] = "edit";
1035
1035
  })(SearchInputMode || (SearchInputMode = {}));
1036
- var ValueSplitRegex = /(\||,|、|\/|\r\n|\n)/gm;
1037
- var ValueSplitTestRegex = /^(\||,|、|\/|\r\n|\n)$/;
1036
+ var ValueSplitRegex = /(\||,|、|\r\n|\n)/gm;
1037
+ var ValueSplitTestRegex = /^(\||,|、|\r\n|\n)$/;
1038
1038
  var SearchLogical;
1039
1039
  (function (SearchLogical) {
1040
1040
  SearchLogical["AND"] = "&";
@@ -1045,7 +1045,7 @@ var SelectedItem = /*#__PURE__*/function () {
1045
1045
  var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'default';
1046
1046
  _classCallCheck(this, SelectedItem);
1047
1047
  _defineProperty(this, "values", []);
1048
- _defineProperty(this, "nameRenderkey", (0,shared_namespaceObject.random)(4));
1048
+ _defineProperty(this, "nameRenderKey", (0,shared_namespaceObject.random)(4));
1049
1049
  this.searchItem = searchItem;
1050
1050
  this.type = type;
1051
1051
  this.id = searchItem.id;
@@ -1121,7 +1121,7 @@ var SelectedItem = /*#__PURE__*/function () {
1121
1121
  }, {
1122
1122
  key: "addValue",
1123
1123
  value: function addValue(item) {
1124
- this.nameRenderkey = (0,shared_namespaceObject.random)(4);
1124
+ this.nameRenderKey = (0,shared_namespaceObject.random)(4);
1125
1125
  if (this.multiple) {
1126
1126
  var index = this.values.findIndex(function (val) {
1127
1127
  return val.id === item.id;
@@ -1308,6 +1308,12 @@ var SelectedItem = /*#__PURE__*/function () {
1308
1308
  logical: {
1309
1309
  type: String,
1310
1310
  "default": SearchLogical.OR
1311
+ },
1312
+ maxHeight: {
1313
+ type: Number,
1314
+ "default": function _default() {
1315
+ return 392;
1316
+ }
1311
1317
  }
1312
1318
  },
1313
1319
  emits: ['selectItem', 'selectCondition', 'footerClick', 'update:logical'],
@@ -1329,6 +1335,11 @@ var SelectedItem = /*#__PURE__*/function () {
1329
1335
  }
1330
1336
  return props.footerBtns;
1331
1337
  });
1338
+ var resolveContentStyles = (0,external_vue_namespaceObject.computed)(function () {
1339
+ return {
1340
+ maxHeight: "".concat(props.maxHeight, "px")
1341
+ };
1342
+ });
1332
1343
  // events
1333
1344
  function handleClick(item) {
1334
1345
  emit('selectItem', item);
@@ -1398,6 +1409,7 @@ var SelectedItem = /*#__PURE__*/function () {
1398
1409
  getSearchNode: getSearchNode,
1399
1410
  localFooterBtns: localFooterBtns,
1400
1411
  resolveClassName: resolveClassName,
1412
+ resolveContentStyles: resolveContentStyles,
1401
1413
  t: t
1402
1414
  };
1403
1415
  },
@@ -1409,9 +1421,9 @@ var SelectedItem = /*#__PURE__*/function () {
1409
1421
  "class": "menu-content"
1410
1422
  }, [(_this$list = this.list) === null || _this$list === void 0 ? void 0 : _this$list.map(function (item) {
1411
1423
  return (0,external_vue_namespaceObject.createVNode)("li", {
1412
- "class": "menu-item ".concat(item.disabled ? 'is-disabled' : '', " ").concat(_this.hoverId === item.id && !item.disabled ? 'is-hover' : ''),
1413
- "key": item.id,
1414
1424
  "id": item.id,
1425
+ "key": item.id,
1426
+ "class": "menu-item ".concat(item.disabled ? 'is-disabled' : '', " ").concat(_this.hoverId === item.id && !item.disabled ? 'is-hover' : ''),
1415
1427
  "tabindex": "-1",
1416
1428
  "onClick": function onClick() {
1417
1429
  return !item.disabled && _this.handleClick(item);
@@ -1421,8 +1433,8 @@ var SelectedItem = /*#__PURE__*/function () {
1421
1433
  return _this.handleSelectedChange(e, item);
1422
1434
  }
1423
1435
  }, [(0,external_vue_namespaceObject.createVNode)(checkbox_namespaceObject["default"], {
1424
- "modelValue": _this.selected.includes(item.id),
1425
- "class": "is-selected"
1436
+ "class": "is-selected",
1437
+ "modelValue": _this.selected.includes(item.id)
1426
1438
  }, null)]), _this.getSearchNode(item)])]);
1427
1439
  })]);
1428
1440
  var getListMenu = function getListMenu() {
@@ -1434,17 +1446,17 @@ var SelectedItem = /*#__PURE__*/function () {
1434
1446
  }, [(0,external_vue_namespaceObject.createVNode)("div", {
1435
1447
  "class": "menu-condition-title"
1436
1448
  }, [_this.t.logical]), (0,external_vue_namespaceObject.createVNode)(radio_namespaceObject["default"], {
1449
+ "label": "|",
1437
1450
  "modelValue": _this.logical,
1438
- "onChange": _this.handleLogicalChange,
1439
- "label": "|"
1451
+ "onChange": _this.handleLogicalChange
1440
1452
  }, {
1441
1453
  "default": function _default() {
1442
1454
  return [_this.t.or, (0,external_vue_namespaceObject.createTextVNode)(" |")];
1443
1455
  }
1444
1456
  }), (0,external_vue_namespaceObject.createVNode)(radio_namespaceObject["default"], {
1457
+ "label": "&",
1445
1458
  "modelValue": _this.logical,
1446
- "onChange": _this.handleLogicalChange,
1447
- "label": "&"
1459
+ "onChange": _this.handleLogicalChange
1448
1460
  }, {
1449
1461
  "default": function _default() {
1450
1462
  return [_this.t.and, (0,external_vue_namespaceObject.createTextVNode)(" &")];
@@ -1452,6 +1464,7 @@ var SelectedItem = /*#__PURE__*/function () {
1452
1464
  })])]);
1453
1465
  };
1454
1466
  return (0,external_vue_namespaceObject.createVNode)("div", {
1467
+ "style": this.resolveContentStyles,
1455
1468
  "class": this.resolveClassName('search-select-menu')
1456
1469
  }, [!!((_this$conditions = this.conditions) !== null && _this$conditions !== void 0 && _this$conditions.length) && (0,external_vue_namespaceObject.createVNode)("ul", {
1457
1470
  "class": "menu-header"
@@ -1471,6 +1484,9 @@ var SelectedItem = /*#__PURE__*/function () {
1471
1484
 
1472
1485
 
1473
1486
 
1487
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = input_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
1488
+ function input_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return input_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return input_arrayLikeToArray(o, minLen); }
1489
+ function input_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
1474
1490
 
1475
1491
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
1476
1492
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -1527,11 +1543,17 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
1527
1543
  return [];
1528
1544
  }
1529
1545
  },
1530
- defautUsingItem: Object,
1546
+ defaultUsingItem: Object,
1531
1547
  mode: {
1532
1548
  type: String,
1533
1549
  "default": SearchInputMode.DEFAULT
1534
1550
  },
1551
+ maxHeight: {
1552
+ type: Number,
1553
+ "default": function _default() {
1554
+ return 392;
1555
+ }
1556
+ },
1535
1557
  getMenuList: Function,
1536
1558
  validateValues: Function,
1537
1559
  valueBehavior: String
@@ -1550,10 +1572,10 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
1550
1572
  var showNoSelectValueError = (0,external_vue_namespaceObject.ref)(false);
1551
1573
  var isFocus = (0,external_vue_namespaceObject.ref)(false);
1552
1574
  var showPopover = (0,external_vue_namespaceObject.ref)(false);
1553
- var usingItem = (0,external_vue_namespaceObject.ref)(props.defautUsingItem);
1575
+ var usingItem = (0,external_vue_namespaceObject.ref)(props.defaultUsingItem);
1554
1576
  var menuHoverId = (0,external_vue_namespaceObject.ref)('');
1555
1577
  var loading = (0,external_vue_namespaceObject.ref)(false);
1556
- var debounceSetMenuList = (0,shared_namespaceObject.debounce)(300, setMenuList);
1578
+ var debounceSetMenuList = (0,shared_namespaceObject.debounce)(100, setMenuList);
1557
1579
  // const selectMenuList = ref<ICommonItem[]>([]);
1558
1580
  var isBindEvent = false;
1559
1581
  var remoteMenuList = (0,external_vue_namespaceObject.ref)([]);
@@ -1562,7 +1584,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
1562
1584
  editKey = _useSearchSelectInjec.editKey,
1563
1585
  onValidate = _useSearchSelectInjec.onValidate,
1564
1586
  searchData = _useSearchSelectInjec.searchData;
1565
- var valueLoagic = (0,external_vue_namespaceObject.computed)(function () {
1587
+ var valueLogic = (0,external_vue_namespaceObject.computed)(function () {
1566
1588
  var _usingItem$value;
1567
1589
  return ((_usingItem$value = usingItem.value) === null || _usingItem$value === void 0 ? void 0 : _usingItem$value.logical) || SearchLogical.OR;
1568
1590
  });
@@ -1588,7 +1610,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
1588
1610
  if (shouldBindEvent) {
1589
1611
  if (!isBindEvent) {
1590
1612
  var _menuList$value$find;
1591
- menuHoverId.value = props.valueBehavior === ValueBehavior.NEEDKEY ? ((_menuList$value$find = menuList.value.find(function (item) {
1613
+ menuHoverId.value = props.valueBehavior === ValueBehavior.NEED_KEY ? ((_menuList$value$find = menuList.value.find(function (item) {
1592
1614
  return !item.disabled;
1593
1615
  })) === null || _menuList$value$find === void 0 ? void 0 : _menuList$value$find.id) || '' : '';
1594
1616
  isBindEvent = true;
@@ -1597,7 +1619,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
1597
1619
  } else {
1598
1620
  document.removeEventListener('keydown', handleDocumentKeydown);
1599
1621
  isBindEvent = false;
1600
- if (props.valueBehavior !== ValueBehavior.NEEDKEY) {
1622
+ if (props.valueBehavior !== ValueBehavior.NEED_KEY) {
1601
1623
  menuHoverId.value = '';
1602
1624
  }
1603
1625
  }
@@ -1635,9 +1657,10 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
1635
1657
  }
1636
1658
  }
1637
1659
  function documentEnterEvent(e) {
1660
+ var _menuList$value2;
1638
1661
  if (!isBindEvent) return;
1639
1662
  e.preventDefault();
1640
- var item = menuList.value.find(function (item) {
1663
+ var item = (_menuList$value2 = menuList.value) === null || _menuList$value2 === void 0 ? void 0 : _menuList$value2.find(function (item) {
1641
1664
  return item.id === menuHoverId.value;
1642
1665
  });
1643
1666
  item && handleSelectItem(item);
@@ -1669,16 +1692,23 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
1669
1692
  showPopover.value = false;
1670
1693
  emit('focus', isFocus.value);
1671
1694
  }
1672
- function handleInputFocus() {
1695
+ var isOriginFocus = false;
1696
+ function handleInputFocus(event) {
1697
+ if (isOriginFocus) return;
1673
1698
  showNoSelectValueError.value = false;
1674
1699
  if (props.mode === SearchInputMode.EDIT && usingItem.value && !isFocus.value) {
1675
1700
  var nodeList = Array.from(inputRef.value.querySelectorAll("[data-type=\"".concat(usingItem.value.values.length ? 'value' : usingItem.value.type, "\"]")));
1676
1701
  if (!nodeList.length) return;
1702
+ event === null || event === void 0 || event.preventDefault();
1677
1703
  var range = document.createRange();
1678
1704
  var selection = window.getSelection();
1679
1705
  range.selectNodeContents(nodeList.at(-1));
1680
1706
  selection === null || selection === void 0 || selection.removeAllRanges();
1681
- selection.addRange(range); // 注意这里会触发focu事件
1707
+ isOriginFocus = true;
1708
+ setTimeout(function () {
1709
+ isOriginFocus = false;
1710
+ }, 200);
1711
+ selection.addRange(range); // 注意这里会触发focus事件
1682
1712
  setInputFocus(true, false);
1683
1713
  return;
1684
1714
  }
@@ -1689,7 +1719,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
1689
1719
  event.preventDefault();
1690
1720
  var formattedText = event.clipboardData.getData('text').trim();
1691
1721
  if (!usingItem.value) {
1692
- var formateItem = str2SeletedItem(formattedText);
1722
+ var formateItem = str2SelectedItem(formattedText);
1693
1723
  if (formateItem) {
1694
1724
  usingItem.value = formateItem;
1695
1725
  setInputFocus(true, true);
@@ -1697,7 +1727,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
1697
1727
  }
1698
1728
  keyword.value = formattedText.split(ValueSplitRegex).filter(function (v) {
1699
1729
  return v.trim() && !ValueSplitTestRegex.test(v);
1700
- }).join(" ".concat(valueLoagic.value, " "));
1730
+ }).join(" ".concat(valueLogic.value, " "));
1701
1731
  inputRef.value.innerText = keyword.value;
1702
1732
  setInputFocus();
1703
1733
  debounceSetMenuList();
@@ -1720,9 +1750,15 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
1720
1750
  switch (event.code) {
1721
1751
  case 'Enter':
1722
1752
  case 'NumpadEnter':
1723
- if (props.valueBehavior === ValueBehavior.NEEDKEY && menuList.value.some(function (item) {
1753
+ if (props.valueBehavior === ValueBehavior.NEED_KEY && menuList.value.some(function (item) {
1724
1754
  return item.id === menuHoverId.value;
1725
- })) return;
1755
+ })) {
1756
+ var _keyword$value;
1757
+ if (!usingItem.value && (_keyword$value = keyword.value) !== null && _keyword$value !== void 0 && _keyword$value.length) {
1758
+ event.preventDefault();
1759
+ }
1760
+ return;
1761
+ }
1726
1762
  handleKeyEnter(event).then(function (v) {
1727
1763
  return v && clearInput();
1728
1764
  });
@@ -1755,7 +1791,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
1755
1791
  _context.next = 9;
1756
1792
  break;
1757
1793
  }
1758
- if (!(!keyword.value || props.valueBehavior === ValueBehavior.NEEDKEY)) {
1794
+ if (!(!keyword.value || props.valueBehavior === ValueBehavior.NEED_KEY)) {
1759
1795
  _context.next = 6;
1760
1796
  break;
1761
1797
  }
@@ -1809,7 +1845,9 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
1809
1845
  var _usingItem$value3;
1810
1846
  // 删除已选择项
1811
1847
  if (!usingItem.value && !keyword.value) {
1848
+ menuHoverId.value = '';
1812
1849
  emit('delete');
1850
+ // eslint-disable-next-line @typescript-eslint/no-misused-promises
1813
1851
  setTimeout(setMenuList, 16);
1814
1852
  return;
1815
1853
  }
@@ -1857,7 +1895,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
1857
1895
  id: (_item$realId = item.realId) !== null && _item$realId !== void 0 ? _item$realId : item.id
1858
1896
  }), type);
1859
1897
  selectedItem.addValues(item.value.name, false);
1860
- if (!(props.valueBehavior === ValueBehavior.NEEDKEY && menuHoverId.value)) {
1898
+ if (!(props.valueBehavior === ValueBehavior.NEED_KEY && menuHoverId.value)) {
1861
1899
  _context2.next = 8;
1862
1900
  break;
1863
1901
  }
@@ -1900,7 +1938,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
1900
1938
  setSelectedItem();
1901
1939
  }
1902
1940
  showPopover.value = isCondition || !!usingItem.value.children.length;
1903
- setInputFocus(props.valueBehavior === ValueBehavior.NEEDKEY && !!menuHoverId.value);
1941
+ setInputFocus(props.valueBehavior === ValueBehavior.NEED_KEY && !!menuHoverId.value);
1904
1942
  return _context2.abrupt("return");
1905
1943
  case 27:
1906
1944
  if (usingItem.value) {
@@ -1919,7 +1957,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
1919
1957
  if (!usingItem.value.multiple) {
1920
1958
  setSelectedItem();
1921
1959
  }
1922
- if (props.valueBehavior === ValueBehavior.NEEDKEY && (_usingItem$value12 = usingItem.value) !== null && _usingItem$value12 !== void 0 && _usingItem$value12.multiple) {
1960
+ if (props.valueBehavior === ValueBehavior.NEED_KEY && (_usingItem$value12 = usingItem.value) !== null && _usingItem$value12 !== void 0 && _usingItem$value12.multiple) {
1923
1961
  setInputFocus();
1924
1962
  }
1925
1963
  case 34:
@@ -1930,7 +1968,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
1930
1968
  }));
1931
1969
  return _handleSelectItem.apply(this, arguments);
1932
1970
  }
1933
- function handleSelectCondtionItem(item) {
1971
+ function handleSelectConditionItem(item) {
1934
1972
  handleSelectItem(item, 'condition');
1935
1973
  }
1936
1974
  function handleMenuFooterClick(item) {
@@ -2039,7 +2077,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
2039
2077
  function _setMenuList() {
2040
2078
  _setMenuList = _asyncToGenerator( /*#__PURE__*/regenerator_default().mark(function _callee5() {
2041
2079
  var _props$data, _usingItem$value$sear, _usingItem$value$valu;
2042
- var list, _usingItem$value14, _keyword$value2, hoverItem;
2080
+ var list, _usingItem$value14, _keyword$value3, _iterator, _step, item, isMatched, _list, filterList, _iterator2, _step2, child, _list2, _filterList, _iterator3, _step3, _child, hoverItem;
2043
2081
  return regenerator_default().wrap(function _callee5$(_context5) {
2044
2082
  while (1) switch (_context5.prev = _context5.next) {
2045
2083
  case 0:
@@ -2060,55 +2098,83 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
2060
2098
  break;
2061
2099
  case 9:
2062
2100
  if (!(usingItem !== null && usingItem !== void 0 && usingItem.value)) {
2063
- if (!((_keyword$value2 = keyword.value) !== null && _keyword$value2 !== void 0 && _keyword$value2.length)) {
2101
+ if (!((_keyword$value3 = keyword.value) !== null && _keyword$value3 !== void 0 && _keyword$value3.length)) {
2064
2102
  list = props.data.filter(function (item) {
2065
2103
  return !item.isSelected;
2066
2104
  }).slice();
2067
- } else props.data.filter(function (item) {
2068
- return !item.isSelected;
2069
- }).forEach(function (item) {
2070
- var isMatched = item.name.toLocaleLowerCase().includes(keyword.value.toLocaleLowerCase());
2071
- if (isMatched) {
2072
- var _item$children, _list;
2073
- list.push(item);
2074
- var filterList = [];
2075
- (_item$children = item.children) === null || _item$children === void 0 || _item$children.forEach(function (child) {
2076
- filterList.push(_objectSpread(_objectSpread({}, item), {}, {
2077
- realId: item.id,
2078
- id: (0,shared_namespaceObject.random)(10),
2079
- value: child
2080
- }));
2081
- });
2082
- !filterList.length && !item.onlyRecommendChildren && filterList.push(_objectSpread(_objectSpread({}, item), {}, {
2083
- realId: item.id,
2084
- id: (0,shared_namespaceObject.random)(10),
2085
- value: {
2086
- id: keyword.value,
2087
- name: keyword.value
2088
- }
2089
- }));
2090
- (_list = list).push.apply(_list, filterList);
2091
- } else {
2092
- var _item$children2, _list2;
2093
- var _filterList = [];
2094
- (_item$children2 = item.children) === null || _item$children2 === void 0 || _item$children2.forEach(function (child) {
2095
- if (child.name.toLocaleLowerCase().includes(keyword.value.toLocaleLowerCase())) {
2096
- _filterList.push(_objectSpread(_objectSpread({}, item), {}, {
2097
- realId: item.id,
2098
- id: (0,shared_namespaceObject.random)(10),
2099
- value: child
2100
- }));
2101
- }
2102
- });
2103
- !_filterList.length && !item.onlyRecommendChildren && _filterList.push(_objectSpread(_objectSpread({}, item), {}, {
2104
- value: {
2105
- id: keyword.value,
2106
- name: keyword.value
2105
+ } else {
2106
+ _iterator = _createForOfIteratorHelper(props.data.filter(function (item) {
2107
+ return !item.isSelected;
2108
+ }));
2109
+ try {
2110
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
2111
+ item = _step.value;
2112
+ isMatched = item.name.toLocaleLowerCase().includes(keyword.value.toLocaleLowerCase());
2113
+ if (isMatched) {
2114
+ list.push(item);
2115
+ filterList = [];
2116
+ _iterator2 = _createForOfIteratorHelper(item.children || []);
2117
+ try {
2118
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
2119
+ child = _step2.value;
2120
+ filterList.push(_objectSpread(_objectSpread({}, item), {}, {
2121
+ realId: item.id,
2122
+ id: (0,shared_namespaceObject.random)(10),
2123
+ value: child
2124
+ }));
2125
+ }
2126
+ } catch (err) {
2127
+ _iterator2.e(err);
2128
+ } finally {
2129
+ _iterator2.f();
2130
+ }
2131
+ if (!filterList.length && !item.onlyRecommendChildren) {
2132
+ filterList.push(_objectSpread(_objectSpread({}, item), {}, {
2133
+ realId: item.id,
2134
+ id: (0,shared_namespaceObject.random)(10),
2135
+ value: {
2136
+ id: keyword.value,
2137
+ name: keyword.value
2138
+ }
2139
+ }));
2140
+ }
2141
+ (_list = list).push.apply(_list, filterList);
2142
+ } else {
2143
+ _filterList = [];
2144
+ _iterator3 = _createForOfIteratorHelper(item.children || []);
2145
+ try {
2146
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
2147
+ _child = _step3.value;
2148
+ if (_child.name.toLocaleLowerCase().includes(keyword.value.toLocaleLowerCase())) {
2149
+ _filterList.push(_objectSpread(_objectSpread({}, item), {}, {
2150
+ realId: item.id,
2151
+ id: (0,shared_namespaceObject.random)(10),
2152
+ value: _child
2153
+ }));
2154
+ }
2155
+ }
2156
+ } catch (err) {
2157
+ _iterator3.e(err);
2158
+ } finally {
2159
+ _iterator3.f();
2160
+ }
2161
+ if (!_filterList.length && !item.onlyRecommendChildren) {
2162
+ _filterList.push(_objectSpread(_objectSpread({}, item), {}, {
2163
+ value: {
2164
+ id: keyword.value,
2165
+ name: keyword.value
2166
+ }
2167
+ }));
2168
+ }
2169
+ (_list2 = list).push.apply(_list2, _filterList);
2107
2170
  }
2108
- }));
2109
- (_list2 = list).push.apply(_list2, _filterList);
2171
+ }
2172
+ } catch (err) {
2173
+ _iterator.e(err);
2174
+ } finally {
2175
+ _iterator.f();
2110
2176
  }
2111
- });
2177
+ }
2112
2178
  } else if (usingItem.value.type === 'condition') {
2113
2179
  list = props.conditions;
2114
2180
  } else if (!((_usingItem$value$valu = usingItem.value.values) !== null && _usingItem$value$valu !== void 0 && _usingItem$value$valu.length) || usingItem.value.multiple || props.mode === SearchInputMode.EDIT) {
@@ -2118,7 +2184,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
2118
2184
  }
2119
2185
  case 10:
2120
2186
  menuList.value = list;
2121
- if (props.valueBehavior === ValueBehavior.NEEDKEY) {
2187
+ if (props.valueBehavior === ValueBehavior.NEED_KEY) {
2122
2188
  hoverItem = list.find(function (item) {
2123
2189
  return !item.disabled;
2124
2190
  });
@@ -2145,7 +2211,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
2145
2211
  return regenerator_default().wrap(function _callee6$(_context6) {
2146
2212
  while (1) switch (_context6.prev = _context6.next) {
2147
2213
  case 0:
2148
- formatItem = str2SeletedItem(keyword.value);
2214
+ formatItem = str2SelectedItem(keyword.value);
2149
2215
  valueList = (formatItem === null || formatItem === void 0 ? void 0 : formatItem.values) || [{
2150
2216
  id: keyword.value,
2151
2217
  name: keyword.value
@@ -2183,7 +2249,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
2183
2249
  case 0:
2184
2250
  valueList = [];
2185
2251
  if (usingItem.value.isSpecialType()) {
2186
- formatItem = str2SeletedItem(keyword.value);
2252
+ formatItem = str2SelectedItem(keyword.value);
2187
2253
  if (formatItem) {
2188
2254
  usingItem.value = formatItem;
2189
2255
  valueList = formatItem.values;
@@ -2229,15 +2295,16 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
2229
2295
  selection.addRange(range);
2230
2296
  }
2231
2297
  function setInputFocus() {
2232
- var refleshMenuList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
2298
+ var refreshMenuList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
2233
2299
  var needCursorToEnd = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
2234
- if (refleshMenuList) {
2300
+ if (refreshMenuList) {
2301
+ // eslint-disable-next-line @typescript-eslint/no-misused-promises
2235
2302
  setTimeout(setMenuList, 16);
2236
2303
  }
2237
2304
  isFocus.value = true;
2238
2305
  showPopover.value = true;
2239
2306
  showNoSelectValueError.value = false;
2240
- needCursorToEnd && (0,external_vue_namespaceObject.nextTick)(setCursorToEnd);
2307
+ !props.getMenuList && needCursorToEnd && (0,external_vue_namespaceObject.nextTick)(setCursorToEnd);
2241
2308
  emit('focus', isFocus.value);
2242
2309
  }
2243
2310
  function setSelectedItem(item) {
@@ -2258,7 +2325,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
2258
2325
  return inputRef.value.innerText = '';
2259
2326
  });
2260
2327
  }
2261
- function str2SeletedItem(str) {
2328
+ function str2SelectedItem(str) {
2262
2329
  var _str$split = str.split(':'),
2263
2330
  _str$split2 = _slicedToArray(_str$split, 2),
2264
2331
  key = _str$split2[0],
@@ -2276,8 +2343,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
2276
2343
  return undefined;
2277
2344
  }
2278
2345
  function deleteInputTextNode() {
2279
- var _keyword$value;
2280
- if ((_keyword$value = keyword.value) !== null && _keyword$value !== void 0 && _keyword$value.length) {
2346
+ var _keyword$value2;
2347
+ if ((_keyword$value2 = keyword.value) !== null && _keyword$value2 !== void 0 && _keyword$value2.length) {
2281
2348
  keyword.value = '';
2282
2349
  var nodes = Array.from(inputRef.value.childNodes);
2283
2350
  nodes.forEach(function (node) {
@@ -2331,13 +2398,19 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
2331
2398
  return v && clearInput();
2332
2399
  });
2333
2400
  }
2401
+ function refleshMenuHover() {
2402
+ if (!usingItem.value) {
2403
+ menuHoverId.value = '';
2404
+ }
2405
+ }
2334
2406
  // expose
2335
2407
  expose({
2336
2408
  inputFocusForWrapper: inputFocusForWrapper,
2337
2409
  inputEnterForWrapper: inputEnterForWrapper,
2338
2410
  inputClearForWrapper: inputClearForWrapper,
2339
2411
  handleInputFocus: handleInputFocus,
2340
- isFocus: isFocus
2412
+ isFocus: isFocus,
2413
+ refleshMenuHover: refleshMenuHover
2341
2414
  });
2342
2415
  return {
2343
2416
  popoverRef: popoverRef,
@@ -2360,7 +2433,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
2360
2433
  handleLogicalChange: handleLogicalChange,
2361
2434
  handleInputKeyup: handleInputKeyup,
2362
2435
  handleSelectItem: handleSelectItem,
2363
- handleSelectCondtionItem: handleSelectCondtionItem,
2436
+ handleSelectConditionItem: handleSelectConditionItem,
2364
2437
  handleMenuFooterClick: handleMenuFooterClick,
2365
2438
  resolveClassName: resolveClassName,
2366
2439
  inputFocusForWrapper: inputFocusForWrapper,
@@ -2368,6 +2441,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
2368
2441
  inputClearForWrapper: inputClearForWrapper,
2369
2442
  deleteInputTextNode: deleteInputTextNode,
2370
2443
  customPanelSubmit: customPanelSubmit,
2444
+ refleshMenuHover: refleshMenuHover,
2371
2445
  t: t
2372
2446
  };
2373
2447
  },
@@ -2397,32 +2471,32 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
2397
2471
  "data-placeholder": !inputInnerHtml && !_this.keyword ? _this.placeholder : '',
2398
2472
  "data-tips": placeholder || '',
2399
2473
  "spellcheck": "false",
2400
- "onPaste": _this.handleInputPaste,
2401
2474
  "onFocus": _this.handleInputFocus,
2402
2475
  "onInput": _this.handleInputChange,
2403
- "onKeydown": _this.handleInputKeyup
2476
+ "onKeydown": _this.handleInputKeyup,
2477
+ "onPaste": _this.handleInputPaste
2404
2478
  }, [((_this$usingItem = _this.usingItem) === null || _this$usingItem === void 0 ? void 0 : _this$usingItem.name) && (!_this.usingItem.isSpecialType() ? (0,external_vue_namespaceObject.createVNode)("span", {
2479
+ "key": _this.usingItem.nameRenderKey,
2480
+ "style": {
2481
+ color: '#979BA5'
2482
+ },
2483
+ "contenteditable": false,
2405
2484
  "data-key": _this.usingItem.name,
2406
2485
  "data-type": _this.usingItem.type,
2407
- "key": _this.usingItem.nameRenderkey,
2408
2486
  "onMousedown": function onMousedown(e) {
2409
2487
  return e.preventDefault();
2410
- },
2411
- "contenteditable": false,
2412
- "style": {
2413
- color: '#979BA5'
2414
2488
  }
2415
2489
  }, [_this.usingItem.name, (0,external_vue_namespaceObject.createTextVNode)(":\xA0")]) : (0,external_vue_namespaceObject.createVNode)("span", {
2490
+ "key": _this.usingItem.nameRenderKey,
2416
2491
  "data-key": _this.usingItem.name,
2417
- "data-type": _this.usingItem.type,
2418
- "key": _this.usingItem.nameRenderkey
2492
+ "data-type": _this.usingItem.type
2419
2493
  }, [_this.usingItem.name])), (_this$usingItem2 = _this.usingItem) === null || _this$usingItem2 === void 0 || (_this$usingItem2 = _this$usingItem2.values) === null || _this$usingItem2 === void 0 ? void 0 : _this$usingItem2.map(function (item, index) {
2420
2494
  return (0,external_vue_namespaceObject.createVNode)("span", {
2421
2495
  "key": index,
2422
- "data-key": item.name,
2423
- "data-type": "value",
2424
2496
  "data-id": item.id,
2425
- "data-index": index
2497
+ "data-index": index,
2498
+ "data-key": item.name,
2499
+ "data-type": "value"
2426
2500
  }, [item.name, index < _this.usingItem.values.length - 1 ? " ".concat(_this.usingItem.logical, " ") : '']);
2427
2501
  })]), [[(0,external_vue_namespaceObject.resolveDirective)("clickoutside"), _this.handleClickOutside]]);
2428
2502
  };
@@ -2450,29 +2524,30 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
2450
2524
  "ref": "popoverRef",
2451
2525
  "class": _this.resolveClassName('search-select-popover')
2452
2526
  }, [(0,external_vue_namespaceObject.createVNode)(menu, {
2453
- "list": _this.menuList,
2527
+ "conditions": showCondition ? _this.conditions : [],
2528
+ "hoverId": _this.menuHoverId,
2454
2529
  "keyword": _this.keyword,
2530
+ "list": _this.menuList,
2531
+ "logical": (_this$usingItem4 = _this.usingItem) === null || _this$usingItem4 === void 0 ? void 0 : _this$usingItem4.logical,
2532
+ "maxHeight": _this.maxHeight,
2455
2533
  "multiple": !!multiple,
2456
- "hoverId": _this.menuHoverId,
2457
2534
  "selected": (values === null || values === void 0 ? void 0 : values.map(function (item) {
2458
2535
  return item.id;
2459
2536
  })) || [],
2460
- "conditions": showCondition ? _this.conditions : [],
2461
- "logical": (_this$usingItem4 = _this.usingItem) === null || _this$usingItem4 === void 0 ? void 0 : _this$usingItem4.logical,
2462
2537
  "showLogical": (_this$usingItem5 = _this.usingItem) === null || _this$usingItem5 === void 0 ? void 0 : _this$usingItem5.showLogical,
2463
- "onUpdate:logical": _this.handleLogicalChange,
2538
+ "onFooterClick": _this.handleMenuFooterClick,
2539
+ "onSelectCondition": _this.handleSelectConditionItem,
2464
2540
  "onSelectItem": _this.handleSelectItem,
2465
- "onSelectCondition": _this.handleSelectCondtionItem,
2466
- "onFooterClick": _this.handleMenuFooterClick
2541
+ "onUpdate:logical": _this.handleLogicalChange
2467
2542
  }, null)]) : undefined;
2468
2543
  };
2469
2544
  return (0,external_vue_namespaceObject.createVNode)(popover_namespaceObject["default"], {
2470
- "trigger": "manual",
2471
- "theme": "light",
2472
- "placement": "bottom-start",
2473
2545
  "arrow": false,
2474
2546
  "disableOutsideClick": true,
2475
- "isShow": showPopover
2547
+ "isShow": showPopover,
2548
+ "placement": "bottom-start",
2549
+ "theme": "light",
2550
+ "trigger": "manual"
2476
2551
  }, {
2477
2552
  "default": inputContent,
2478
2553
  content: popoverContent
@@ -2528,6 +2603,12 @@ function selected_objectSpread(e) { for (var r = 1; r < arguments.length; r++) {
2528
2603
  type: Number,
2529
2604
  "default": -1
2530
2605
  },
2606
+ maxHeight: {
2607
+ type: Number,
2608
+ "default": function _default() {
2609
+ return 392;
2610
+ }
2611
+ },
2531
2612
  conditions: {
2532
2613
  type: Array,
2533
2614
  "default": function _default() {
@@ -2551,7 +2632,7 @@ function selected_objectSpread(e) { for (var r = 1; r < arguments.length; r++) {
2551
2632
  function handleDeleteSelected(index) {
2552
2633
  emit('delete', index);
2553
2634
  }
2554
- function handleEditSeleted(e, item, index) {
2635
+ function handleEditSelected(e, item, index) {
2555
2636
  e.preventDefault();
2556
2637
  e.stopPropagation();
2557
2638
  onEditClick(item, index);
@@ -2576,7 +2657,7 @@ function selected_objectSpread(e) { for (var r = 1; r < arguments.length; r++) {
2576
2657
  var _selectedInputRef$val;
2577
2658
  return !((_selectedInputRef$val = selectedInputRef.value) !== null && _selectedInputRef$val !== void 0 && _selectedInputRef$val.contains(target));
2578
2659
  }
2579
- function copySeletedItem(item) {
2660
+ function copySelectedItem(item) {
2580
2661
  var newItem = new SelectedItem(item.searchItem, item.type);
2581
2662
  newItem.values = item.values.slice();
2582
2663
  newItem.logical = item.logical || SearchLogical.OR;
@@ -2586,9 +2667,9 @@ function selected_objectSpread(e) { for (var r = 1; r < arguments.length; r++) {
2586
2667
  inputRef: inputRef,
2587
2668
  selectedInputRef: selectedInputRef,
2588
2669
  editKey: editKey,
2589
- copySeletedItem: copySeletedItem,
2670
+ copySelectedItem: copySelectedItem,
2590
2671
  handleDeleteSelected: handleDeleteSelected,
2591
- handleEditSeleted: handleEditSeleted,
2672
+ handleEditSelected: handleEditSelected,
2592
2673
  handleInputOutside: handleInputOutside,
2593
2674
  handleAddSelected: handleAddSelected,
2594
2675
  handleInputFocus: handleInputFocus
@@ -2598,19 +2679,20 @@ function selected_objectSpread(e) { for (var r = 1; r < arguments.length; r++) {
2598
2679
  var _this = this;
2599
2680
  var contentComponent = function contentComponent(item, index) {
2600
2681
  return _this.editKey === "".concat(item.id, "_").concat(index) ? (0,external_vue_namespaceObject.createVNode)("div", {
2601
- "class": "selected-input",
2602
2682
  "key": _this.editKey.toString(),
2603
- "ref": "selectedInputRef"
2683
+ "ref": "selectedInputRef",
2684
+ "class": "selected-input"
2604
2685
  }, [(0,external_vue_namespaceObject.createVNode)(input, {
2605
- "ref": "inputRef",
2606
2686
  "key": _this.editKey.toString(),
2607
- "mode": SearchInputMode.EDIT,
2608
- "data": _this.data,
2609
- "showCondition": false,
2610
- "conditions": _this.conditions,
2611
- "defautUsingItem": _this.copySeletedItem(item),
2687
+ "ref": "inputRef",
2612
2688
  "clickOutside": _this.handleInputOutside,
2689
+ "conditions": _this.conditions,
2690
+ "data": _this.data,
2691
+ "defaultUsingItem": _this.copySelectedItem(item),
2613
2692
  "getMenuList": _this.getMenuList,
2693
+ "maxHeight": _this.maxHeight,
2694
+ "mode": SearchInputMode.EDIT,
2695
+ "showCondition": false,
2614
2696
  "validateValues": _this.validateValues,
2615
2697
  "valueBehavior": _this.valueBehavior,
2616
2698
  "onAdd": function onAdd(v) {
@@ -2618,12 +2700,12 @@ function selected_objectSpread(e) { for (var r = 1; r < arguments.length; r++) {
2618
2700
  },
2619
2701
  "onFocus": _this.handleInputFocus
2620
2702
  }, selected_objectSpread({}, _this.$slots))]) : (0,external_vue_namespaceObject.createVNode)("li", {
2621
- "class": "search-container-selected ".concat(!(_this.overflowIndex >= 0 ? index < _this.overflowIndex : index >= 0) ? 'hidden-selected' : ''),
2622
- "key": "".concat(item.id, "_").concat(index)
2703
+ "key": "".concat(item.id, "_").concat(index),
2704
+ "class": "search-container-selected ".concat(!(_this.overflowIndex >= 0 ? index < _this.overflowIndex : index >= 0) ? 'hidden-selected' : '')
2623
2705
  }, [(0,external_vue_namespaceObject.createVNode)("span", {
2624
2706
  "class": "selected-name",
2625
2707
  "onClick": function onClick(e) {
2626
- return _this.handleEditSeleted(e, item, index);
2708
+ return _this.handleEditSelected(e, item, index);
2627
2709
  }
2628
2710
  }, [item.inputInnerText]), (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Error, {
2629
2711
  "class": "selected-clear",
@@ -2644,6 +2726,9 @@ function selected_objectSpread(e) { for (var r = 1; r < arguments.length; r++) {
2644
2726
 
2645
2727
  function search_select_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2646
2728
  function search_select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? search_select_ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : search_select_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2729
+ function search_select_createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = search_select_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
2730
+ function search_select_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return search_select_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return search_select_arrayLikeToArray(o, minLen); }
2731
+ function search_select_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
2647
2732
  /*
2648
2733
  * Tencent is pleased to support the open source community by making
2649
2734
  * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
@@ -2679,7 +2764,9 @@ function search_select_objectSpread(e) { for (var r = 1; r < arguments.length; r
2679
2764
 
2680
2765
 
2681
2766
  var INPUT_PADDING_WIDTH = 40;
2682
- var SELETED_MARGING_RIGHT = 6;
2767
+ var SELECTED_MARGIN_RIGHT = 6;
2768
+ var INPUT_MIN_HEIGHT = 26;
2769
+ var MENU_ITEM_MIN_HEIGHT = 32;
2683
2770
  var SearchSelectProps = {
2684
2771
  data: {
2685
2772
  type: Array,
@@ -2693,17 +2780,10 @@ var SearchSelectProps = {
2693
2780
  return [];
2694
2781
  }
2695
2782
  },
2696
- shrink: {
2697
- type: Boolean,
2698
- "default": true
2699
- },
2700
2783
  maxHeight: {
2701
2784
  type: Number,
2702
- "default": 120
2703
- },
2704
- minHeight: {
2705
- type: Number,
2706
- "default": 26
2785
+ // 默认展示12条,加上列表8px的padding
2786
+ "default": MENU_ITEM_MIN_HEIGHT * 12 + 8
2707
2787
  },
2708
2788
  conditions: {
2709
2789
  type: Array,
@@ -2726,7 +2806,7 @@ var SearchSelectProps = {
2726
2806
  type: String,
2727
2807
  "default": ValueBehavior.ALL,
2728
2808
  validator: function validator(v) {
2729
- return [ValueBehavior.ALL, ValueBehavior.NEEDKEY].includes(v);
2809
+ return [ValueBehavior.ALL, ValueBehavior.NEED_KEY].includes(v);
2730
2810
  }
2731
2811
  }
2732
2812
  // deleteBehavior: {
@@ -2776,13 +2856,24 @@ var SearchSelectProps = {
2776
2856
  (0,external_vue_namespaceObject.watch)(function () {
2777
2857
  return props.data;
2778
2858
  }, function () {
2779
- var _copyData$value;
2780
2859
  copyData.value = JSON.parse(JSON.stringify(props.data));
2781
- (_copyData$value = copyData.value) === null || _copyData$value === void 0 || _copyData$value.forEach(function (item) {
2782
- item.isSelected = props.uniqueSelect && !!props.modelValue.some(function (set) {
2783
- return set.id === item.id;
2784
- });
2785
- });
2860
+ var _iterator = search_select_createForOfIteratorHelper(copyData.value || []),
2861
+ _step;
2862
+ try {
2863
+ var _loop = function _loop() {
2864
+ var item = _step.value;
2865
+ item.isSelected = props.uniqueSelect && props.modelValue.some(function (set) {
2866
+ return set.id === item.id;
2867
+ });
2868
+ };
2869
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
2870
+ _loop();
2871
+ }
2872
+ } catch (err) {
2873
+ _iterator.e(err);
2874
+ } finally {
2875
+ _iterator.f();
2876
+ }
2786
2877
  }, {
2787
2878
  immediate: true
2788
2879
  });
@@ -2791,50 +2882,84 @@ var SearchSelectProps = {
2791
2882
  return props.modelValue;
2792
2883
  }, function (v) {
2793
2884
  if (!(v !== null && v !== void 0 && v.length)) {
2794
- var _copyData$value2;
2795
2885
  selectedList.value = [];
2796
- (_copyData$value2 = copyData.value) === null || _copyData$value2 === void 0 || _copyData$value2.forEach(function (item) {
2797
- item.isSelected = false;
2798
- });
2886
+ var _iterator2 = search_select_createForOfIteratorHelper(copyData.value || []),
2887
+ _step2;
2888
+ try {
2889
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
2890
+ var item = _step2.value;
2891
+ item.isSelected = false;
2892
+ }
2893
+ } catch (err) {
2894
+ _iterator2.e(err);
2895
+ } finally {
2896
+ _iterator2.f();
2897
+ }
2799
2898
  return;
2800
2899
  }
2801
2900
  var list = [];
2802
- v.forEach(function (item) {
2803
- var seleted = selectedList.value.find(function (set) {
2804
- return set.id === item.id && set.name === item.name;
2805
- });
2806
- if ((seleted === null || seleted === void 0 ? void 0 : seleted.toValueKey()) === JSON.stringify(item)) {
2807
- seleted.values = item.values || [];
2808
- seleted.logical = item.logical || SearchLogical.OR;
2809
- list.push(seleted);
2810
- } else {
2811
- var _item$values;
2812
- var searchItem = props.data.find(function (set) {
2813
- return set.id === item.id;
2901
+ var _iterator3 = search_select_createForOfIteratorHelper(v),
2902
+ _step3;
2903
+ try {
2904
+ var _loop2 = function _loop2() {
2905
+ var item = _step3.value;
2906
+ var selected = selectedList.value.find(function (set) {
2907
+ return set.id === item.id && set.name === item.name;
2814
2908
  });
2815
- var searchType = 'default';
2816
- if (!searchItem) {
2817
- searchItem = props.conditions.find(function (set) {
2909
+ if ((selected === null || selected === void 0 ? void 0 : selected.toValueKey()) === JSON.stringify(item)) {
2910
+ selected.values = item.values || [];
2911
+ selected.logical = item.logical || SearchLogical.OR;
2912
+ list.push(selected);
2913
+ } else {
2914
+ var _item$values;
2915
+ var searchItem = props.data.find(function (set) {
2818
2916
  return set.id === item.id;
2819
2917
  });
2820
- searchItem && (searchType = 'condition');
2821
- }
2822
- if (!searchItem && !((_item$values = item.values) !== null && _item$values !== void 0 && _item$values.length)) {
2823
- searchType = 'text';
2918
+ var searchType = 'default';
2919
+ if (!searchItem) {
2920
+ searchItem = props.conditions.find(function (set) {
2921
+ return set.id === item.id;
2922
+ });
2923
+ if (searchItem) {
2924
+ searchType = 'condition';
2925
+ }
2926
+ }
2927
+ if (!searchItem && !((_item$values = item.values) !== null && _item$values !== void 0 && _item$values.length)) {
2928
+ searchType = 'text';
2929
+ }
2930
+ var newSelected = new SelectedItem(searchItem || item, searchType);
2931
+ newSelected.values = item.values || [];
2932
+ newSelected.logical = item.logical || SearchLogical.OR;
2933
+ list.push(newSelected);
2824
2934
  }
2825
- var newSelected = new SelectedItem(searchItem || item, searchType);
2826
- newSelected.values = item.values || [];
2827
- newSelected.logical = item.logical || SearchLogical.OR;
2828
- list.push(newSelected);
2935
+ };
2936
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
2937
+ _loop2();
2829
2938
  }
2830
- });
2939
+ } catch (err) {
2940
+ _iterator3.e(err);
2941
+ } finally {
2942
+ _iterator3.f();
2943
+ }
2831
2944
  selectedList.value = list;
2832
2945
  copyData.value = JSON.parse(JSON.stringify(props.data || []));
2833
- copyData.value.forEach(function (item) {
2834
- item.isSelected = props.uniqueSelect && !!list.some(function (set) {
2835
- return set.id === item.id;
2836
- });
2837
- });
2946
+ var _iterator4 = search_select_createForOfIteratorHelper(copyData.value),
2947
+ _step4;
2948
+ try {
2949
+ var _loop3 = function _loop3() {
2950
+ var item = _step4.value;
2951
+ item.isSelected = props.uniqueSelect && !!list.some(function (set) {
2952
+ return set.id === item.id;
2953
+ });
2954
+ };
2955
+ for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
2956
+ _loop3();
2957
+ }
2958
+ } catch (err) {
2959
+ _iterator4.e(err);
2960
+ } finally {
2961
+ _iterator4.f();
2962
+ }
2838
2963
  }, {
2839
2964
  immediate: true,
2840
2965
  deep: true
@@ -2842,6 +2967,7 @@ var SearchSelectProps = {
2842
2967
  // life hooks
2843
2968
  (0,external_vue_namespaceObject.onMounted)(function () {
2844
2969
  addListener(wrapRef.value.querySelector(".".concat(resolveClassName('search-select-container'))), debounceResize);
2970
+ debounceResize();
2845
2971
  });
2846
2972
  (0,external_vue_namespaceObject.onBeforeUnmount)(function () {
2847
2973
  removeListener(wrapRef.value.querySelector(".".concat(resolveClassName('search-select-container'))), debounceResize);
@@ -2883,18 +3009,18 @@ var SearchSelectProps = {
2883
3009
  return;
2884
3010
  }
2885
3011
  var inputEl = wrapRef.value.querySelector(".".concat(resolveClassName('search-select-container')));
2886
- var maxWidth = wrapRef.value.querySelector('.search-container').clientWidth - SELETED_MARGING_RIGHT - 2;
3012
+ var maxWidth = wrapRef.value.querySelector('.search-container').clientWidth - SELECTED_MARGIN_RIGHT - 2;
2887
3013
  var tagList = inputEl.querySelectorAll('.search-container-selected:not(.overflow-selected)');
2888
3014
  var width = 0;
2889
3015
  var index = 0;
2890
3016
  var i = 0;
2891
3017
  while (index === 0 && width <= maxWidth - INPUT_PADDING_WIDTH && i <= tagList.length - 1) {
2892
3018
  var el = tagList[i];
2893
- if (el.clientHeight > props.minHeight) {
3019
+ if (el.clientHeight > INPUT_MIN_HEIGHT) {
2894
3020
  overflowIndex.value = i;
2895
3021
  return;
2896
3022
  }
2897
- width += el ? el.clientWidth + SELETED_MARGING_RIGHT : 0;
3023
+ width += el ? el.clientWidth + SELECTED_MARGIN_RIGHT : 0;
2898
3024
  if (width >= maxWidth - INPUT_PADDING_WIDTH) {
2899
3025
  index = i;
2900
3026
  }
@@ -2933,12 +3059,15 @@ var SearchSelectProps = {
2933
3059
  var list = selectedList.value.slice();
2934
3060
  list.splice(typeof index === 'number' ? index : selectedList.value.length - 1, 1);
2935
3061
  onValidate('');
3062
+ inputRef.value.refleshMenuHover();
2936
3063
  emit('update:modelValue', list.map(function (item) {
2937
3064
  return item.toValue();
2938
3065
  }));
2939
3066
  }
2940
3067
  function handleInputFocus(v) {
2941
- v && (overflowIndex.value = -1);
3068
+ if (v) {
3069
+ overflowIndex.value = -1;
3070
+ }
2942
3071
  if (v === false) {
2943
3072
  var _wrapRef$value$queryS;
2944
3073
  (_wrapRef$value$queryS = wrapRef.value.querySelector(".".concat(resolveClassName('search-select-container')))) === null || _wrapRef$value$queryS === void 0 || _wrapRef$value$queryS.scrollTo(0, 0);
@@ -2980,7 +3109,7 @@ var SearchSelectProps = {
2980
3109
  var _this = this,
2981
3110
  _this$$slots$prepend,
2982
3111
  _this$$slots2;
2983
- var maxHeight = "".concat(!this.shrink || this.isFocus ? this.maxHeight : this.minHeight, "px");
3112
+ var maxHeight = "".concat(this.isFocus ? this.maxHeight : INPUT_MIN_HEIGHT).replace('px', '');
2984
3113
  var showCondition = !!this.selectedList.length && this.selectedList.slice(-1)[0].type !== 'condition';
2985
3114
  var menuSlots = Object.assign({}, this.$slots.menu ? {
2986
3115
  menu: function menu(data) {
@@ -2990,24 +3119,25 @@ var SearchSelectProps = {
2990
3119
  } : {});
2991
3120
  // render
2992
3121
  return (0,external_vue_namespaceObject.createVNode)("div", {
2993
- "class": this.resolveClassName('search-select'),
2994
- "ref": "wrapRef"
3122
+ "ref": "wrapRef",
3123
+ "class": this.resolveClassName('search-select')
2995
3124
  }, [(0,external_vue_namespaceObject.createVNode)("div", {
2996
3125
  "class": _defineProperty(_defineProperty({}, this.resolveClassName('search-select-container'), true), 'is-focus', this.isFocus),
2997
3126
  "onClick": this.handleWrapClick
2998
3127
  }, [(0,external_vue_namespaceObject.createVNode)("div", {
2999
3128
  "class": "search-prefix"
3000
3129
  }, [(_this$$slots$prepend = (_this$$slots2 = this.$slots).prepend) === null || _this$$slots$prepend === void 0 ? void 0 : _this$$slots$prepend.call(_this$$slots2)]), (0,external_vue_namespaceObject.createVNode)("div", {
3001
- "class": "search-container",
3002
3130
  "style": {
3003
- maxHeight: maxHeight
3004
- }
3131
+ 'max-height': "".concat(maxHeight, "px")
3132
+ },
3133
+ "class": "search-container"
3005
3134
  }, [(0,external_vue_namespaceObject.createVNode)(selected, {
3006
- "data": this.copyData,
3007
3135
  "conditions": this.localConditions,
3008
- "selectedList": this.selectedList,
3009
- "overflowIndex": this.overflowIndex,
3136
+ "data": this.copyData,
3010
3137
  "getMenuList": this.getMenuList,
3138
+ "maxHeight": this.maxHeight,
3139
+ "overflowIndex": this.overflowIndex,
3140
+ "selectedList": this.selectedList,
3011
3141
  "validateValues": this.validateValues,
3012
3142
  "valueBehavior": this.valueBehavior,
3013
3143
  "onDelete": this.handleDeleteSelected,
@@ -3016,13 +3146,14 @@ var SearchSelectProps = {
3016
3146
  "class": "search-container-input"
3017
3147
  }, [(0,external_vue_namespaceObject.createVNode)(input, {
3018
3148
  "ref": "inputRef",
3019
- "data": this.copyData,
3020
- "showInputBefore": !this.selectedList.length,
3021
- "showCondition": showCondition,
3022
- "conditions": this.localConditions,
3023
- "placeholder": this.placeholder || this.t.pleaseSelect,
3024
3149
  "clickOutside": this.handleInputOutside,
3150
+ "conditions": this.localConditions,
3151
+ "data": this.copyData,
3025
3152
  "getMenuList": this.getMenuList,
3153
+ "maxHeight": this.maxHeight,
3154
+ "placeholder": this.placeholder || this.t.pleaseSelect,
3155
+ "showCondition": showCondition,
3156
+ "showInputBefore": !this.selectedList.length,
3026
3157
  "validateValues": this.validateValues,
3027
3158
  "valueBehavior": this.valueBehavior,
3028
3159
  "onAdd": this.handleAddSelected,
@@ -3035,8 +3166,8 @@ var SearchSelectProps = {
3035
3166
  "class": "search-clear",
3036
3167
  "onClick": this.handleClearAll
3037
3168
  }, null), this.$slots.append ? this.$slots.append() : (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Search, {
3038
- "onClick": this.handleClickSearch,
3039
- "class": "search-nextfix-icon ".concat(this.isFocus ? 'is-focus' : '')
3169
+ "class": "search-nextfix-icon ".concat(this.isFocus ? 'is-focus' : ''),
3170
+ "onClick": this.handleClickSearch
3040
3171
  }, null)])]), !!this.validateStr.length && (0,external_vue_namespaceObject.createVNode)("div", {
3041
3172
  "class": this.resolveClassName('search-select-tips')
3042
3173
  }, [this.$slots.validate ? this.$slots.validate() : (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [(0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.ExclamationCircleShape, {