bkui-vue 0.0.2-beta.8 → 0.0.2-beta.80

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 (395) hide show
  1. package/dist/index.cjs.js +70 -62
  2. package/dist/index.esm.js +15668 -15161
  3. package/dist/index.umd.js +73 -65
  4. package/dist/locale/en.esm.js +1 -1
  5. package/dist/locale/en.esm.js.map +1 -1
  6. package/dist/locale/en.umd.js +1 -1
  7. package/dist/locale/en.umd.js.map +1 -1
  8. package/dist/locale/zh-cn.esm.js +1 -1
  9. package/dist/locale/zh-cn.esm.js.map +1 -1
  10. package/dist/locale/zh-cn.umd.js +1 -1
  11. package/dist/locale/zh-cn.umd.js.map +1 -1
  12. package/dist/style.css +1 -1
  13. package/dist/style.variable.css +1 -1
  14. package/lib/affix/affix.d.ts +1 -1
  15. package/lib/affix/index.d.ts +4 -4
  16. package/lib/affix/index.js +1 -1
  17. package/lib/alert/alert.css +7 -0
  18. package/lib/alert/alert.d.ts +5 -5
  19. package/lib/alert/alert.less +16 -6
  20. package/lib/alert/alert.variable.css +7 -0
  21. package/lib/alert/index.d.ts +10 -10
  22. package/lib/alert/index.js +1 -1
  23. package/lib/animate-number/index.d.ts +1 -1
  24. package/lib/animate-number/index.js +1 -1
  25. package/lib/backtop/backtop.css +8 -8
  26. package/lib/backtop/backtop.less +3 -1
  27. package/lib/backtop/backtop.variable.css +11 -11
  28. package/lib/backtop/index.d.ts +1 -1
  29. package/lib/backtop/index.js +1 -1
  30. package/lib/badge/badge.d.ts +2 -2
  31. package/lib/badge/index.d.ts +7 -7
  32. package/lib/badge/index.js +1 -1
  33. package/lib/breadcrumb/breadcrumb.css +4 -4
  34. package/lib/breadcrumb/breadcrumb.variable.css +4 -4
  35. package/lib/breadcrumb/index.d.ts +2 -2
  36. package/lib/breadcrumb/index.js +1 -1
  37. package/lib/button/button.css +20 -0
  38. package/lib/button/button.less +105 -94
  39. package/lib/button/button.variable.css +20 -0
  40. package/lib/button/index.d.ts +2 -2
  41. package/lib/button/index.js +1 -1
  42. package/lib/card/card.css +4 -4
  43. package/lib/card/card.d.ts +1 -1
  44. package/lib/card/card.variable.css +4 -4
  45. package/lib/card/index.d.ts +4 -4
  46. package/lib/card/index.js +1 -1
  47. package/lib/cascader/cascader.css +4 -4
  48. package/lib/cascader/cascader.d.ts +1 -0
  49. package/lib/cascader/cascader.variable.css +4 -4
  50. package/lib/cascader/index.d.ts +5 -2
  51. package/lib/cascader/index.js +1 -1
  52. package/lib/cascader/interface.d.ts +1 -1
  53. package/lib/checkbox/checkbox-group.d.ts +6 -3
  54. package/lib/checkbox/checkbox.d.ts +4 -4
  55. package/lib/checkbox/index.d.ts +22 -19
  56. package/lib/checkbox/index.js +1 -1
  57. package/lib/code-diff/index.d.ts +1 -1
  58. package/lib/code-diff/index.js +1 -1
  59. package/lib/collapse/index.d.ts +2 -2
  60. package/lib/collapse/index.js +1 -1
  61. package/lib/collapse-transition/index.d.ts +128 -2
  62. package/lib/collapse-transition/index.js +1 -1
  63. package/lib/color-picker/color-picker.d.ts +16 -0
  64. package/lib/color-picker/components/recommend-colors.d.ts +16 -0
  65. package/lib/color-picker/index.d.ts +19 -1
  66. package/lib/color-picker/index.js +1 -1
  67. package/lib/components.d.ts +1 -1
  68. package/lib/components.js +1 -1
  69. package/lib/config-provider/config-provider.d.ts +3 -0
  70. package/lib/config-provider/index.d.ts +5 -1
  71. package/lib/config-provider/index.js +1 -1
  72. package/lib/config-provider/token.d.ts +1 -0
  73. package/lib/config-provider/use-global-config.d.ts +2 -0
  74. package/lib/config-provider/use-prefix.d.ts +2 -0
  75. package/lib/container/container.css +4 -4
  76. package/lib/container/container.variable.css +4 -4
  77. package/lib/container/index.d.ts +2 -2
  78. package/lib/container/index.js +1 -1
  79. package/lib/date-picker/date-picker.d.ts +4 -2
  80. package/lib/date-picker/index.d.ts +15 -8
  81. package/lib/date-picker/index.js +1 -1
  82. package/lib/date-picker/panel/date-range.d.ts +2 -1
  83. package/lib/date-picker/time-picker.d.ts +1 -1
  84. package/lib/dialog/dialog.css +2 -0
  85. package/lib/dialog/dialog.variable.css +2 -0
  86. package/lib/dialog/index.d.ts +1 -1
  87. package/lib/dialog/index.js +1 -1
  88. package/lib/directives/index.js +1 -1
  89. package/lib/directives/tooltips.d.ts +3 -2
  90. package/lib/dist.index.js +1 -1
  91. package/lib/divider/index.d.ts +1 -1
  92. package/lib/divider/index.js +1 -1
  93. package/lib/dropdown/dropdown.css +1 -0
  94. package/lib/dropdown/dropdown.d.ts +1 -1
  95. package/lib/dropdown/dropdown.variable.css +1 -0
  96. package/lib/dropdown/index.d.ts +7 -7
  97. package/lib/dropdown/index.js +1 -1
  98. package/lib/exception/index.d.ts +2 -2
  99. package/lib/exception/index.js +1 -1
  100. package/lib/fixed-navbar/index.d.ts +1 -1
  101. package/lib/fixed-navbar/index.js +1 -1
  102. package/lib/form/index.d.ts +3 -3
  103. package/lib/form/index.js +1 -1
  104. package/lib/hooks.d.ts +1 -1
  105. package/lib/hooks.js +1 -1
  106. package/lib/icon/angle-double-down-line.js +1 -1
  107. package/lib/icon/angle-double-left-line.js +1 -1
  108. package/lib/icon/angle-double-left.js +1 -1
  109. package/lib/icon/angle-double-right-line.js +1 -1
  110. package/lib/icon/angle-double-right.js +1 -1
  111. package/lib/icon/angle-double-up-line.js +1 -1
  112. package/lib/icon/angle-down-fill.js +1 -1
  113. package/lib/icon/angle-down-line.js +1 -1
  114. package/lib/icon/angle-down.js +1 -1
  115. package/lib/icon/angle-left.js +1 -1
  116. package/lib/icon/angle-right.js +1 -1
  117. package/lib/icon/angle-up-fill.js +1 -1
  118. package/lib/icon/angle-up.js +1 -1
  119. package/lib/icon/archive-fill.js +1 -1
  120. package/lib/icon/arrows-left.js +1 -1
  121. package/lib/icon/arrows-right.js +1 -1
  122. package/lib/icon/assistant.d.ts +4 -0
  123. package/lib/icon/assistant.js +1 -0
  124. package/lib/icon/audio-fill.js +1 -1
  125. package/lib/icon/bk.js +1 -1
  126. package/lib/icon/circle.js +1 -1
  127. package/lib/icon/close-line.js +1 -1
  128. package/lib/icon/close.js +1 -1
  129. package/lib/icon/code.js +1 -1
  130. package/lib/icon/cog-shape.js +1 -1
  131. package/lib/icon/collapse-left.js +1 -1
  132. package/lib/icon/copy-shape.js +1 -1
  133. package/lib/icon/copy.js +1 -1
  134. package/lib/icon/data-shape.js +1 -1
  135. package/lib/icon/del.js +1 -1
  136. package/lib/icon/doc-fill.js +1 -1
  137. package/lib/icon/done.js +1 -1
  138. package/lib/icon/down-shape.js +1 -1
  139. package/lib/icon/down-small.js +1 -1
  140. package/lib/icon/edit-line.js +1 -1
  141. package/lib/icon/ellipsis.js +1 -1
  142. package/lib/icon/enlarge-line.js +1 -1
  143. package/lib/icon/error.js +1 -1
  144. package/lib/icon/excel-fill.js +1 -1
  145. package/lib/icon/exclamation-circle-shape.js +1 -1
  146. package/lib/icon/eye.js +1 -1
  147. package/lib/icon/filliscreen-line.js +1 -1
  148. package/lib/icon/fix-line.js +1 -1
  149. package/lib/icon/fix-shape.js +1 -1
  150. package/lib/icon/folder-open.js +1 -1
  151. package/lib/icon/folder-shape-open.js +1 -1
  152. package/lib/icon/folder-shape.js +1 -1
  153. package/lib/icon/folder.js +1 -1
  154. package/lib/icon/funnel.js +1 -1
  155. package/lib/icon/help-document-fill.js +1 -1
  156. package/lib/icon/help-fill.js +1 -1
  157. package/lib/icon/help.js +1 -1
  158. package/lib/icon/image-fill.js +1 -1
  159. package/lib/icon/img-error.js +1 -1
  160. package/lib/icon/img-placehoulder.js +1 -1
  161. package/lib/icon/index.d.ts +1 -0
  162. package/lib/icon/index.js +1 -1
  163. package/lib/icon/info-line.js +1 -1
  164. package/lib/icon/info.js +1 -1
  165. package/lib/icon/left-shape.js +1 -1
  166. package/lib/icon/left-turn-line.js +1 -1
  167. package/lib/icon/narrow-line.js +1 -1
  168. package/lib/icon/original.js +1 -1
  169. package/lib/icon/pdf-fill.js +1 -1
  170. package/lib/icon/play-shape.js +1 -1
  171. package/lib/icon/plus.js +1 -1
  172. package/lib/icon/ppt-fill.js +1 -1
  173. package/lib/icon/qq.js +1 -1
  174. package/lib/icon/right-shape.js +1 -1
  175. package/lib/icon/right-turn-line.js +1 -1
  176. package/lib/icon/search.js +1 -1
  177. package/lib/icon/share.js +1 -1
  178. package/lib/icon/spinner.js +1 -1
  179. package/lib/icon/success.js +1 -1
  180. package/lib/icon/switcher-loading.js +1 -1
  181. package/lib/icon/text-file.js +1 -1
  182. package/lib/icon/text-fill.js +1 -1
  183. package/lib/icon/transfer.js +1 -1
  184. package/lib/icon/tree-application-shape.js +1 -1
  185. package/lib/icon/unfull-screen.js +1 -1
  186. package/lib/icon/unvisible.js +1 -1
  187. package/lib/icon/up-shape.js +1 -1
  188. package/lib/icon/upload.js +1 -1
  189. package/lib/icon/video-fill.js +1 -1
  190. package/lib/icon/warn.js +1 -1
  191. package/lib/icon/weixin-pro.js +1 -1
  192. package/lib/icon/weixin.js +1 -1
  193. package/lib/image/index.d.ts +1 -1
  194. package/lib/image/index.js +1 -1
  195. package/lib/index.js +1 -1
  196. package/lib/info-box/index.js +1 -1
  197. package/lib/info-box/info-box.css +2 -0
  198. package/lib/info-box/info-box.less +2 -1
  199. package/lib/info-box/info-box.variable.css +2 -0
  200. package/lib/input/index.d.ts +146 -50
  201. package/lib/input/index.js +2 -1
  202. package/lib/input/index.js.LICENSE.txt +1 -0
  203. package/lib/input/input.css +38 -10
  204. package/lib/input/input.d.ts +100 -11
  205. package/lib/input/input.less +53 -14
  206. package/lib/input/input.variable.css +38 -10
  207. package/lib/input/util.d.ts +6 -0
  208. package/lib/link/index.d.ts +4 -4
  209. package/lib/link/index.js +1 -1
  210. package/lib/link/link.d.ts +1 -1
  211. package/lib/loading/index.d.ts +2 -2
  212. package/lib/loading/index.js +1 -1
  213. package/lib/loading/loading.css +4 -4
  214. package/lib/loading/loading.variable.css +4 -4
  215. package/lib/locale/index.js +1 -1
  216. package/lib/locale/lang/en.d.ts +1 -0
  217. package/lib/menu/index.d.ts +2 -2
  218. package/lib/menu/index.js +1 -1
  219. package/lib/menu/menu.css +4 -4
  220. package/lib/menu/menu.variable.css +4 -4
  221. package/lib/message/index.js +1 -1
  222. package/lib/message/message.css +33 -9
  223. package/lib/message/message.less +78 -54
  224. package/lib/message/message.variable.css +33 -9
  225. package/lib/message/messageConstructor.d.ts +30 -8
  226. package/lib/modal/index.d.ts +2 -2
  227. package/lib/modal/index.js +1 -1
  228. package/lib/modal/modal.css +2 -0
  229. package/lib/modal/modal.variable.css +2 -0
  230. package/lib/navigation/index.d.ts +4 -1
  231. package/lib/navigation/index.js +1 -1
  232. package/lib/navigation/navigation.d.ts +1 -0
  233. package/lib/notify/index.js +1 -1
  234. package/lib/notify/notifyConstructor.d.ts +1 -1
  235. package/lib/overflow-title/components/overflow-title.d.ts +257 -1
  236. package/lib/overflow-title/index.d.ts +387 -2
  237. package/lib/overflow-title/index.js +1 -1
  238. package/lib/overflow-title/props.d.ts +129 -0
  239. package/lib/pagination/index.d.ts +2 -2
  240. package/lib/pagination/index.js +1 -1
  241. package/lib/plugin-popover/index.js +1 -1
  242. package/lib/plugins/index.js +1 -1
  243. package/lib/pop-confirm/index.d.ts +1 -1
  244. package/lib/pop-confirm/index.js +1 -1
  245. package/lib/popover/const.d.ts +22 -9
  246. package/lib/popover/content.d.ts +33 -0
  247. package/lib/popover/index.d.ts +154 -61
  248. package/lib/popover/index.js +1 -1
  249. package/lib/popover/popover.css +1 -0
  250. package/lib/popover/popover.d.ts +64 -23
  251. package/lib/popover/popover.less +3 -2
  252. package/lib/popover/popover.variable.css +1 -0
  253. package/lib/popover/props.d.ts +29 -4
  254. package/lib/popover/use-floating.d.ts +2 -2
  255. package/lib/popover/use-popover-init.d.ts +2 -1
  256. package/lib/popover2/index.d.ts +1 -1
  257. package/lib/popover2/index.js +1 -1
  258. package/lib/preset.d.ts +2 -0
  259. package/lib/preset.js +1 -1
  260. package/lib/process/index.d.ts +1 -1
  261. package/lib/process/index.js +1 -1
  262. package/lib/progress/index.d.ts +1 -1
  263. package/lib/progress/index.js +1 -1
  264. package/lib/progress/progress.css +4 -4
  265. package/lib/progress/progress.variable.css +4 -4
  266. package/lib/radio/index.d.ts +23 -23
  267. package/lib/radio/index.js +1 -1
  268. package/lib/radio/radio-button.d.ts +4 -4
  269. package/lib/radio/radio-group.d.ts +4 -4
  270. package/lib/radio/radio.d.ts +4 -4
  271. package/lib/rate/index.d.ts +8 -4
  272. package/lib/rate/index.js +1 -1
  273. package/lib/rate/rate.d.ts +2 -1
  274. package/lib/resize-layout/index.d.ts +4 -4
  275. package/lib/resize-layout/index.js +1 -1
  276. package/lib/resize-layout/resize-layout.css +12 -0
  277. package/lib/resize-layout/resize-layout.d.ts +1 -1
  278. package/lib/resize-layout/resize-layout.less +12 -0
  279. package/lib/resize-layout/resize-layout.variable.css +12 -0
  280. package/lib/search-select/index.d.ts +62 -29
  281. package/lib/search-select/index.js +1 -1
  282. package/lib/search-select/input.d.ts +5 -1
  283. package/lib/search-select/menu.d.ts +33 -2
  284. package/lib/search-select/search-select.css +37 -17
  285. package/lib/search-select/search-select.d.ts +23 -20
  286. package/lib/search-select/search-select.less +34 -11
  287. package/lib/search-select/search-select.variable.css +37 -17
  288. package/lib/search-select/selected.d.ts +5 -1
  289. package/lib/search-select/utils.d.ts +13 -5
  290. package/lib/select/common.d.ts +1 -0
  291. package/lib/select/index.d.ts +203 -84
  292. package/lib/select/index.js +1 -1
  293. package/lib/select/option.d.ts +11 -0
  294. package/lib/select/select.css +13 -5
  295. package/lib/select/select.d.ts +86 -37
  296. package/lib/select/select.less +11 -1
  297. package/lib/select/select.variable.css +37 -29
  298. package/lib/select/selectTagInput.d.ts +8 -5
  299. package/lib/shared/helper.d.ts +1 -1
  300. package/lib/shared/index.js +1 -1
  301. package/lib/shared/mask-manager.d.ts +3 -4
  302. package/lib/shared/pop-manager.d.ts +6 -2
  303. package/lib/shared/popover.d.ts +2 -2
  304. package/lib/shared/vue-types.d.ts +3 -2
  305. package/lib/sideslider/index.d.ts +1 -1
  306. package/lib/sideslider/index.js +1 -1
  307. package/lib/slider/index.d.ts +1 -1
  308. package/lib/slider/index.js +1 -1
  309. package/lib/steps/index.d.ts +1 -1
  310. package/lib/steps/index.js +1 -1
  311. package/lib/styles/mixins/animate.css +4 -4
  312. package/lib/styles/mixins/animate.less +10 -6
  313. package/lib/styles/mixins/animate.variable.css +126 -4
  314. package/lib/styles/mixins/mixins.css +4 -4
  315. package/lib/styles/mixins/mixins.variable.css +4 -4
  316. package/lib/styles/mixins/popper.less +6 -5
  317. package/lib/swiper/index.d.ts +1 -1
  318. package/lib/swiper/index.js +1 -1
  319. package/lib/swiper/swiper.css +0 -6
  320. package/lib/swiper/swiper.less +0 -8
  321. package/lib/swiper/swiper.variable.css +0 -6
  322. package/lib/switcher/index.d.ts +30 -16
  323. package/lib/switcher/index.js +1 -1
  324. package/lib/switcher/switcher.css +4 -4
  325. package/lib/switcher/switcher.d.ts +74 -5
  326. package/lib/switcher/switcher.variable.css +4 -4
  327. package/lib/tab/index.d.ts +3 -3
  328. package/lib/tab/index.js +1 -1
  329. package/lib/tab/tab-nav.d.ts +12 -2
  330. package/lib/tab/tab-panel.d.ts +1 -1
  331. package/lib/table/components/table-cell.d.ts +22 -15
  332. package/lib/table/components/table-column.d.ts +155 -219
  333. package/lib/table/const.d.ts +40 -56
  334. package/lib/table/events.d.ts +180 -0
  335. package/lib/table/index.d.ts +747 -440
  336. package/lib/table/index.js +1 -1
  337. package/lib/table/plugins/head-filter.css +3 -0
  338. package/lib/table/plugins/head-filter.d.ts +3 -7
  339. package/lib/table/plugins/head-filter.less +3 -0
  340. package/lib/table/plugins/head-filter.variable.css +3 -0
  341. package/lib/table/plugins/head-sort.d.ts +3 -7
  342. package/lib/table/plugins/settings.d.ts +12 -26
  343. package/lib/table/plugins/use-column-resize.d.ts +30 -10
  344. package/lib/table/plugins/use-fixed-column.d.ts +10 -9
  345. package/lib/table/plugins/use-pagination.d.ts +7 -4
  346. package/lib/table/props.d.ts +220 -181
  347. package/lib/table/render.d.ts +12 -20
  348. package/lib/table/table.css +89 -6
  349. package/lib/table/table.d.ts +227 -104
  350. package/lib/table/table.less +79 -9
  351. package/lib/table/table.variable.css +89 -6
  352. package/lib/table/use-attributes.d.ts +55 -0
  353. package/lib/table/use-column.d.ts +177 -3
  354. package/lib/table/use-common.d.ts +1609 -76
  355. package/lib/table/use-render.d.ts +11 -0
  356. package/lib/table/utils.d.ts +30 -28
  357. package/lib/table-column/index.d.ts +240 -527
  358. package/lib/table-column/index.js +1 -1
  359. package/lib/tag/index.d.ts +10 -10
  360. package/lib/tag/index.js +1 -1
  361. package/lib/tag/tag.d.ts +5 -5
  362. package/lib/tag-input/index.d.ts +49 -13
  363. package/lib/tag-input/index.js +1 -1
  364. package/lib/tag-input/tag-input.css +9 -1
  365. package/lib/tag-input/tag-input.d.ts +46 -10
  366. package/lib/tag-input/tag-input.less +13 -4
  367. package/lib/tag-input/tag-input.variable.css +9 -1
  368. package/lib/tag-input/tag-props.d.ts +16 -4
  369. package/lib/time-picker/index.d.ts +4 -4
  370. package/lib/time-picker/index.js +1 -1
  371. package/lib/timeline/index.d.ts +1 -1
  372. package/lib/timeline/index.js +1 -1
  373. package/lib/transfer/index.d.ts +1 -1
  374. package/lib/transfer/index.js +1 -1
  375. package/lib/tree/constant.d.ts +2 -2
  376. package/lib/tree/index.d.ts +49 -7
  377. package/lib/tree/index.js +1 -1
  378. package/lib/tree/props.d.ts +16 -2
  379. package/lib/tree/tree.d.ts +27 -2
  380. package/lib/tree/use-node-action.d.ts +5 -3
  381. package/lib/tree/use-node-attribute.d.ts +17 -8
  382. package/lib/tree/use-search.d.ts +2 -2
  383. package/lib/tree/use-tree-init.d.ts +1 -2
  384. package/lib/tree/util.d.ts +8 -3
  385. package/lib/upload/index.d.ts +1 -1
  386. package/lib/upload/index.js +1 -1
  387. package/lib/upload/upload.css +4 -4
  388. package/lib/upload/upload.variable.css +4 -4
  389. package/lib/virtual-render/index.d.ts +43 -1
  390. package/lib/virtual-render/index.js +1 -1
  391. package/lib/virtual-render/props.d.ts +15 -0
  392. package/lib/virtual-render/v-virtual-render.d.ts +19 -1
  393. package/lib/virtual-render/virtual-render.d.ts +25 -0
  394. package/lib/volar.components.d.ts +24 -24
  395. package/package.json +17 -16
@@ -5,6 +5,7 @@ declare const BkSwitcher: {
5
5
  $props: {
6
6
  extCls?: string;
7
7
  disabled?: boolean;
8
+ theme?: "success" | "primary";
8
9
  value?: string | number | boolean;
9
10
  modelValue?: string | number | boolean;
10
11
  withValidate?: boolean;
@@ -18,10 +19,9 @@ declare const BkSwitcher: {
18
19
  falseValue?: string | number | boolean;
19
20
  class?: unknown;
20
21
  style?: unknown;
21
- onChange?: (...args: any[]) => any;
22
- readonly theme?: "success" | "warning" | "danger" | "primary";
23
- key?: string | number | symbol;
22
+ onChange?: (value: boolean) => any;
24
23
  ref?: import("vue").VNodeRef;
24
+ key?: string | number | symbol;
25
25
  ref_for?: boolean;
26
26
  ref_key?: string;
27
27
  onVnodeBeforeMount?: ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
@@ -63,7 +63,7 @@ declare const BkSwitcher: {
63
63
  [key: string]: any;
64
64
  }>) => void)[];
65
65
  readonly size?: "default" | "small" | "large";
66
- "onUpdate:modelValue"?: (...args: any[]) => any;
66
+ "onUpdate:modelValue"?: (value: string | number | boolean) => any;
67
67
  };
68
68
  $attrs: {
69
69
  [x: string]: unknown;
@@ -76,10 +76,12 @@ declare const BkSwitcher: {
76
76
  }>;
77
77
  $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}>;
78
78
  $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}>;
79
- $emit: (event: "change" | "update:modelValue", ...args: any[]) => void;
79
+ $emit: ((event: import("./switcher").EVENTS.UPDATE, value: string | number | boolean) => void) & ((event: import("./switcher").EVENTS.CHANGE, value: boolean) => void);
80
80
  $el: any;
81
81
  $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
82
- theme: import("vue-types").VueTypeDef<"success" | "warning" | "danger" | "primary">;
82
+ theme: import("vue-types").VueTypeDef<"success" | "primary"> & {
83
+ default: "success" | "primary";
84
+ };
83
85
  size: import("vue-types").VueTypeDef<"default" | "small" | "large">;
84
86
  disabled: import("vue-types").VueTypeValidableDef<boolean> & {
85
87
  default: boolean;
@@ -129,11 +131,15 @@ declare const BkSwitcher: {
129
131
  default: boolean;
130
132
  };
131
133
  }>> & {
132
- onChange?: (...args: any[]) => any;
133
- "onUpdate:modelValue"?: (...args: any[]) => any;
134
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], string, {
134
+ onChange?: (value: boolean) => any;
135
+ "onUpdate:modelValue"?: (value: string | number | boolean) => any;
136
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
137
+ "update:modelValue": (value: string | number | boolean) => string | number | boolean;
138
+ change: (value: boolean) => boolean;
139
+ }, string, {
135
140
  extCls: string;
136
141
  disabled: boolean;
142
+ theme: "success" | "primary";
137
143
  value: string | number | boolean;
138
144
  modelValue: string | number | boolean;
139
145
  withValidate: boolean;
@@ -166,7 +172,9 @@ declare const BkSwitcher: {
166
172
  $nextTick: typeof import("vue").nextTick;
167
173
  $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean>): import("vue").WatchStopHandle;
168
174
  } & Readonly<import("vue").ExtractPropTypes<{
169
- theme: import("vue-types").VueTypeDef<"success" | "warning" | "danger" | "primary">;
175
+ theme: import("vue-types").VueTypeDef<"success" | "primary"> & {
176
+ default: "success" | "primary";
177
+ };
170
178
  size: import("vue-types").VueTypeDef<"default" | "small" | "large">;
171
179
  disabled: import("vue-types").VueTypeValidableDef<boolean> & {
172
180
  default: boolean;
@@ -216,14 +224,16 @@ declare const BkSwitcher: {
216
224
  default: boolean;
217
225
  };
218
226
  }>> & {
219
- onChange?: (...args: any[]) => any;
220
- "onUpdate:modelValue"?: (...args: any[]) => any;
227
+ onChange?: (value: boolean) => any;
228
+ "onUpdate:modelValue"?: (value: string | number | boolean) => any;
221
229
  } & import("vue").ShallowUnwrapRef<() => JSX.Element> & {} & import("vue").ComponentCustomProperties & {};
222
230
  __isFragment?: never;
223
231
  __isTeleport?: never;
224
232
  __isSuspense?: never;
225
233
  } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
226
- theme: import("vue-types").VueTypeDef<"success" | "warning" | "danger" | "primary">;
234
+ theme: import("vue-types").VueTypeDef<"success" | "primary"> & {
235
+ default: "success" | "primary";
236
+ };
227
237
  size: import("vue-types").VueTypeDef<"default" | "small" | "large">;
228
238
  disabled: import("vue-types").VueTypeValidableDef<boolean> & {
229
239
  default: boolean;
@@ -273,11 +283,15 @@ declare const BkSwitcher: {
273
283
  default: boolean;
274
284
  };
275
285
  }>> & {
276
- onChange?: (...args: any[]) => any;
277
- "onUpdate:modelValue"?: (...args: any[]) => any;
278
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", {
286
+ onChange?: (value: boolean) => any;
287
+ "onUpdate:modelValue"?: (value: string | number | boolean) => any;
288
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
289
+ "update:modelValue": (value: string | number | boolean) => string | number | boolean;
290
+ change: (value: boolean) => boolean;
291
+ }, string, {
279
292
  extCls: string;
280
293
  disabled: boolean;
294
+ theme: "success" | "primary";
281
295
  value: string | number | boolean;
282
296
  modelValue: string | number | boolean;
283
297
  withValidate: boolean;
@@ -1 +1 @@
1
- !function(e,o){if("object"==typeof exports&&"object"==typeof module)module.exports=o(require("../shared"),require("vue"),require("../config-provider"),require("../icon"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../config-provider","../icon"],o);else{var r="object"==typeof exports?o(require("../shared"),require("vue"),require("../config-provider"),require("../icon")):o(e["../shared"],e.vue,e["../config-provider"],e["../icon"]);for(var t in r)("object"==typeof exports?exports:e)[t]=r[t]}}(self,((e,o,r,t)=>(()=>{"use strict";var n={2717:e=>{e.exports=r},6870:e=>{e.exports=t},4212:o=>{o.exports=e},748:e=>{e.exports=o}},i={};function u(e){var o=i[e];if(void 0!==o)return o.exports;var r=i[e]={exports:{}};return n[e](r,r.exports,u),r.exports}u.d=(e,o)=>{for(var r in o)u.o(o,r)&&!u.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:o[r]})},u.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{u.r(a),u.d(a,{default:()=>s});var e=u(4212);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function r(e,r,t){return(r=function(e){var r=function(e,r){if("object"!==o(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===o(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var t=u(748),n=u(2717),i=u(6870);const l=(0,t.defineComponent)({name:"Switcher",props:{theme:e.PropTypes.theme(),size:e.PropTypes.size(),disabled:e.PropTypes.bool,showText:e.PropTypes.bool,isOutline:e.PropTypes.bool,onText:e.PropTypes.string.def("ON"),offText:e.PropTypes.string.def("OFF"),isSquare:e.PropTypes.bool,extCls:e.PropTypes.string,beforeChange:e.PropTypes.func.def(void 0),trueValue:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number,e.PropTypes.bool]).def(!0),falseValue:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number,e.PropTypes.bool]).def(!1),value:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number,e.PropTypes.bool]).def(!1),modelValue:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.number,e.PropTypes.bool]).def(!1),withValidate:e.PropTypes.bool.def(!0)},emits:["update:modelValue","change"],setup:function(o,u){var a=u.emit,l=(0,e.useFormItem)(),s=(0,n.usePrefix)().resolveClassName,p=(0,t.ref)(!1),c=(0,t.computed)((function(){return o.trueValue===d.value})),f=(0,t.ref)(!1!==o.modelValue),d=(0,t.computed)((function(){return f.value?o.modelValue:o.value})),y=(0,t.computed)((function(){var e,t=(r(e={},o.extCls,!!o.extCls),r(e,"".concat(s("switcher")),!0),r(e,"".concat(s("switcher-outline")),o.isOutline),r(e,"".concat(s("switcher-square")),o.isSquare),r(e,"show-label",o.showText),r(e,"is-disabled",o.disabled),r(e,"is-checked",c.value),r(e,"is-unchecked",!c.value),r(e,"is-loading",p.value),r(e,"".concat(s("primary")),"primary"===o.theme),e);return o.size&&!o.showText&&(t["".concat(s("bswitcher-".concat(o.size)))]=!0),t}));(0,t.watch)((function(){return o.modelValue}),(function(){var e;f.value=!0,o.withValidate&&(null===(e=null==l?void 0:l.validate)||void 0===e||e.call(l,"change"))})),(0,t.watch)((function(){return o.value}),(function(){f.value=!1}));var v=function(e){if(e.stopPropagation(),e.preventDefault(),!o.disabled&&!p.value){var r=c.value?o.falseValue:o.trueValue,t=!c.value,n=function(){a("update:modelValue",r),a("change",t)},i=!0;if("function"==typeof o.beforeChange&&"function"==typeof(i=o.beforeChange(r)).then)return p.value=!0,i.then((function(){n()})).finally((function(){p.value=!1}));i&&n()}},b=function(e){"Enter"!==e.code&&"Enter"!==e.key&&13!==e.keyCode||v(e)};return function(){return(0,t.createVNode)("div",{class:y.value,onClick:v,tabindex:"0",onKeydown:b},[p.value?(0,t.createVNode)(i.SwitcherLoading,{class:"".concat(s("switcher-loading"))},null):"",o.showText?(0,t.createVNode)("span",{class:"switcher-text"},[c.value?o.onText:o.offText]):""])}}}),s=(0,e.withInstall)(l)})(),a})()));
1
+ import*as e from"../shared";import*as o from"vue";import*as r from"../config-provider";import*as t from"../icon";var n={d:(e,o)=>{for(var r in o)n.o(o,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:o[r]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)},i={};n.d(i,{Z:()=>b});const a=(u={PropTypes:()=>e.PropTypes,SwitcherThemeType:()=>e.SwitcherThemeType,useFormItem:()=>e.useFormItem,withInstall:()=>e.withInstall},s={},n.d(s,u),s);var u,s;function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function p(e,o,r){return(o=function(e){var o=function(e,o){if("object"!==l(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var t=r.call(e,"string");if("object"!==l(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===l(o)?o:String(o)}(o))in e?Object.defineProperty(e,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[o]=r,e}const c=(e=>{var o={};return n.d(o,e),o})({computed:()=>o.computed,createVNode:()=>o.createVNode,defineComponent:()=>o.defineComponent,ref:()=>o.ref,watch:()=>o.watch}),f=(e=>{var o={};return n.d(o,e),o})({usePrefix:()=>r.usePrefix}),d=(e=>{var o={};return n.d(o,e),o})({SwitcherLoading:()=>t.SwitcherLoading});var y,m,v={theme:(0,a.SwitcherThemeType)(),size:a.PropTypes.size(),disabled:a.PropTypes.bool,showText:a.PropTypes.bool,isOutline:a.PropTypes.bool,onText:a.PropTypes.string.def("ON"),offText:a.PropTypes.string.def("OFF"),isSquare:a.PropTypes.bool,extCls:a.PropTypes.string,beforeChange:a.PropTypes.func.def(void 0),trueValue:a.PropTypes.oneOfType([a.PropTypes.string,a.PropTypes.number,a.PropTypes.bool]).def(!0),falseValue:a.PropTypes.oneOfType([a.PropTypes.string,a.PropTypes.number,a.PropTypes.bool]).def(!1),value:a.PropTypes.oneOfType([a.PropTypes.string,a.PropTypes.number,a.PropTypes.bool]).def(!1),modelValue:a.PropTypes.oneOfType([a.PropTypes.string,a.PropTypes.number,a.PropTypes.bool]).def(!1),withValidate:a.PropTypes.bool.def(!0)};!function(e){e.UPDATE="update:modelValue",e.CHANGE="change"}(m||(m={}));var T=(p(y={},m.UPDATE,(function(e){return e})),p(y,m.CHANGE,(function(e){return!!e})),y);const h=(0,c.defineComponent)({name:"Switcher",props:v,emits:T,setup:function(e,o){var r=o.emit,t=(0,a.useFormItem)(),n=(0,f.usePrefix)().resolveClassName,i=(0,c.ref)(!1),u=(0,c.computed)((function(){return e.trueValue===l.value})),s=(0,c.ref)(!1!==e.modelValue),l=(0,c.computed)((function(){return s.value?e.modelValue:e.value})),y=(0,c.computed)((function(){var o,r=(p(o={},e.extCls,!!e.extCls),p(o,"".concat(n("switcher")),!0),p(o,"".concat(n("switcher-outline")),e.isOutline),p(o,"".concat(n("switcher-square")),e.isSquare),p(o,"show-label",e.showText),p(o,"is-disabled",e.disabled),p(o,"is-checked",u.value),p(o,"is-unchecked",!u.value),p(o,"is-loading",i.value),p(o,"".concat(n("primary")),"primary"===e.theme),o);return e.size&&!e.showText&&(r["".concat(n("switcher-".concat(e.size)))]=!0),r}));(0,c.watch)((function(){return e.modelValue}),(function(){var o;s.value=!0,e.withValidate&&(null===(o=null==t?void 0:t.validate)||void 0===o||o.call(t,"change"))})),(0,c.watch)((function(){return e.value}),(function(){s.value=!1}));var v=function(o){if(o.stopPropagation(),o.preventDefault(),!e.disabled&&!i.value){var t=u.value?e.falseValue:e.trueValue,n=!u.value,a=function(){r(m.UPDATE,t),r(m.CHANGE,n)},s=!0;if("function"==typeof e.beforeChange&&"function"==typeof(s=e.beforeChange(t)).then)return i.value=!0,s.then((function(){a()})).finally((function(){i.value=!1}));s&&a()}},T=function(e){"Enter"!==e.code&&"Enter"!==e.key&&13!==e.keyCode||v(e)};return function(){return(0,c.createVNode)("div",{class:y.value,onClick:v,tabindex:"0",onKeydown:T},[i.value?(0,c.createVNode)(d.SwitcherLoading,{class:"".concat(n("switcher-loading"))},null):"",e.showText?(0,c.createVNode)("span",{class:"switcher-text"},[u.value?e.onText:e.offText]):""])}}}),b=(0,a.withInstall)(h);var P=i.Z;export{P as default};
@@ -11,12 +11,12 @@
11
11
  background-color: transparent;
12
12
  }
13
13
  }
14
- .bk-fade-transtion .bk-fade-enter-active,
15
- .bk-fade-transtion .bk-fade-leave-active {
14
+ .bk-transition .bk-fade-enter-active,
15
+ .bk-transition .bk-fade-leave-active {
16
16
  transition: all 0.3s cubic-bezier(0.55, 0, 0.1, 1);
17
17
  }
18
- .bk-fade-transtion .bk-fade-enter,
19
- .bk-fade-transtion .bk-fade-leave-to {
18
+ .bk-transition .bk-fade-enter,
19
+ .bk-transition .bk-fade-leave-to {
20
20
  opacity: 0;
21
21
  }
22
22
  .clearfix-style::after {
@@ -1,5 +1,68 @@
1
+ import { ExtractPropTypes } from 'vue';
2
+ export declare const switcherType: {
3
+ theme: import("vue-types").VueTypeDef<"success" | "primary"> & {
4
+ default: "success" | "primary";
5
+ };
6
+ size: import("vue-types").VueTypeDef<"default" | "small" | "large">;
7
+ disabled: import("vue-types").VueTypeValidableDef<boolean> & {
8
+ default: boolean;
9
+ };
10
+ showText: import("vue-types").VueTypeValidableDef<boolean> & {
11
+ default: boolean;
12
+ };
13
+ isOutline: import("vue-types").VueTypeValidableDef<boolean> & {
14
+ default: boolean;
15
+ };
16
+ onText: import("vue-types").VueTypeValidableDef<string> & {
17
+ default: string;
18
+ } & {
19
+ default: string;
20
+ };
21
+ offText: import("vue-types").VueTypeValidableDef<string> & {
22
+ default: string;
23
+ } & {
24
+ default: string;
25
+ };
26
+ isSquare: import("vue-types").VueTypeValidableDef<boolean> & {
27
+ default: boolean;
28
+ };
29
+ extCls: import("vue-types").VueTypeValidableDef<string> & {
30
+ default: string;
31
+ };
32
+ beforeChange: import("vue-types").VueTypeValidableDef<(...args: any[]) => any> & {
33
+ default: (...args: any[]) => any;
34
+ } & {
35
+ default: (...args: any[]) => any;
36
+ };
37
+ trueValue: import("vue-types").VueTypeDef<string | number | boolean> & {
38
+ default: string | number | boolean;
39
+ };
40
+ falseValue: import("vue-types").VueTypeDef<string | number | boolean> & {
41
+ default: string | number | boolean;
42
+ };
43
+ value: import("vue-types").VueTypeDef<string | number | boolean> & {
44
+ default: string | number | boolean;
45
+ };
46
+ modelValue: import("vue-types").VueTypeDef<string | number | boolean> & {
47
+ default: string | number | boolean;
48
+ };
49
+ withValidate: import("vue-types").VueTypeValidableDef<boolean> & {
50
+ default: boolean;
51
+ } & {
52
+ default: boolean;
53
+ };
54
+ };
55
+ export declare const enum EVENTS {
56
+ UPDATE = "update:modelValue",
57
+ CHANGE = "change"
58
+ }
59
+ export type SwitcherType = ExtractPropTypes<typeof switcherType>;
60
+ declare function EventFunction(value: SwitcherType['modelValue']): string | number | boolean;
61
+ declare function ChangeFunction(value: boolean): boolean;
1
62
  declare const _default: import("vue").DefineComponent<{
2
- theme: import("vue-types").VueTypeDef<"success" | "warning" | "danger" | "primary">;
63
+ theme: import("vue-types").VueTypeDef<"success" | "primary"> & {
64
+ default: "success" | "primary";
65
+ };
3
66
  size: import("vue-types").VueTypeDef<"default" | "small" | "large">;
4
67
  disabled: import("vue-types").VueTypeValidableDef<boolean> & {
5
68
  default: boolean;
@@ -48,8 +111,13 @@ declare const _default: import("vue").DefineComponent<{
48
111
  } & {
49
112
  default: boolean;
50
113
  };
51
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
52
- theme: import("vue-types").VueTypeDef<"success" | "warning" | "danger" | "primary">;
114
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
115
+ "update:modelValue": typeof EventFunction;
116
+ change: typeof ChangeFunction;
117
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
118
+ theme: import("vue-types").VueTypeDef<"success" | "primary"> & {
119
+ default: "success" | "primary";
120
+ };
53
121
  size: import("vue-types").VueTypeDef<"default" | "small" | "large">;
54
122
  disabled: import("vue-types").VueTypeValidableDef<boolean> & {
55
123
  default: boolean;
@@ -99,11 +167,12 @@ declare const _default: import("vue").DefineComponent<{
99
167
  default: boolean;
100
168
  };
101
169
  }>> & {
102
- onChange?: (...args: any[]) => any;
103
- "onUpdate:modelValue"?: (...args: any[]) => any;
170
+ onChange?: (value: boolean) => any;
171
+ "onUpdate:modelValue"?: (value: string | number | boolean) => any;
104
172
  }, {
105
173
  extCls: string;
106
174
  disabled: boolean;
175
+ theme: "success" | "primary";
107
176
  value: string | number | boolean;
108
177
  modelValue: string | number | boolean;
109
178
  withValidate: boolean;
@@ -133,12 +133,12 @@
133
133
  background-color: transparent;
134
134
  }
135
135
  }
136
- .bk-fade-transtion .bk-fade-enter-active,
137
- .bk-fade-transtion .bk-fade-leave-active {
136
+ .bk-transition .bk-fade-enter-active,
137
+ .bk-transition .bk-fade-leave-active {
138
138
  transition: all 0.3s cubic-bezier(0.55, 0, 0.1, 1);
139
139
  }
140
- .bk-fade-transtion .bk-fade-enter,
141
- .bk-fade-transtion .bk-fade-leave-to {
140
+ .bk-transition .bk-fade-enter,
141
+ .bk-transition .bk-fade-leave-to {
142
142
  opacity: 0;
143
143
  }
144
144
  .clearfix-style::after {
@@ -28,8 +28,8 @@ declare const BkTab: {
28
28
  style?: unknown;
29
29
  onDrag?: (...args: any[]) => any;
30
30
  onChange?: (...args: any[]) => any;
31
- key?: string | number | symbol;
32
31
  ref?: import("vue").VNodeRef;
32
+ key?: string | number | symbol;
33
33
  ref_for?: boolean;
34
34
  ref_key?: string;
35
35
  onVnodeBeforeMount?: ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
@@ -469,8 +469,8 @@ declare const BkTab: {
469
469
  }>>, {
470
470
  name: string | number;
471
471
  label: string | ((...args: any[]) => any);
472
- disabled: boolean;
473
472
  visible: boolean;
473
+ disabled: boolean;
474
474
  tips: string;
475
475
  closable: boolean;
476
476
  renderDirective: "show" | "if";
@@ -478,5 +478,5 @@ declare const BkTab: {
478
478
  sortable: boolean;
479
479
  }, {}>;
480
480
  }>;
481
- export { BkTab, TabPanel as BkTabPanel, SortTypeEnum, PositionEnum, };
481
+ export { BkTab, TabPanel as BkTabPanel, SortTypeEnum, PositionEnum };
482
482
  export default BkTab;
package/lib/tab/index.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue-types"),require("vue"),require("../config-provider"),require("../directives"),require("../icon/"));else if("function"==typeof define&&define.amd)define(["../shared","vue-types","vue","../config-provider","../directives","../icon/"],t);else{var a="object"==typeof exports?t(require("../shared"),require("vue-types"),require("vue"),require("../config-provider"),require("../directives"),require("../icon/")):t(e["../shared"],e["vue-types"],e.vue,e["../config-provider"],e["../directives"],e["../icon/"]);for(var r in a)("object"==typeof exports?exports:e)[r]=a[r]}}(self,((e,t,a,r,o,n)=>(()=>{"use strict";var s={2717:e=>{e.exports=r},4061:e=>{e.exports=o},7685:e=>{e.exports=n},4212:t=>{t.exports=e},748:e=>{e.exports=a},210:e=>{e.exports=t}},i={};function l(e){var t=i[e];if(void 0!==t)return t.exports;var a=i[e]={exports:{}};return s[e](a,a.exports,l),a.exports}l.d=(e,t)=>{for(var a in t)l.o(t,a)&&!l.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return(()=>{l.r(c),l.d(c,{BkTab:()=>P,BkTabPanel:()=>T,PositionEnum:()=>t,SortTypeEnum:()=>o,default:()=>C});var e,t,a=l(4212),r=l(210);!function(e){e.CARD="card",e.BORDER_CARD="border-card",e.UNBORDER_CARD="unborder-card",e.CARD_TAB="card-tab",e.CARD_GRID="card-grid"}(e||(e={})),function(e){e.LEFT="left",e.RIGHT="right",e.TOP="top"}(t||(t={}));var o,n=(0,r.toType)("position",{}).def(t.TOP);!function(e){e.REPLACE="replace",e.INSERT="insert"}(o||(o={}));var s=(0,r.toType)("sortType",{}).def(o.REPLACE),i={tabAdd:{type:Function,default:function(){return{}}},tabChange:{type:Function,default:function(e){return e}},tabRemove:{type:Function,default:function(e){return e}},tabSort:{type:Function,default:function(){return{}}},tabDrag:{type:Function,default:function(){return{}}}},p={name:a.PropTypes.oneOfType([a.PropTypes.number,a.PropTypes.string]).def(""),label:a.PropTypes.string||a.PropTypes.func,tips:a.PropTypes.string,closable:a.PropTypes.bool,visible:a.PropTypes.bool.def(!0),disabled:a.PropTypes.bool,sortable:a.PropTypes.bool,renderDirective:(0,a.renderDirectiveType)(),panel:a.PropTypes.string||a.PropTypes.func},d={active:a.PropTypes.oneOfType([a.PropTypes.number,a.PropTypes.string]).def(""),type:(0,r.toType)("type",{}).def(e.BORDER_CARD),tabPosition:n,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:s,labelHeight:a.PropTypes.number.def(50),scrollStep:a.PropTypes.number.def(200),extCls:a.PropTypes.string.def(""),validateActive:a.PropTypes.bool.def(!0),showHeader:a.PropTypes.bool.def(!0),changeOnHover:a.PropTypes.bool.def(!1),changeOnHoverDelay:a.PropTypes.number.def(1e3),activeBarSize:a.PropTypes.number.def(2),activeBarColor:a.PropTypes.string.def("#3a84ff")},u=Object.assign({active:a.PropTypes.oneOfType([a.PropTypes.number,a.PropTypes.string]).def(""),type:(0,r.toType)("type",{}).def(e.BORDER_CARD),activeBarColor:a.PropTypes.string.def("#3a84ff"),activeBarSize:a.PropTypes.number.def(2),panels:{type:Array,default:function(){return[]}},tabPosition:n,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:s,labelHeight:a.PropTypes.number.def(50),scrollStep:a.PropTypes.number.def(200),validateActive:a.PropTypes.bool.def(!0),changeOnHover:a.PropTypes.bool.def(!1),changeOnHoverDelay:a.PropTypes.number.def(1e3)},i);function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=new Array(t);a<t;a++)r[a]=e[a];return r}var v=l(748),b=l(2717),h=l(4061),y=l(7685);const g=(0,v.defineComponent)({name:"TabNav",directives:{bkTooltips:h.bkTooltips},props:u,setup:function(a){var r=(0,v.ref)(null),o=(0,v.computed)((function(){var o={width:0,height:0,bottom:0,left:0};if(!r.value)return o;if([t.LEFT,t.RIGHT].includes(a.tabPosition)){var n=r.value,s=n.clientHeight,i=n.offsetTop,l={width:"".concat(a.activeBarSize,"px"),height:"".concat(s,"px"),top:"".concat(i,"px"),background:a.activeBarColor};return a.tabPosition===t.LEFT?l.right=0:l.left=0,l}if(a.type===e.UNBORDER_CARD){var c=r.value,p=c.clientWidth,d=c.offsetLeft;return{width:"".concat(p,"px"),height:"".concat(a.activeBarSize,"px"),left:"".concat(d,"px"),bottom:0,background:a.activeBarColor}}return o})),n=(0,v.computed)((function(){if(!Array.isArray(a.panels)||!a.panels.length)return[];var e=[],t=!1;return a.panels.filter((function(r,o){if(!r.props)return null;var n=r.props,s=n.name,i=n.label,l=n.closable,c=n.visible,p=n.disabled,d=n.sortable,u=n.tips;return!!c&&(a.active===s&&(t=!0),e.push({name:s,closable:l,visible:c,disabled:p,sortable:d,tips:u,tabLabel:function(e){return r.slots.label?(0,v.h)(r.slots.label):[void 0,""].includes(e)?"选项卡".concat(o+1):"string"==typeof e?e:"function"==typeof e?(0,v.h)(e):e}(i)}),!0)})),!t&&a.validateActive&&a.panels[0].props&&a.tabChange(a.panels[0].props.name),e})),s=(0,v.ref)(-1),i=(0,v.ref)(-1),l=(0,v.ref)(""),c=function(e,t){return e===t},p={handleTabAdd:function(e){a.tabAdd(e)},dragstart:function(e,t){i.value=e,l.value=a.guid,Object.assign(t.dataTransfer,{effectAllowed:"move"}),a.tabDrag(e,t)},dragenter:function(e){c(l.value,a.guid)&&(s.value=e)},dragend:function(){s.value=-1,i.value=-1,l.value=null},drop:function(e,t){if(!c(l.value,a.guid))return!1;a.tabSort(i.value,e,t)},handleTabChange:function(e){a.tabChange(e)},handleTabRemove:function(e,t){a.tabRemove(e,t)}},d=(0,b.usePrefix)().resolveClassName;return Object.assign(Object.assign({},p),{activeRef:r,activeBarStyle:o,navs:n,dragenterIndex:s,dragStartIndex:i,draggingEle:l,guid:Math.random().toString(16).substr(4)+Math.random().toString(16).substr(4),resolveClassName:d})},render:function(){var t,a,r,o=this,n=this.active,s=this.closable,i=this.addable,l=this.sortable,c=this.sortType,p=this.labelHeight,d=this.dragstart,u=this.dragenter,f=this.dragend,b=this.drop,h="function"==typeof this.$slots.setting?(0,v.createVNode)("div",{class:this.resolveClassName("tab-header-setting")},[this.$slots.setting()]):null,g=(r=[],"function"==typeof o.$slots.add?r.push(null===(a=(t=o.$slots).add)||void 0===a?void 0:a.call(t,v.h)):i&&r.push((0,v.createVNode)("div",{onClick:o.handleTabAdd},[(0,v.createVNode)(y.Plus,{style:"display:flex;",width:26,height:26},null)])),r.length?(0,v.createVNode)("div",{class:o.resolveClassName("tab-header-operation")},[r.map((function(e,t){return(0,v.createVNode)("div",{class:o.resolveClassName("tab-header-item"),key:t},[e])}))]):null);return(0,v.createVNode)("div",{style:{lineHeight:"".concat(p,"px")},class:this.resolveClassName("tab-header")},[(0,v.createVNode)("div",{class:[this.resolveClassName("tab-header-nav"),g||h?"tab-header-auto":""]},[o.type===e.UNBORDER_CARD?(0,v.createVNode)("div",{style:o.activeBarStyle,class:o.resolveClassName("tab-header-active-bar")},null):"",o.navs.map((function(e,t){if(!e)return null;var a,r=e.name,i=e.disabled,p=e.tabLabel,h=function(e,t){return!i&&(e||t)};return(0,v.withDirectives)((0,v.createVNode)("div",{key:r,onClick:function(){return!i&&o.handleTabChange(r)},draggable:h(e.sortable,l),onDragstart:function(e){return d(t,e)},ref:n===r?"activeRef":"",onDragenter:function(e){e.preventDefault(),u(t)},onDragleave:function(e){e.preventDefault()},onDragover:function(e){e.preventDefault()},onDragend:function(e){e.preventDefault(),f()},onDrop:function(e){e.preventDefault(),b(t,c)},class:(a=[o.resolveClassName("tab-header-item")],i&&a.push(o.resolveClassName("tab-header--disabled")),n===r&&a.push(o.resolveClassName("tab-header--active")),a.join(" "))},[(0,v.createVNode)("div",null,[p]),h(e.closable,s)?(0,v.createVNode)("span",{class:o.resolveClassName("tab-header--close"),onClick:function(){return o.handleTabRemove(t,e)}},[(0,v.createVNode)(y.Close,null,null)]):""]),[[(0,v.resolveDirective)("bk-tooltips"),{content:e.tips,disabled:!e.tips}]])}))]),g,h])}}),m=(0,v.defineComponent)({name:"Tab",components:{TabNav:g},props:d,emits:["add-panel","tab-change","remove-panel","sort-change","on-drag-tab","add","change","remove","update:active","sort","drag"],setup:function(e,t){var a=t.slots,r=t.emit,n=(0,v.ref)(!1),s=(0,v.ref)([]),i=(0,v.getCurrentInstance)(),l=function e(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(t.children||[]).forEach((function(t){var r=t.type;"TabPanel"===(r=r.name||r)&&t.component?a.push(t.component):r!==v.Fragment&&"template"!==r||e(t,a)})),a},c=function(){if(a.default){var e=i.subTree.children[1].children;if(!e)return;var t=e[0],r=l(t);r.length!==s.value.length&&(s.value=r)}};(0,v.onMounted)((function(){c(),n.value=!0,(0,v.onUpdated)((function(){c()}))}));var p={tabAdd:function(e){r("add",{e}),r("add-panel",{e})},tabChange:function(e){r("change",e),r("tab-change",e),r("update:active",e)},tabRemove:function(e,t){r("remove",e,t),r("remove-panel",e,t)},tabSort:function(e,t,a){var n,i=s.value;if(a===o.INSERT)if(e<t)i.splice(t+1,0,s[e]),i.splice(e,1);else{if(!(e>t))return!1;i.splice(t,0,s[e]),i.splice(e+1,1)}else{var l=i[t];i[t]=i[e],i[e]=l}s.value=function(e){if(Array.isArray(e))return f(e)}(n=i)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?f(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r("sort",e,t,a),r("sort-change",e,t,a)},tabDrag:function(e,t){r("drag",e,t),r("on-drag-tab",e,t)}},d=(0,b.usePrefix)().resolveClassName;return Object.assign(Object.assign({},p),{isMounted:n,panels:s,resolveClassName:d})},render:function(){var a,r,o,n,s,i=this;return(0,v.createVNode)("div",{class:(s=[i.resolveClassName("tab"),i.extCls],i.tabPosition===t.TOP?s.push(i.resolveClassName("tab--".concat(i.tabPosition)),i.resolveClassName("tab--".concat(i.type))):(s.push(i.resolveClassName("tab--".concat(i.tabPosition))),i.type===e.CARD_TAB&&s.push(i.resolveClassName("tab--vertical-tab"))),s)},[(o=i.panels,n={panels:o,active:i.active,type:i.type,closable:i.closable,addable:i.addable,sortable:i.sortable,sortType:i.sortType,labelHeight:i.labelHeight,scrollStep:i.scrollStep,validateActive:i.validateActive,changeOnHover:i.changeOnHover,changeOnHoverDelay:i.changeOnHoverDelay,tabPosition:i.tabPosition,activeBarSize:i.activeBarSize,activeBarColor:i.activeBarColor,tabAdd:i.tabAdd,tabChange:i.tabChange,tabRemove:i.tabRemove,tabSort:i.tabSort,tabDrag:i.tabDrag},o&&Array.isArray(o)?(0,v.createVNode)(g,n,i.$slots):null),(0,v.createVNode)("div",{class:this.resolveClassName("tab-content")},[null===(r=(a=this.$slots).default)||void 0===r?void 0:r.call(a)])])}}),T=(0,v.defineComponent)({name:"TabPanel",props:p,render:function(){var e=this,t=this.name===this.$parent.active,a=(0,b.usePrefix)().resolveClassName;return(0,v.withDirectives)((0,v.createVNode)("div",{ref:"content",class:a("tab-panel")},[!e.visible||"if"===e.renderDirective&&!t?null:"function"==typeof e.panel?e.panel(v.h):"function"==typeof e.$slots.default?e.$slots.default(null):"function"==typeof e.$slots.panel?e.$slots.panel(null):null]),[[v.vShow,t]])}});var P=(0,a.withInstallProps)(m,{TabPanel:T});const C=P})(),c})()));
1
+ import*as e from"../shared";import*as t from"vue-types";import*as a from"vue";import*as r from"../config-provider";import*as n from"../directives";import*as o from"../icon/";var s={d:(e,t)=>{for(var a in t)s.o(t,a)&&!s.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},l={};s.d(l,{ff:()=>B,yt:()=>S,Uj:()=>v,oY:()=>f,ZP:()=>w});const i=(c={PropTypes:()=>e.PropTypes,renderDirectiveType:()=>e.renderDirectiveType,withInstallProps:()=>e.withInstallProps},p={},s.d(p,c),p);var c,p;const d=(e=>{var t={};return s.d(t,e),t})({toType:()=>t.toType});var u,v;!function(e){e.CARD="card",e.BORDER_CARD="border-card",e.UNBORDER_CARD="unborder-card",e.CARD_TAB="card-tab",e.CARD_GRID="card-grid"}(u||(u={})),function(e){e.LEFT="left",e.RIGHT="right",e.TOP="top"}(v||(v={}));var f,b=(0,d.toType)("position",{}).def(v.TOP);!function(e){e.REPLACE="replace",e.INSERT="insert"}(f||(f={}));var h=(0,d.toType)("sortType",{}).def(f.REPLACE),y={tabAdd:{type:Function,default:function(){return{}}},tabChange:{type:Function,default:function(e){return e}},tabRemove:{type:Function,default:function(e){return e}},tabSort:{type:Function,default:function(){return{}}},tabDrag:{type:Function,default:function(){return{}}}},g={name:i.PropTypes.oneOfType([i.PropTypes.number,i.PropTypes.string]).def(""),label:i.PropTypes.string||i.PropTypes.func,tips:i.PropTypes.string,closable:i.PropTypes.bool,visible:i.PropTypes.bool.def(!0),disabled:i.PropTypes.bool,sortable:i.PropTypes.bool,renderDirective:(0,i.renderDirectiveType)(),panel:i.PropTypes.string||i.PropTypes.func},m={active:i.PropTypes.oneOfType([i.PropTypes.number,i.PropTypes.string]).def(""),type:(0,d.toType)("type",{}).def(u.BORDER_CARD),tabPosition:b,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:h,labelHeight:i.PropTypes.number.def(50),scrollStep:i.PropTypes.number.def(200),extCls:i.PropTypes.string.def(""),validateActive:i.PropTypes.bool.def(!0),showHeader:i.PropTypes.bool.def(!0),changeOnHover:i.PropTypes.bool.def(!1),changeOnHoverDelay:i.PropTypes.number.def(1e3),activeBarSize:i.PropTypes.number.def(2),activeBarColor:i.PropTypes.string.def("#3a84ff")},T=Object.assign({active:i.PropTypes.oneOfType([i.PropTypes.number,i.PropTypes.string]).def(""),type:(0,d.toType)("type",{}).def(u.BORDER_CARD),activeBarColor:i.PropTypes.string.def("#3a84ff"),activeBarSize:i.PropTypes.number.def(2),panels:{type:Array,default:function(){return[]}},tabPosition:b,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:h,labelHeight:i.PropTypes.number.def(50),scrollStep:i.PropTypes.number.def(200),validateActive:i.PropTypes.bool.def(!0),changeOnHover:i.PropTypes.bool.def(!1),changeOnHoverDelay:i.PropTypes.number.def(1e3)},y);function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=new Array(t);a<t;a++)r[a]=e[a];return r}const C=(e=>{var t={};return s.d(t,e),t})({Fragment:()=>a.Fragment,computed:()=>a.computed,createVNode:()=>a.createVNode,defineComponent:()=>a.defineComponent,getCurrentInstance:()=>a.getCurrentInstance,h:()=>a.h,onMounted:()=>a.onMounted,onUpdated:()=>a.onUpdated,ref:()=>a.ref,resolveDirective:()=>a.resolveDirective,vShow:()=>a.vShow,withDirectives:()=>a.withDirectives}),D=(e=>{var t={};return s.d(t,e),t})({usePrefix:()=>r.usePrefix}),N=(e=>{var t={};return s.d(t,e),t})({bkTooltips:()=>n.bkTooltips}),A=(e=>{var t={};return s.d(t,e),t})({Close:()=>o.Close,Plus:()=>o.Plus}),R=(0,C.defineComponent)({name:"TabNav",directives:{bkTooltips:N.bkTooltips},props:T,setup:function(e){var t=(0,C.ref)(null),a=(0,C.computed)((function(){var a={width:0,height:0,bottom:0,left:0};if(!t.value)return a;if([v.LEFT,v.RIGHT].includes(e.tabPosition)){var r=t.value,n=r.clientHeight,o=r.offsetTop,s={width:"".concat(e.activeBarSize,"px"),height:"".concat(n,"px"),top:"".concat(o,"px"),background:e.activeBarColor};return e.tabPosition===v.LEFT?s.right=0:s.left=0,s}if(e.type===u.UNBORDER_CARD){var l=t.value,i=l.clientWidth,c=l.offsetLeft;return{width:"".concat(i,"px"),height:"".concat(e.activeBarSize,"px"),left:"".concat(c,"px"),bottom:0,background:e.activeBarColor}}return a})),r=(0,C.computed)((function(){if(!Array.isArray(e.panels)||!e.panels.length)return[];var t=[],a=!1;return e.panels.filter((function(r,n){if(!r.props)return null;var o=r.props,s=o.name,l=o.label,i=o.closable,c=o.visible,p=o.disabled,d=o.sortable,u=o.tips;return!!c&&(e.active===s&&(a=!0),t.push({name:s,closable:i,visible:c,disabled:p,sortable:d,tips:u,tabLabel:function(e){return r.slots.label?(0,C.h)(r.slots.label):[void 0,""].includes(e)?"选项卡".concat(n+1):"string"==typeof e?e:"function"==typeof e?(0,C.h)(e):e}(l)}),!0)})),!a&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),t})),n=(0,C.ref)(-1),o=(0,C.ref)(-1),s=(0,C.ref)(""),l=function(e,t){return e===t},i={handleTabAdd:function(t){e.tabAdd(t)},dragstart:function(t,a){o.value=t,s.value=e.guid,Object.assign(a.dataTransfer,{effectAllowed:"move"}),e.tabDrag(t,a)},dragenter:function(t){l(s.value,e.guid)&&(n.value=t)},dragend:function(){n.value=-1,o.value=-1,s.value=null},drop:function(t,a){if(!l(s.value,e.guid))return!1;e.tabSort(o.value,t,a)},handleTabChange:function(t){e.tabChange(t)},handleTabRemove:function(t,a){e.tabRemove(t,a)}},c=(0,D.usePrefix)().resolveClassName;return Object.assign(Object.assign({},i),{activeRef:t,activeBarStyle:a,navs:r,dragenterIndex:n,dragStartIndex:o,draggingEle:s,guid:Math.random().toString(16).substr(4)+Math.random().toString(16).substr(4),resolveClassName:c})},render:function(){var e,t,a,r=this,n=this.active,o=this.closable,s=this.addable,l=this.sortable,i=this.sortType,c=this.labelHeight,p=this.dragstart,d=this.dragenter,v=this.dragend,f=this.drop,b="function"==typeof this.$slots.setting?(0,C.createVNode)("div",{class:this.resolveClassName("tab-header-setting")},[this.$slots.setting()]):null,h=(a=[],"function"==typeof r.$slots.add?a.push(null===(t=(e=r.$slots).add)||void 0===t?void 0:t.call(e,C.h)):s&&a.push((0,C.createVNode)("div",{onClick:r.handleTabAdd},[(0,C.createVNode)(A.Plus,{style:"display:flex;",width:26,height:26},null)])),a.length?(0,C.createVNode)("div",{class:r.resolveClassName("tab-header-operation")},[a.map((function(e,t){return(0,C.createVNode)("div",{class:r.resolveClassName("tab-header-item"),key:t},[e])}))]):null);return(0,C.createVNode)("div",{style:{lineHeight:"".concat(c,"px")},class:this.resolveClassName("tab-header")},[(0,C.createVNode)("div",{class:[this.resolveClassName("tab-header-nav"),h||b?"tab-header-auto":""]},[r.type===u.UNBORDER_CARD?(0,C.createVNode)("div",{style:r.activeBarStyle,class:r.resolveClassName("tab-header-active-bar")},null):"",r.navs.map((function(e,t){if(!e)return null;var a,s=e.name,c=e.disabled,u=e.tabLabel,b=function(e,t){return!c&&(e||t)};return(0,C.withDirectives)((0,C.createVNode)("div",{key:s,onClick:function(){return!c&&r.handleTabChange(s)},draggable:b(e.sortable,l),onDragstart:function(e){return p(t,e)},ref:n===s?"activeRef":"",onDragenter:function(e){e.preventDefault(),d(t)},onDragleave:function(e){e.preventDefault()},onDragover:function(e){e.preventDefault()},onDragend:function(e){e.preventDefault(),v()},onDrop:function(e){e.preventDefault(),f(t,i)},class:(a=[r.resolveClassName("tab-header-item")],c&&a.push(r.resolveClassName("tab-header--disabled")),n===s&&a.push(r.resolveClassName("tab-header--active")),a.join(" "))},[(0,C.createVNode)("div",null,[u]),b(e.closable,o)?(0,C.createVNode)("span",{class:r.resolveClassName("tab-header--close"),onClick:function(){return r.handleTabRemove(t,e)}},[(0,C.createVNode)(A.Close,null,null)]):""]),[[(0,C.resolveDirective)("bk-tooltips"),{content:e.tips,disabled:!e.tips}]])}))]),h,b])}}),O=(0,C.defineComponent)({name:"Tab",components:{TabNav:R},props:m,emits:["add-panel","tab-change","remove-panel","sort-change","on-drag-tab","add","change","remove","update:active","sort","drag"],setup:function(e,t){var a=t.slots,r=t.emit,n=(0,C.ref)(!1),o=(0,C.ref)([]),s=(0,C.getCurrentInstance)(),l=function e(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(t.children||[]).forEach((function(t){var r=t.type;"TabPanel"===(r=r.name||r)&&t.component?a.push(t.component):r!==C.Fragment&&"template"!==r||e(t,a)})),a},i=function(){if(a.default){var e=s.subTree.children[1].children;if(!e)return;var t=e[0],r=l(t);r.length!==o.value.length&&(o.value=r)}};(0,C.onMounted)((function(){i(),n.value=!0,(0,C.onUpdated)((function(){i()}))}));var c={tabAdd:function(e){r("add",{e}),r("add-panel",{e})},tabChange:function(e){r("change",e),r("tab-change",e),r("update:active",e)},tabRemove:function(e,t){r("remove",e,t),r("remove-panel",e,t)},tabSort:function(e,t,a){var n,s=o.value;if(a===f.INSERT)if(e<t)s.splice(t+1,0,o[e]),s.splice(e,1);else{if(!(e>t))return!1;s.splice(t,0,o[e]),s.splice(e+1,1)}else{var l=s[t];s[t]=s[e],s[e]=l}o.value=function(e){if(Array.isArray(e))return P(e)}(n=s)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return P(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?P(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r("sort",e,t,a),r("sort-change",e,t,a)},tabDrag:function(e,t){r("drag",e,t),r("on-drag-tab",e,t)}},p=(0,D.usePrefix)().resolveClassName;return Object.assign(Object.assign({},c),{isMounted:n,panels:o,resolveClassName:p})},render:function(){var e,t,a,r,n,o=this;return(0,C.createVNode)("div",{class:(n=[o.resolveClassName("tab"),o.extCls],o.tabPosition===v.TOP?n.push(o.resolveClassName("tab--".concat(o.tabPosition)),o.resolveClassName("tab--".concat(o.type))):(n.push(o.resolveClassName("tab--".concat(o.tabPosition))),o.type===u.CARD_TAB&&n.push(o.resolveClassName("tab--vertical-tab"))),n)},[(a=o.panels,r={panels:a,active:o.active,type:o.type,closable:o.closable,addable:o.addable,sortable:o.sortable,sortType:o.sortType,labelHeight:o.labelHeight,scrollStep:o.scrollStep,validateActive:o.validateActive,changeOnHover:o.changeOnHover,changeOnHoverDelay:o.changeOnHoverDelay,tabPosition:o.tabPosition,activeBarSize:o.activeBarSize,activeBarColor:o.activeBarColor,tabAdd:o.tabAdd,tabChange:o.tabChange,tabRemove:o.tabRemove,tabSort:o.tabSort,tabDrag:o.tabDrag},a&&Array.isArray(a)?(0,C.createVNode)(R,r,o.$slots):null),(0,C.createVNode)("div",{class:this.resolveClassName("tab-content")},[null===(t=(e=this.$slots).default)||void 0===t?void 0:t.call(e)])])}}),S=(0,C.defineComponent)({name:"TabPanel",props:g,render:function(){var e=this,t=this.name===this.$parent.active,a=(0,D.usePrefix)().resolveClassName;return(0,C.withDirectives)((0,C.createVNode)("div",{ref:"content",class:a("tab-panel")},[!e.visible||"if"===e.renderDirective&&!t?null:"function"==typeof e.panel?e.panel(C.h):"function"==typeof e.$slots.default?e.$slots.default(null):"function"==typeof e.$slots.panel?e.$slots.panel(null):null]),[[C.vShow,t]])}});var B=(0,i.withInstallProps)(O,{TabPanel:S});const w=B;var E=l.ff,x=l.yt,H=l.Uj,V=l.oY,I=l.ZP;export{E as BkTab,x as BkTabPanel,H as PositionEnum,V as SortTypeEnum,I as default};
@@ -40,7 +40,12 @@ declare const _default: import("vue").DefineComponent<{
40
40
  type: import("vue").PropType<import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
41
41
  [key: string]: any;
42
42
  }>[]>;
43
- default: () => any[];
43
+ default: () => any[]; /**
44
+ * @description 判断拖动的元素是否是在同一个tab。
45
+ * 使用guid,相比 el1.parentNode === el2.parentNode 判断,性能要高
46
+ * @param e {event} 触发的元素
47
+ * @return {boolean}
48
+ */
44
49
  };
45
50
  tabPosition: import("vue-types").VueTypeDef<"top" | "right" | "left"> & {
46
51
  default: "top" | "right" | "left";
@@ -139,7 +144,12 @@ declare const _default: import("vue").DefineComponent<{
139
144
  type: import("vue").PropType<import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
140
145
  [key: string]: any;
141
146
  }>[]>;
142
- default: () => any[];
147
+ default: () => any[]; /**
148
+ * @description 判断拖动的元素是否是在同一个tab。
149
+ * 使用guid,相比 el1.parentNode === el2.parentNode 判断,性能要高
150
+ * @param e {event} 触发的元素
151
+ * @return {boolean}
152
+ */
143
153
  };
144
154
  tabPosition: import("vue-types").VueTypeDef<"top" | "right" | "left"> & {
145
155
  default: "top" | "right" | "left";
@@ -69,8 +69,8 @@ declare const _default: import("vue").DefineComponent<{
69
69
  }>>, {
70
70
  name: string | number;
71
71
  label: string | ((...args: any[]) => any);
72
- disabled: boolean;
73
72
  visible: boolean;
73
+ disabled: boolean;
74
74
  tips: string;
75
75
  closable: boolean;
76
76
  renderDirective: "show" | "if";
@@ -1,14 +1,9 @@
1
- import { IOverflowTooltip } from '../props';
2
1
  declare const _default: import("vue").DefineComponent<{
3
- column: import("vue-types").VueTypeValidableDef<any> & {
4
- default: any;
5
- };
2
+ column: import("vue-types").VueTypeDef<import("../props").Column>;
6
3
  row: import("vue-types").VueTypeValidableDef<any> & {
7
4
  default: any;
8
5
  };
9
- parentSetting: import("vue-types").VueTypeDef<boolean | IOverflowTooltip> & {
10
- default: boolean | (() => IOverflowTooltip);
11
- };
6
+ parentSetting: import("vue-types").VueTypeDef<import("../props").IOverflowTooltipProp>;
12
7
  title: import("vue-types").VueTypeValidableDef<string> & {
13
8
  default: string;
14
9
  } & {
@@ -19,17 +14,21 @@ declare const _default: import("vue").DefineComponent<{
19
14
  } & {
20
15
  default: boolean;
21
16
  };
17
+ isHead: import("vue-types").VueTypeValidableDef<boolean> & {
18
+ default: boolean;
19
+ } & {
20
+ default: boolean;
21
+ };
22
+ headExplain: import("vue-types").VueTypeValidableDef<string> & {
23
+ default: string;
24
+ };
22
25
  resizerWay: import("vue-types").VueTypeDef<"debounce" | "throttle">;
23
26
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
24
- column: import("vue-types").VueTypeValidableDef<any> & {
25
- default: any;
26
- };
27
+ column: import("vue-types").VueTypeDef<import("../props").Column>;
27
28
  row: import("vue-types").VueTypeValidableDef<any> & {
28
29
  default: any;
29
30
  };
30
- parentSetting: import("vue-types").VueTypeDef<boolean | IOverflowTooltip> & {
31
- default: boolean | (() => IOverflowTooltip);
32
- };
31
+ parentSetting: import("vue-types").VueTypeDef<import("../props").IOverflowTooltipProp>;
33
32
  title: import("vue-types").VueTypeValidableDef<string> & {
34
33
  default: string;
35
34
  } & {
@@ -40,12 +39,20 @@ declare const _default: import("vue").DefineComponent<{
40
39
  } & {
41
40
  default: boolean;
42
41
  };
42
+ isHead: import("vue-types").VueTypeValidableDef<boolean> & {
43
+ default: boolean;
44
+ } & {
45
+ default: boolean;
46
+ };
47
+ headExplain: import("vue-types").VueTypeValidableDef<string> & {
48
+ default: string;
49
+ };
43
50
  resizerWay: import("vue-types").VueTypeDef<"debounce" | "throttle">;
44
51
  }>>, {
45
52
  title: string;
46
- column: any;
47
53
  row: any;
48
54
  observerResize: boolean;
49
- parentSetting: boolean | IOverflowTooltip;
55
+ isHead: boolean;
56
+ headExplain: string;
50
57
  }, {}>;
51
58
  export default _default;