bkui-vue 0.0.2-beta.9 → 0.0.2-table-refactor.2

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 (249) hide show
  1. package/dist/index.cjs.js +69 -61
  2. package/dist/index.esm.js +15945 -15487
  3. package/dist/index.umd.js +69 -61
  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/alert/alert.css +7 -0
  17. package/lib/alert/alert.d.ts +5 -5
  18. package/lib/alert/alert.less +16 -6
  19. package/lib/alert/alert.variable.css +7 -0
  20. package/lib/alert/index.d.ts +10 -10
  21. package/lib/animate-number/index.d.ts +1 -1
  22. package/lib/backtop/index.d.ts +1 -1
  23. package/lib/badge/badge.d.ts +2 -2
  24. package/lib/badge/index.d.ts +7 -7
  25. package/lib/breadcrumb/index.d.ts +2 -2
  26. package/lib/button/button.css +20 -0
  27. package/lib/button/button.less +105 -94
  28. package/lib/button/button.variable.css +20 -0
  29. package/lib/button/index.d.ts +2 -2
  30. package/lib/card/card.d.ts +1 -1
  31. package/lib/card/index.d.ts +4 -4
  32. package/lib/cascader/cascader.d.ts +1 -0
  33. package/lib/cascader/index.d.ts +5 -2
  34. package/lib/cascader/index.js +1 -1
  35. package/lib/cascader/interface.d.ts +1 -1
  36. package/lib/checkbox/checkbox-group.d.ts +6 -3
  37. package/lib/checkbox/checkbox.d.ts +4 -4
  38. package/lib/checkbox/index.d.ts +22 -19
  39. package/lib/checkbox/index.js +1 -1
  40. package/lib/code-diff/index.d.ts +1 -1
  41. package/lib/collapse/index.d.ts +2 -2
  42. package/lib/collapse-transition/index.d.ts +128 -2
  43. package/lib/collapse-transition/index.js +1 -1
  44. package/lib/color-picker/color-picker.d.ts +16 -0
  45. package/lib/color-picker/components/recommend-colors.d.ts +16 -0
  46. package/lib/color-picker/index.d.ts +19 -1
  47. package/lib/color-picker/index.js +1 -1
  48. package/lib/config-provider/config-provider.d.ts +3 -0
  49. package/lib/config-provider/index.d.ts +5 -1
  50. package/lib/config-provider/index.js +1 -1
  51. package/lib/config-provider/token.d.ts +1 -0
  52. package/lib/config-provider/use-global-config.d.ts +2 -0
  53. package/lib/config-provider/use-prefix.d.ts +2 -0
  54. package/lib/container/index.d.ts +2 -2
  55. package/lib/date-picker/date-picker.d.ts +3 -1
  56. package/lib/date-picker/index.d.ts +12 -5
  57. package/lib/date-picker/index.js +1 -1
  58. package/lib/date-picker/panel/date-range.d.ts +2 -1
  59. package/lib/dialog/dialog.css +2 -0
  60. package/lib/dialog/dialog.variable.css +2 -0
  61. package/lib/dialog/index.d.ts +1 -1
  62. package/lib/directives/index.js +1 -1
  63. package/lib/directives/tooltips.d.ts +3 -2
  64. package/lib/divider/index.d.ts +1 -1
  65. package/lib/dropdown/dropdown.css +1 -0
  66. package/lib/dropdown/dropdown.variable.css +1 -0
  67. package/lib/dropdown/index.d.ts +2 -2
  68. package/lib/exception/index.d.ts +2 -2
  69. package/lib/fixed-navbar/index.d.ts +1 -1
  70. package/lib/form/index.d.ts +3 -3
  71. package/lib/form/index.js +1 -1
  72. package/lib/hooks.d.ts +1 -1
  73. package/lib/hooks.js +1 -1
  74. package/lib/icon/assistant.d.ts +4 -0
  75. package/lib/icon/assistant.js +1 -0
  76. package/lib/icon/index.d.ts +1 -0
  77. package/lib/icon/index.js +1 -1
  78. package/lib/image/index.d.ts +1 -1
  79. package/lib/image/index.js +1 -1
  80. package/lib/info-box/index.js +1 -1
  81. package/lib/info-box/info-box.css +2 -0
  82. package/lib/info-box/info-box.less +2 -1
  83. package/lib/info-box/info-box.variable.css +2 -0
  84. package/lib/input/index.d.ts +146 -50
  85. package/lib/input/index.js +2 -1
  86. package/lib/input/index.js.LICENSE.txt +1 -0
  87. package/lib/input/input.css +34 -6
  88. package/lib/input/input.d.ts +100 -11
  89. package/lib/input/input.less +53 -14
  90. package/lib/input/input.variable.css +34 -6
  91. package/lib/input/util.d.ts +6 -0
  92. package/lib/link/index.d.ts +4 -4
  93. package/lib/link/link.d.ts +1 -1
  94. package/lib/loading/index.d.ts +2 -2
  95. package/lib/locale/index.js +1 -1
  96. package/lib/locale/lang/en.d.ts +1 -0
  97. package/lib/menu/index.d.ts +2 -2
  98. package/lib/message/index.js +1 -1
  99. package/lib/message/message.css +33 -9
  100. package/lib/message/message.less +78 -54
  101. package/lib/message/message.variable.css +33 -9
  102. package/lib/message/messageConstructor.d.ts +25 -4
  103. package/lib/modal/index.d.ts +2 -2
  104. package/lib/modal/index.js +1 -1
  105. package/lib/modal/modal.css +2 -0
  106. package/lib/modal/modal.variable.css +2 -0
  107. package/lib/navigation/index.d.ts +4 -1
  108. package/lib/navigation/index.js +1 -1
  109. package/lib/navigation/navigation.d.ts +1 -0
  110. package/lib/notify/index.js +1 -1
  111. package/lib/notify/notifyConstructor.d.ts +1 -1
  112. package/lib/overflow-title/components/overflow-title.d.ts +257 -1
  113. package/lib/overflow-title/index.d.ts +387 -2
  114. package/lib/overflow-title/index.js +1 -1
  115. package/lib/overflow-title/props.d.ts +129 -0
  116. package/lib/pagination/index.d.ts +2 -2
  117. package/lib/plugin-popover/index.js +1 -1
  118. package/lib/pop-confirm/index.d.ts +1 -1
  119. package/lib/popover/content.d.ts +33 -0
  120. package/lib/popover/index.d.ts +74 -16
  121. package/lib/popover/index.js +1 -1
  122. package/lib/popover/popover.css +1 -0
  123. package/lib/popover/popover.d.ts +40 -7
  124. package/lib/popover/popover.less +3 -2
  125. package/lib/popover/popover.variable.css +1 -0
  126. package/lib/popover/props.d.ts +25 -2
  127. package/lib/popover/use-floating.d.ts +1 -1
  128. package/lib/popover/use-popover-init.d.ts +2 -1
  129. package/lib/popover2/index.d.ts +1 -1
  130. package/lib/preset.d.ts +2 -0
  131. package/lib/process/index.d.ts +1 -1
  132. package/lib/progress/index.d.ts +1 -1
  133. package/lib/radio/index.d.ts +23 -23
  134. package/lib/radio/radio-button.d.ts +4 -4
  135. package/lib/radio/radio-group.d.ts +4 -4
  136. package/lib/radio/radio.d.ts +4 -4
  137. package/lib/rate/index.d.ts +8 -4
  138. package/lib/rate/index.js +1 -1
  139. package/lib/rate/rate.d.ts +2 -1
  140. package/lib/resize-layout/index.d.ts +4 -4
  141. package/lib/resize-layout/index.js +1 -1
  142. package/lib/resize-layout/resize-layout.css +12 -0
  143. package/lib/resize-layout/resize-layout.d.ts +1 -1
  144. package/lib/resize-layout/resize-layout.less +12 -0
  145. package/lib/resize-layout/resize-layout.variable.css +12 -0
  146. package/lib/search-select/index.d.ts +62 -29
  147. package/lib/search-select/index.js +1 -1
  148. package/lib/search-select/input.d.ts +5 -1
  149. package/lib/search-select/menu.d.ts +33 -2
  150. package/lib/search-select/search-select.css +31 -11
  151. package/lib/search-select/search-select.d.ts +23 -20
  152. package/lib/search-select/search-select.less +29 -10
  153. package/lib/search-select/search-select.variable.css +31 -11
  154. package/lib/search-select/selected.d.ts +5 -1
  155. package/lib/search-select/utils.d.ts +13 -5
  156. package/lib/select/common.d.ts +1 -0
  157. package/lib/select/index.d.ts +203 -72
  158. package/lib/select/index.js +1 -1
  159. package/lib/select/option.d.ts +11 -0
  160. package/lib/select/select.css +9 -1
  161. package/lib/select/select.d.ts +86 -31
  162. package/lib/select/select.less +11 -1
  163. package/lib/select/select.variable.css +9 -1
  164. package/lib/select/selectTagInput.d.ts +8 -5
  165. package/lib/shared/helper.d.ts +1 -1
  166. package/lib/shared/index.js +1 -1
  167. package/lib/shared/mask-manager.d.ts +3 -4
  168. package/lib/shared/pop-manager.d.ts +6 -2
  169. package/lib/shared/popover.d.ts +2 -2
  170. package/lib/shared/vue-types.d.ts +3 -2
  171. package/lib/sideslider/index.d.ts +1 -1
  172. package/lib/slider/index.d.ts +1 -1
  173. package/lib/slider/index.js +1 -1
  174. package/lib/steps/index.d.ts +1 -1
  175. package/lib/steps/index.js +1 -1
  176. package/lib/styles/mixins/clearfix.css +8 -0
  177. package/lib/styles/mixins/clearfix.less +10 -0
  178. package/lib/styles/mixins/clearfix.variable.css +8 -0
  179. package/lib/styles/mixins/mixins.css +72 -0
  180. package/lib/styles/mixins/mixins.less +5 -0
  181. package/lib/styles/mixins/mixins.variable.css +72 -0
  182. package/lib/styles/mixins/popper.less +6 -5
  183. package/lib/swiper/index.d.ts +1 -1
  184. package/lib/swiper/index.js +1 -1
  185. package/lib/swiper/swiper.css +0 -6
  186. package/lib/swiper/swiper.less +0 -8
  187. package/lib/swiper/swiper.variable.css +0 -6
  188. package/lib/switcher/index.d.ts +30 -16
  189. package/lib/switcher/index.js +1 -1
  190. package/lib/switcher/switcher.d.ts +74 -5
  191. package/lib/tab/index.d.ts +3 -3
  192. package/lib/tab/tab-nav.d.ts +12 -2
  193. package/lib/tab/tab-panel.d.ts +1 -1
  194. package/lib/table/components/table-cell.d.ts +22 -24
  195. package/lib/table/components/table-column.d.ts +123 -81
  196. package/lib/table/const.d.ts +18 -2
  197. package/lib/table/events.d.ts +26 -26
  198. package/lib/table/index.d.ts +279 -294
  199. package/lib/table/index.js +1 -1
  200. package/lib/table/plugins/head-filter.css +3 -0
  201. package/lib/table/plugins/head-filter.less +3 -0
  202. package/lib/table/plugins/head-filter.variable.css +3 -0
  203. package/lib/table/plugins/settings.d.ts +7 -17
  204. package/lib/table/plugins/use-column-resize.d.ts +30 -10
  205. package/lib/table/plugins/use-fixed-column.d.ts +6 -5
  206. package/lib/table/plugins/use-pagination.d.ts +7 -4
  207. package/lib/table/props.d.ts +117 -58
  208. package/lib/table/render.d.ts +7 -17
  209. package/lib/table/table.css +79 -10
  210. package/lib/table/table.d.ts +95 -72
  211. package/lib/table/table.less +55 -20
  212. package/lib/table/table.variable.css +79 -10
  213. package/lib/table/use-attributes.d.ts +55 -0
  214. package/lib/table/use-column.d.ts +175 -49
  215. package/lib/table/use-common.d.ts +1608 -88
  216. package/lib/table/use-render.d.ts +11 -0
  217. package/lib/table/utils.d.ts +30 -29
  218. package/lib/table-column/index.d.ts +235 -405
  219. package/lib/table-column/index.js +1 -1
  220. package/lib/tag/index.d.ts +10 -10
  221. package/lib/tag/index.js +1 -1
  222. package/lib/tag/tag.d.ts +5 -5
  223. package/lib/tag-input/index.d.ts +49 -7
  224. package/lib/tag-input/index.js +1 -1
  225. package/lib/tag-input/tag-input.css +9 -1
  226. package/lib/tag-input/tag-input.d.ts +46 -6
  227. package/lib/tag-input/tag-input.less +13 -4
  228. package/lib/tag-input/tag-input.variable.css +9 -1
  229. package/lib/tag-input/tag-props.d.ts +16 -2
  230. package/lib/time-picker/index.d.ts +1 -1
  231. package/lib/timeline/index.d.ts +1 -1
  232. package/lib/transfer/index.d.ts +1 -1
  233. package/lib/tree/constant.d.ts +2 -2
  234. package/lib/tree/index.d.ts +37 -7
  235. package/lib/tree/index.js +1 -1
  236. package/lib/tree/props.d.ts +8 -1
  237. package/lib/tree/tree.d.ts +20 -2
  238. package/lib/tree/use-node-action.d.ts +3 -2
  239. package/lib/tree/use-node-attribute.d.ts +15 -8
  240. package/lib/tree/use-tree-init.d.ts +1 -2
  241. package/lib/tree/util.d.ts +7 -2
  242. package/lib/upload/index.d.ts +1 -1
  243. package/lib/virtual-render/index.d.ts +43 -1
  244. package/lib/virtual-render/index.js +1 -1
  245. package/lib/virtual-render/props.d.ts +15 -0
  246. package/lib/virtual-render/v-virtual-render.d.ts +1 -0
  247. package/lib/virtual-render/virtual-render.d.ts +27 -2
  248. package/lib/volar.components.d.ts +24 -24
  249. package/package.json +17 -16
@@ -300,6 +300,11 @@
300
300
  border-color: #5594fa;
301
301
  color: white;
302
302
  }
303
+ .bk-button.bk-button-primary.is-outline:active {
304
+ background-color: #2c77f4;
305
+ border-color: #2c77f4;
306
+ color: white;
307
+ }
303
308
  .bk-button.bk-button-primary.is-text {
304
309
  color: #3a84ff;
305
310
  background-color: transparent;
@@ -346,6 +351,11 @@
346
351
  border-color: #ffb848;
347
352
  color: white;
348
353
  }
354
+ .bk-button.bk-button-warning.is-outline:active {
355
+ background-color: #eb9000;
356
+ border-color: #eb9000;
357
+ color: white;
358
+ }
349
359
  .bk-button.bk-button-warning.is-text {
350
360
  color: #ff9c01;
351
361
  background-color: transparent;
@@ -392,6 +402,11 @@
392
402
  border-color: #45e35f;
393
403
  color: white;
394
404
  }
405
+ .bk-button.bk-button-success.is-outline:active {
406
+ background-color: #1ab943;
407
+ border-color: #1ab943;
408
+ color: white;
409
+ }
395
410
  .bk-button.bk-button-success.is-text {
396
411
  color: #2dcb56;
397
412
  background-color: transparent;
@@ -438,6 +453,11 @@
438
453
  border-color: #ff5656;
439
454
  color: white;
440
455
  }
456
+ .bk-button.bk-button-danger.is-outline:active {
457
+ background-color: #db2626;
458
+ border-color: #db2626;
459
+ color: white;
460
+ }
441
461
  .bk-button.bk-button-danger.is-text {
442
462
  color: #ea3636;
443
463
  background-color: transparent;
@@ -832,6 +852,7 @@
832
852
  }
833
853
  .bk-popover.bk-pop2-content .bk-pop2-arrow {
834
854
  position: absolute;
855
+ z-index: -1;
835
856
  width: 8px;
836
857
  height: 8px;
837
858
  background: #333;
@@ -854,6 +875,9 @@
854
875
  cursor: pointer;
855
876
  align-items: center;
856
877
  }
878
+ .bk-table-head-action:last-of-type {
879
+ margin-right: -10px;
880
+ }
857
881
  .bk-table-head-action.active {
858
882
  color: #3a84ff;
859
883
  }
@@ -1107,6 +1131,15 @@
1107
1131
  height: auto;
1108
1132
  overflow: hidden;
1109
1133
  }
1134
+ .bk-table-flex {
1135
+ display: flex;
1136
+ flex-direction: column;
1137
+ max-height: 100%;
1138
+ }
1139
+ .bk-table-flex .bk-table-body {
1140
+ flex: 1;
1141
+ overflow: auto;
1142
+ }
1110
1143
  .bk-table.has-scroll-y .bk-table-head {
1111
1144
  padding-right: 4px;
1112
1145
  }
@@ -1115,7 +1148,7 @@
1115
1148
  overflow: auto;
1116
1149
  }
1117
1150
  .bk-table .bk-table-body::-webkit-scrollbar {
1118
- width: 6px;
1151
+ width: 5px;
1119
1152
  height: 6px;
1120
1153
  }
1121
1154
  .bk-table .bk-table-body::-webkit-scrollbar-thumb {
@@ -1150,8 +1183,8 @@
1150
1183
  }
1151
1184
  .bk-table .bk-table-head::-webkit-scrollbar,
1152
1185
  .bk-table .bk-table-body::-webkit-scrollbar {
1153
- width: 4px;
1154
- height: 4px;
1186
+ width: 5px;
1187
+ height: 5px;
1155
1188
  }
1156
1189
  .bk-table .bk-table-head::-webkit-scrollbar-thumb,
1157
1190
  .bk-table .bk-table-body::-webkit-scrollbar-thumb {
@@ -1188,7 +1221,6 @@
1188
1221
  height: var(--row-height);
1189
1222
  min-width: 30px;
1190
1223
  clear: both;
1191
- background-color: #fff;
1192
1224
  }
1193
1225
  .bk-table .bk-table-head table th.expand-row .expand-btn-action,
1194
1226
  .bk-table .bk-table-body table th.expand-row .expand-btn-action,
@@ -1213,6 +1245,13 @@
1213
1245
  .bk-table .bk-table-body table td .cell.has-sort {
1214
1246
  cursor: pointer;
1215
1247
  }
1248
+ .bk-table .bk-table-head table th .cell.explain,
1249
+ .bk-table .bk-table-body table th .cell.explain,
1250
+ .bk-table .bk-table-head table td .cell.explain,
1251
+ .bk-table .bk-table-body table td .cell.explain {
1252
+ text-decoration-style: dashed;
1253
+ text-decoration-line: underline;
1254
+ }
1216
1255
  .bk-table .bk-table-head table th .cell .head-text,
1217
1256
  .bk-table .bk-table-body table th .cell .head-text,
1218
1257
  .bk-table .bk-table-head table td .cell .head-text,
@@ -1303,6 +1342,21 @@
1303
1342
  .bk-table .bk-table-head table thead th,
1304
1343
  .bk-table .bk-table-body table thead th {
1305
1344
  font-weight: 400;
1345
+ background-color: var(--background-color);
1346
+ position: relative;
1347
+ }
1348
+ .bk-table .bk-table-head table thead th.col-resize-hover::after,
1349
+ .bk-table .bk-table-body table thead th.col-resize-hover::after {
1350
+ content: '';
1351
+ position: absolute;
1352
+ right: 0;
1353
+ top: 0;
1354
+ bottom: 0;
1355
+ width: 6px;
1356
+ transform: translateX(50%);
1357
+ background-color: #3785FF;
1358
+ z-index: 1;
1359
+ pointer-events: none;
1306
1360
  }
1307
1361
  .bk-table .bk-table-head table thead th .cell,
1308
1362
  .bk-table .bk-table-body table thead th .cell {
@@ -1316,11 +1370,16 @@
1316
1370
  .bk-table .bk-table-head table thead th:hover,
1317
1371
  .bk-table .bk-table-body table thead th:hover {
1318
1372
  background: #f0f1f5;
1373
+ cursor: pointer;
1319
1374
  }
1320
1375
  .bk-table .bk-table-head table thead th.column_fixed,
1321
1376
  .bk-table .bk-table-body table thead th.column_fixed {
1322
1377
  transform: translateX(var(--scroll-left));
1323
1378
  }
1379
+ .bk-table .bk-table-head table tbody tr td,
1380
+ .bk-table .bk-table-body table tbody tr td {
1381
+ background-color: #fff;
1382
+ }
1324
1383
  .bk-table .bk-table-head table tbody tr td.empty-cell,
1325
1384
  .bk-table .bk-table-body table tbody tr td.empty-cell {
1326
1385
  padding-bottom: 30px;
@@ -1346,6 +1405,16 @@
1346
1405
  position: relative;
1347
1406
  transform: translateX(var(--scroll-head-left));
1348
1407
  }
1408
+ .bk-table .bk-table-head .col-resize-drag {
1409
+ position: absolute;
1410
+ right: 0;
1411
+ top: 0;
1412
+ bottom: 0;
1413
+ width: 6px;
1414
+ transform: translateX(-50%);
1415
+ background-color: #3785FF;
1416
+ z-index: 1;
1417
+ }
1349
1418
  .bk-table .bk-table-head .table-head-settings {
1350
1419
  position: absolute;
1351
1420
  top: 0;
@@ -1369,12 +1438,11 @@
1369
1438
  width: 1rem;
1370
1439
  height: 1rem;
1371
1440
  }
1372
- .bk-table .bk-table-head .bk-table-fixed .column_fixed.column_fixed_right.shadow {
1373
- box-shadow: -2px 2px 10px 0px rgba(0, 0, 0, 0.12);
1374
- }
1375
1441
  .bk-table .bk-table-footer {
1376
1442
  height: var(--footer-height);
1377
- line-height: var(--footer-height);
1443
+ width: 100%;
1444
+ display: flex;
1445
+ align-items: center;
1378
1446
  }
1379
1447
  .bk-table .bk-table-footer.is-hidden {
1380
1448
  display: none;
@@ -1423,13 +1491,14 @@
1423
1491
  position: absolute;
1424
1492
  top: 0;
1425
1493
  right: 0;
1426
- bottom: 0;
1494
+ bottom: var(--footer-height);
1495
+ max-height: var(--fix-max-height);
1427
1496
  left: 0;
1497
+ height: var(--fix-height);
1428
1498
  pointer-events: none;
1429
1499
  }
1430
1500
  .bk-table .bk-table-fixed .column_fixed {
1431
1501
  position: absolute;
1432
- transform: translate(var(--var-scroll-left), var(--var-scroll-top));
1433
1502
  }
1434
1503
  .bk-table .bk-table-fixed .column_fixed.column_fixed_left {
1435
1504
  top: 0;
@@ -0,0 +1,55 @@
1
+ import { ICheckAllEmptyObject } from './const';
2
+ import { Column, Settings, SortScope, TablePropTypes } from './props';
3
+ export type ITableFormatData = {
4
+ data: any[];
5
+ dataSchema: WeakMap<object, any>;
6
+ columnSchema: WeakMap<object, any>;
7
+ columns: Column[];
8
+ settings: {
9
+ size: string;
10
+ height: number;
11
+ };
12
+ layout: {
13
+ bottom: number;
14
+ hasScrollY: boolean;
15
+ translateX: number;
16
+ translateY: number;
17
+ };
18
+ };
19
+ export type ITableResponse = {
20
+ formatColumns: (columns: Column[]) => void;
21
+ formatDataSchema: (data: any[]) => void;
22
+ setRowSelection: (row: any, isSelected: boolean) => void;
23
+ setRowExpand: (row: any, isExpand: boolean) => void;
24
+ setRowIndex: (row: any, index: number) => void;
25
+ setColumnAttribute: (col: Column, attrName: string, attrValue: ((...args: any[]) => boolean | number | void | string) | string | boolean | number) => void;
26
+ setColumnAttributeBySettings: (settings: Settings, checkedVal?: string[]) => void;
27
+ setAllColumnAttribute: (attrName: string, attrValue: ((...args: any[]) => boolean | number | void | string) | string | boolean | number) => void;
28
+ getColumnAttribute: (col: Column, attributeName: string) => string | boolean | Record<string, any>;
29
+ getColumnId: (col: Column) => string;
30
+ getColumnOrderWidth: (column: Column, orders?: string[]) => number;
31
+ isActiveColumn: (col: Column) => boolean;
32
+ isHiddenColumn: (col: Column) => boolean;
33
+ resolvePageData: (filterFn?: any, sortFn?: any, column?: Column, type?: string, sortScope?: SortScope) => void;
34
+ resetStartEndIndex: () => void;
35
+ toggleRowSelection: (row: any) => void;
36
+ toggleAllSelection: (value?: boolean) => void;
37
+ setAllRowExpand: (value?: boolean) => void;
38
+ clearSelection: () => void;
39
+ clearColumnSort: (reset?: boolean) => void;
40
+ setColumnSortActive: (column: Column, active: boolean) => void;
41
+ getRowAttribute: (row: any | ICheckAllEmptyObject, attrName: string) => any;
42
+ getRowSelection: () => any[];
43
+ resolveColumnWidth: (root: HTMLElement, autoWidth?: any, offsetWidth?: any) => void;
44
+ filter: () => void;
45
+ sortData: (column: Column) => void;
46
+ isCheckedAll: () => boolean;
47
+ hasCheckedRow: () => boolean;
48
+ setRowSelectionAll: (val: boolean) => void;
49
+ setRowIndeterminate: () => void;
50
+ pageData: any[];
51
+ localPagination: any;
52
+ formatData: ITableFormatData;
53
+ };
54
+ declare const _default: (props: TablePropTypes) => ITableResponse;
55
+ export default _default;
@@ -1,58 +1,184 @@
1
1
  import { ITableColumn } from './components/table-column';
2
- import { TablePropTypes } from './props';
2
+ import { SORT_OPTION } from './const';
3
+ import { Column, TablePropTypes } from './props';
3
4
  /**
4
5
  * 渲染column settings
5
6
  * @param props: TablePropTypes
6
7
  * @param targetColumns 解析之后的column配置(主要用来处理通过<bk-column>配置的数据结构)
7
8
  */
8
9
  declare const _default: (props: TablePropTypes, targetColumns: ITableColumn[]) => {
9
- initColumns: (column: ITableColumn | ITableColumn[], remove?: boolean) => void;
10
- getColumns: () => import("./props").Column[] | Partial<import("vue").ExtractPropTypes<{
11
- label: import("vue-types").VueTypeDef<any>;
12
- field: import("vue-types").VueTypeDef<any>;
13
- render: import("vue-types").VueTypeDef<any>;
14
- width: import("vue-types").VueTypeDef<string | number>;
15
- minWidth: import("vue-types").VueTypeDef<string | number> & {
16
- default: string | number;
17
- };
18
- columnKey: import("vue-types").VueTypeValidableDef<string> & {
19
- default: string;
20
- } & {
21
- default: string;
22
- };
23
- showOverflowTooltip: import("vue-types").VueTypeDef<import("./props").IOverflowTooltipProp> & {
24
- default: boolean | (() => {
25
- content: string | Function;
26
- disabled?: boolean;
27
- watchCellResize?: boolean;
28
- mode?: "auto" | "static";
29
- });
30
- };
31
- type: import("vue-types").VueTypeDef<"none" | "selection" | "index" | "expand">;
32
- resizable: import("vue-types").VueTypeValidableDef<boolean> & {
33
- default: boolean;
34
- } & {
35
- default: boolean;
36
- };
37
- fixed: import("vue-types").VueTypeDef<boolean | "right" | "left"> & {
38
- default: boolean | "right" | "left";
39
- };
40
- sort: import("vue-types").VueTypeDef<import("./props").ISortPropShape> & {
41
- default: string | boolean | (() => import("./props").ISortShape);
42
- };
43
- filter: import("vue-types").VueTypeDef<import("./props").IFilterPropShape> & {
44
- default: string | boolean | (() => import("./props").IFilterShape);
45
- };
46
- colspan: import("vue-types").VueTypeDef<any>;
47
- rowspan: import("vue-types").VueTypeDef<any>;
48
- align: import("vue-types").VueTypeDef<"" | "right" | "left" | "center">;
49
- className: import("vue-types").VueTypeDef<any>;
50
- prop: import("vue-types").VueTypeDef<any>;
51
- index: import("vue-types").VueTypeValidableDef<number> & {
52
- default: number;
53
- } & {
54
- default: number;
55
- };
56
- }>>[];
10
+ initColumns: (column: ITableColumn[], remove?: boolean) => void;
11
+ getColumns: () => {
12
+ label: import("./props").LabelFunctionString;
13
+ field?: import("./props").LabelFunctionString;
14
+ render?: import("./props").RenderFunctionString;
15
+ renderHead?: import("./props").RenderFunctionString;
16
+ width?: string | number;
17
+ minWidth?: string | number;
18
+ columnKey?: string;
19
+ showOverflowTooltip?: boolean | {
20
+ content: string | Function;
21
+ disabled?: (col: Column, row: any) => boolean;
22
+ watchCellResize?: boolean;
23
+ mode?: "auto" | "static";
24
+ popoverOption?: any;
25
+ resizerWay?: import("./props").ResizerWay;
26
+ };
27
+ type?: string;
28
+ fixed?: string | boolean;
29
+ resizable?: boolean;
30
+ sort?: string | boolean | {
31
+ sortFn?: Function;
32
+ sortScope?: import("./props").SortScope;
33
+ value?: SORT_OPTION;
34
+ };
35
+ filter?: string | boolean | {
36
+ list: any[];
37
+ filterFn?: Function;
38
+ match?: import("./props").FullEnum;
39
+ checked?: any[];
40
+ filterScope?: import("./props").SortScope;
41
+ btnSave?: string | boolean;
42
+ btnReset?: string | boolean;
43
+ maxHeight?: number;
44
+ };
45
+ colspan?: (({ column, colIndex, row, rowIndex }: {
46
+ column: any;
47
+ colIndex: any;
48
+ row: any;
49
+ rowIndex: any;
50
+ }) => number) | {
51
+ toString: (radix?: number) => string;
52
+ toFixed: (fractionDigits?: number) => string;
53
+ toExponential: (fractionDigits?: number) => string;
54
+ toPrecision: (precision?: number) => string;
55
+ valueOf: () => number;
56
+ toLocaleString: {
57
+ (locales?: string | string[], options?: Intl.NumberFormatOptions): string;
58
+ (locales?: Intl.LocalesArgument, options?: Intl.NumberFormatOptions): string;
59
+ };
60
+ };
61
+ rowspan?: (({ column, colIndex, row, rowIndex }: {
62
+ column: any;
63
+ colIndex: any;
64
+ row: any;
65
+ rowIndex: any;
66
+ }) => number) | {
67
+ toString: (radix?: number) => string;
68
+ toFixed: (fractionDigits?: number) => string;
69
+ toExponential: (fractionDigits?: number) => string;
70
+ toPrecision: (precision?: number) => string;
71
+ valueOf: () => number;
72
+ toLocaleString: {
73
+ (locales?: string | string[], options?: Intl.NumberFormatOptions): string;
74
+ (locales?: Intl.LocalesArgument, options?: Intl.NumberFormatOptions): string;
75
+ };
76
+ };
77
+ textAlign?: string;
78
+ className?: import("./props").RowClassFunctionString;
79
+ align?: string;
80
+ prop?: import("./props").LabelFunctionString;
81
+ index?: {
82
+ toString: (radix?: number) => string;
83
+ toFixed: (fractionDigits?: number) => string;
84
+ toExponential: (fractionDigits?: number) => string;
85
+ toPrecision: (precision?: number) => string;
86
+ valueOf: () => number;
87
+ toLocaleString: {
88
+ (locales?: string | string[], options?: Intl.NumberFormatOptions): string;
89
+ (locales?: Intl.LocalesArgument, options?: Intl.NumberFormatOptions): string;
90
+ };
91
+ };
92
+ explain?: boolean | {
93
+ content: import("./props").LabelFunctionString;
94
+ head: import("./props").LabelFunctionString;
95
+ };
96
+ }[];
97
+ getActiveColumn: () => {
98
+ label: import("./props").LabelFunctionString;
99
+ field?: import("./props").LabelFunctionString;
100
+ render?: import("./props").RenderFunctionString;
101
+ renderHead?: import("./props").RenderFunctionString;
102
+ width?: string | number;
103
+ minWidth?: string | number;
104
+ columnKey?: string;
105
+ showOverflowTooltip?: boolean | {
106
+ content: string | Function;
107
+ disabled?: (col: Column, row: any) => boolean;
108
+ watchCellResize?: boolean;
109
+ mode?: "auto" | "static";
110
+ popoverOption?: any;
111
+ resizerWay?: import("./props").ResizerWay;
112
+ };
113
+ type?: string;
114
+ fixed?: string | boolean;
115
+ resizable?: boolean;
116
+ sort?: string | boolean | {
117
+ sortFn?: Function;
118
+ sortScope?: import("./props").SortScope;
119
+ value?: SORT_OPTION;
120
+ };
121
+ filter?: string | boolean | {
122
+ list: any[];
123
+ filterFn?: Function;
124
+ match?: import("./props").FullEnum;
125
+ checked?: any[];
126
+ filterScope?: import("./props").SortScope;
127
+ btnSave?: string | boolean;
128
+ btnReset?: string | boolean;
129
+ maxHeight?: number;
130
+ };
131
+ colspan?: (({ column, colIndex, row, rowIndex }: {
132
+ column: any;
133
+ colIndex: any;
134
+ row: any;
135
+ rowIndex: any;
136
+ }) => number) | {
137
+ toString: (radix?: number) => string;
138
+ toFixed: (fractionDigits?: number) => string;
139
+ toExponential: (fractionDigits?: number) => string;
140
+ toPrecision: (precision?: number) => string;
141
+ valueOf: () => number;
142
+ toLocaleString: {
143
+ (locales?: string | string[], options?: Intl.NumberFormatOptions): string;
144
+ (locales?: Intl.LocalesArgument, options?: Intl.NumberFormatOptions): string;
145
+ };
146
+ };
147
+ rowspan?: (({ column, colIndex, row, rowIndex }: {
148
+ column: any;
149
+ colIndex: any;
150
+ row: any;
151
+ rowIndex: any;
152
+ }) => number) | {
153
+ toString: (radix?: number) => string;
154
+ toFixed: (fractionDigits?: number) => string;
155
+ toExponential: (fractionDigits?: number) => string;
156
+ toPrecision: (precision?: number) => string;
157
+ valueOf: () => number;
158
+ toLocaleString: {
159
+ (locales?: string | string[], options?: Intl.NumberFormatOptions): string;
160
+ (locales?: Intl.LocalesArgument, options?: Intl.NumberFormatOptions): string;
161
+ };
162
+ };
163
+ textAlign?: string;
164
+ className?: import("./props").RowClassFunctionString;
165
+ align?: string;
166
+ prop?: import("./props").LabelFunctionString;
167
+ index?: {
168
+ toString: (radix?: number) => string;
169
+ toFixed: (fractionDigits?: number) => string;
170
+ toExponential: (fractionDigits?: number) => string;
171
+ toPrecision: (precision?: number) => string;
172
+ valueOf: () => number;
173
+ toLocaleString: {
174
+ (locales?: string | string[], options?: Intl.NumberFormatOptions): string;
175
+ (locales?: Intl.LocalesArgument, options?: Intl.NumberFormatOptions): string;
176
+ };
177
+ };
178
+ explain?: boolean | {
179
+ content: import("./props").LabelFunctionString;
180
+ head: import("./props").LabelFunctionString;
181
+ };
182
+ };
57
183
  };
58
184
  export default _default;