bkui-vue 0.0.2-beta.8 → 0.0.2-table-refactor.1

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 (241) hide show
  1. package/dist/index.cjs.js +70 -62
  2. package/dist/index.esm.js +16711 -16319
  3. package/dist/index.umd.js +72 -64
  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/components.d.ts +1 -1
  49. package/lib/config-provider/config-provider.d.ts +3 -0
  50. package/lib/config-provider/index.d.ts +5 -1
  51. package/lib/config-provider/index.js +1 -1
  52. package/lib/config-provider/token.d.ts +1 -0
  53. package/lib/config-provider/use-global-config.d.ts +2 -0
  54. package/lib/config-provider/use-prefix.d.ts +2 -0
  55. package/lib/container/index.d.ts +2 -2
  56. package/lib/container/index.js +1 -1
  57. package/lib/date-picker/date-picker.d.ts +3 -1
  58. package/lib/date-picker/index.d.ts +12 -5
  59. package/lib/date-picker/index.js +1 -1
  60. package/lib/date-picker/panel/date-range.d.ts +2 -1
  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.d.ts +1 -1
  67. package/lib/dropdown/dropdown.variable.css +1 -0
  68. package/lib/dropdown/index.d.ts +7 -7
  69. package/lib/exception/index.d.ts +2 -2
  70. package/lib/fixed-navbar/index.d.ts +1 -1
  71. package/lib/form/index.d.ts +3 -3
  72. package/lib/form/index.js +1 -1
  73. package/lib/hooks.d.ts +1 -1
  74. package/lib/hooks.js +1 -1
  75. package/lib/icon/assistant.d.ts +4 -0
  76. package/lib/icon/assistant.js +1 -0
  77. package/lib/icon/index.d.ts +1 -0
  78. package/lib/icon/index.js +1 -1
  79. package/lib/image/index.d.ts +1 -1
  80. package/lib/image/index.js +1 -1
  81. package/lib/info-box/index.js +1 -1
  82. package/lib/input/index.d.ts +146 -50
  83. package/lib/input/index.js +2 -1
  84. package/lib/input/index.js.LICENSE.txt +1 -0
  85. package/lib/input/input.css +34 -6
  86. package/lib/input/input.d.ts +100 -11
  87. package/lib/input/input.less +53 -14
  88. package/lib/input/input.variable.css +34 -6
  89. package/lib/input/util.d.ts +6 -0
  90. package/lib/link/index.d.ts +4 -4
  91. package/lib/link/link.d.ts +1 -1
  92. package/lib/loading/index.d.ts +2 -2
  93. package/lib/locale/index.js +1 -1
  94. package/lib/locale/lang/en.d.ts +1 -0
  95. package/lib/menu/index.d.ts +2 -2
  96. package/lib/message/index.js +1 -1
  97. package/lib/message/message.css +33 -9
  98. package/lib/message/message.less +78 -54
  99. package/lib/message/message.variable.css +33 -9
  100. package/lib/message/messageConstructor.d.ts +30 -8
  101. package/lib/modal/index.d.ts +2 -2
  102. package/lib/modal/index.js +1 -1
  103. package/lib/navigation/index.d.ts +4 -1
  104. package/lib/navigation/index.js +1 -1
  105. package/lib/navigation/navigation.d.ts +1 -0
  106. package/lib/notify/index.js +1 -1
  107. package/lib/notify/notifyConstructor.d.ts +1 -1
  108. package/lib/overflow-title/components/overflow-title.d.ts +257 -1
  109. package/lib/overflow-title/index.d.ts +387 -2
  110. package/lib/overflow-title/index.js +1 -1
  111. package/lib/overflow-title/props.d.ts +129 -0
  112. package/lib/pagination/index.d.ts +2 -2
  113. package/lib/plugin-popover/index.js +1 -1
  114. package/lib/pop-confirm/index.d.ts +1 -1
  115. package/lib/popover/const.d.ts +22 -9
  116. package/lib/popover/content.d.ts +33 -0
  117. package/lib/popover/index.d.ts +154 -61
  118. package/lib/popover/index.js +1 -1
  119. package/lib/popover/popover.css +1 -0
  120. package/lib/popover/popover.d.ts +64 -23
  121. package/lib/popover/popover.less +3 -2
  122. package/lib/popover/popover.variable.css +1 -0
  123. package/lib/popover/props.d.ts +29 -4
  124. package/lib/popover/use-floating.d.ts +2 -2
  125. package/lib/popover/use-popover-init.d.ts +2 -1
  126. package/lib/popover2/index.d.ts +1 -1
  127. package/lib/preset.d.ts +2 -0
  128. package/lib/process/index.d.ts +1 -1
  129. package/lib/progress/index.d.ts +1 -1
  130. package/lib/radio/index.d.ts +23 -23
  131. package/lib/radio/radio-button.d.ts +4 -4
  132. package/lib/radio/radio-group.d.ts +4 -4
  133. package/lib/radio/radio.d.ts +4 -4
  134. package/lib/rate/index.d.ts +8 -4
  135. package/lib/rate/index.js +1 -1
  136. package/lib/rate/rate.d.ts +2 -1
  137. package/lib/resize-layout/index.d.ts +4 -4
  138. package/lib/resize-layout/index.js +1 -1
  139. package/lib/resize-layout/resize-layout.css +12 -0
  140. package/lib/resize-layout/resize-layout.d.ts +1 -1
  141. package/lib/resize-layout/resize-layout.less +12 -0
  142. package/lib/resize-layout/resize-layout.variable.css +12 -0
  143. package/lib/search-select/index.d.ts +62 -29
  144. package/lib/search-select/index.js +1 -1
  145. package/lib/search-select/input.d.ts +5 -1
  146. package/lib/search-select/menu.d.ts +33 -2
  147. package/lib/search-select/search-select.css +31 -11
  148. package/lib/search-select/search-select.d.ts +23 -20
  149. package/lib/search-select/search-select.less +29 -10
  150. package/lib/search-select/search-select.variable.css +31 -11
  151. package/lib/search-select/selected.d.ts +5 -1
  152. package/lib/search-select/utils.d.ts +13 -5
  153. package/lib/select/index.d.ts +180 -84
  154. package/lib/select/index.js +1 -1
  155. package/lib/select/option.d.ts +11 -0
  156. package/lib/select/select.css +9 -1
  157. package/lib/select/select.d.ts +75 -37
  158. package/lib/select/select.less +11 -1
  159. package/lib/select/select.variable.css +9 -1
  160. package/lib/select/selectTagInput.d.ts +8 -5
  161. package/lib/shared/helper.d.ts +1 -1
  162. package/lib/shared/index.js +1 -1
  163. package/lib/shared/mask-manager.d.ts +3 -4
  164. package/lib/shared/pop-manager.d.ts +6 -2
  165. package/lib/shared/popover.d.ts +2 -2
  166. package/lib/shared/vue-types.d.ts +3 -2
  167. package/lib/sideslider/index.d.ts +1 -1
  168. package/lib/slider/index.d.ts +1 -1
  169. package/lib/slider/index.js +1 -1
  170. package/lib/steps/index.d.ts +1 -1
  171. package/lib/steps/index.js +1 -1
  172. package/lib/styles/mixins/popper.less +6 -5
  173. package/lib/swiper/index.d.ts +1 -1
  174. package/lib/swiper/index.js +1 -1
  175. package/lib/swiper/swiper.css +0 -6
  176. package/lib/swiper/swiper.less +0 -8
  177. package/lib/swiper/swiper.variable.css +0 -6
  178. package/lib/switcher/index.d.ts +30 -16
  179. package/lib/switcher/index.js +1 -1
  180. package/lib/switcher/switcher.d.ts +74 -5
  181. package/lib/tab/index.d.ts +3 -3
  182. package/lib/tab/tab-nav.d.ts +12 -2
  183. package/lib/tab/tab-panel.d.ts +1 -1
  184. package/lib/table/components/table-cell.d.ts +22 -15
  185. package/lib/table/components/table-column.d.ts +154 -219
  186. package/lib/table/const.d.ts +34 -56
  187. package/lib/table/events.d.ts +180 -0
  188. package/lib/table/index.d.ts +746 -440
  189. package/lib/table/index.js +1 -1
  190. package/lib/table/plugins/head-filter.css +3 -0
  191. package/lib/table/plugins/head-filter.d.ts +3 -7
  192. package/lib/table/plugins/head-filter.less +3 -0
  193. package/lib/table/plugins/head-filter.variable.css +3 -0
  194. package/lib/table/plugins/head-sort.d.ts +3 -7
  195. package/lib/table/plugins/settings.d.ts +12 -26
  196. package/lib/table/plugins/use-column-resize.d.ts +30 -10
  197. package/lib/table/plugins/use-fixed-column.d.ts +7 -5
  198. package/lib/table/plugins/use-pagination.d.ts +7 -4
  199. package/lib/table/props.d.ts +219 -181
  200. package/lib/table/render.d.ts +12 -20
  201. package/lib/table/table.css +85 -5
  202. package/lib/table/table.d.ts +227 -104
  203. package/lib/table/table.less +75 -8
  204. package/lib/table/table.variable.css +85 -5
  205. package/lib/table/use-attributes.d.ts +55 -0
  206. package/lib/table/use-column.d.ts +175 -3
  207. package/lib/table/use-common.d.ts +1609 -76
  208. package/lib/table/use-render.d.ts +11 -0
  209. package/lib/table/utils.d.ts +30 -28
  210. package/lib/table-column/index.d.ts +237 -527
  211. package/lib/table-column/index.js +1 -1
  212. package/lib/tag/index.d.ts +10 -10
  213. package/lib/tag/index.js +1 -1
  214. package/lib/tag/tag.d.ts +5 -5
  215. package/lib/tag-input/index.d.ts +49 -13
  216. package/lib/tag-input/index.js +1 -1
  217. package/lib/tag-input/tag-input.css +6 -1
  218. package/lib/tag-input/tag-input.d.ts +46 -10
  219. package/lib/tag-input/tag-input.less +9 -4
  220. package/lib/tag-input/tag-input.variable.css +6 -1
  221. package/lib/tag-input/tag-props.d.ts +16 -4
  222. package/lib/time-picker/index.d.ts +1 -1
  223. package/lib/timeline/index.d.ts +1 -1
  224. package/lib/transfer/index.d.ts +1 -1
  225. package/lib/tree/constant.d.ts +2 -2
  226. package/lib/tree/index.d.ts +37 -7
  227. package/lib/tree/index.js +1 -1
  228. package/lib/tree/props.d.ts +8 -1
  229. package/lib/tree/tree.d.ts +20 -2
  230. package/lib/tree/use-node-action.d.ts +3 -2
  231. package/lib/tree/use-node-attribute.d.ts +15 -8
  232. package/lib/tree/use-tree-init.d.ts +1 -2
  233. package/lib/tree/util.d.ts +7 -2
  234. package/lib/upload/index.d.ts +1 -1
  235. package/lib/virtual-render/index.d.ts +43 -1
  236. package/lib/virtual-render/index.js +1 -1
  237. package/lib/virtual-render/props.d.ts +15 -0
  238. package/lib/virtual-render/v-virtual-render.d.ts +1 -0
  239. package/lib/virtual-render/virtual-render.d.ts +27 -2
  240. package/lib/volar.components.d.ts +24 -24
  241. package/package.json +17 -16
@@ -14,7 +14,16 @@
14
14
  position: relative;
15
15
  height: auto;
16
16
  overflow: hidden;
17
- // border-bottom: 1px solid @table-border-color;
17
+
18
+ &-flex {
19
+ display: flex;
20
+ flex-direction: column;
21
+ max-height: 100%;
22
+ .@{bk-prefix}-table-body {
23
+ flex: 1;
24
+ overflow: auto;
25
+ }
26
+ }
18
27
 
19
28
  &.has-scroll-y {
20
29
  .@{bk-prefix}-table-head {
@@ -27,7 +36,7 @@
27
36
  overflow: auto;
28
37
 
29
38
  &::-webkit-scrollbar {
30
- width: 6px;
39
+ width: 5px;
31
40
  height: 6px;
32
41
  }
33
42
 
@@ -42,6 +51,26 @@
42
51
  }
43
52
  }
44
53
 
54
+ .@{bk-prefix}-table-body-content {
55
+ &.@{bk-prefix}-stripe {
56
+ table {
57
+ tbody {
58
+ tr {
59
+ &:nth-child(even) {
60
+ td {
61
+ background-color: #FAFBFD;
62
+ }
63
+ }
64
+
65
+ td {
66
+ border-bottom: none;
67
+ }
68
+ }
69
+ }
70
+ }
71
+ }
72
+ }
73
+
45
74
  .@{bk-prefix}-fixed-bottom-border {
46
75
  position: sticky;
47
76
  bottom: 0;
@@ -61,8 +90,8 @@
61
90
  background: @table-bg-color;
62
91
 
63
92
  &::-webkit-scrollbar {
64
- width: 4px;
65
- height: 4px;
93
+ width: 5px;
94
+ height: 5px;
66
95
  }
67
96
 
68
97
  &::-webkit-scrollbar-thumb {
@@ -82,6 +111,7 @@
82
111
  width: 100%;
83
112
  height: 100%;
84
113
  padding-bottom: 20px;
114
+ position: relative;
85
115
  }
86
116
 
87
117
  }
@@ -116,6 +146,11 @@
116
146
  cursor: pointer;
117
147
  }
118
148
 
149
+ &.explain {
150
+ text-decoration-style: dashed;
151
+ text-decoration-line: underline;
152
+ }
153
+
119
154
  .head-text {
120
155
  overflow: hidden;
121
156
  text-overflow: ellipsis;
@@ -147,7 +182,6 @@
147
182
  &.column_fixed {
148
183
  position: sticky;
149
184
  z-index: 1;
150
- background: #fff;
151
185
 
152
186
  &.column_fixed_left {
153
187
  left: 0;
@@ -194,7 +228,23 @@
194
228
 
195
229
  th {
196
230
  font-weight: 400;
197
-
231
+ background-color: var(--background-color);
232
+ position: relative;
233
+
234
+ &.col-resize-hover {
235
+ &::after {
236
+ content: '';
237
+ position: absolute;
238
+ right: 0;
239
+ top: 0;
240
+ bottom: 0;
241
+ width: 6px;
242
+ transform: translateX(50%);
243
+ background-color: #3785FF;
244
+ z-index: 1;
245
+ pointer-events: none;
246
+ }
247
+ }
198
248
  .cell {
199
249
  display: flex;
200
250
  align-items: center;
@@ -205,6 +255,7 @@
205
255
  &.active,
206
256
  &:hover {
207
257
  background: @table-row-active-bg-color;
258
+ cursor: pointer;
208
259
  }
209
260
 
210
261
  &.column_fixed {
@@ -216,6 +267,8 @@
216
267
  tbody {
217
268
  tr {
218
269
  td {
270
+ background-color: #fff;
271
+
219
272
  &.empty-cell {
220
273
  padding-bottom: 30px;
221
274
  }
@@ -252,6 +305,17 @@
252
305
  position: relative;
253
306
  transform: translateX(var(--scroll-head-left));
254
307
 
308
+ .col-resize-drag {
309
+ position: absolute;
310
+ right: 0;
311
+ top: 0;
312
+ bottom: 0;
313
+ width: 6px;
314
+ transform: translateX(-50%);
315
+ background-color: #3785FF;
316
+ z-index: 1;
317
+ }
318
+
255
319
  .table-head-settings {
256
320
  position: absolute;
257
321
  top: 0;
@@ -282,7 +346,9 @@
282
346
 
283
347
  .@{bk-prefix}-table-footer {
284
348
  height: var(--footer-height);
285
- line-height: var(--footer-height);
349
+ width: 100%;
350
+ display: flex;
351
+ align-items: center;
286
352
 
287
353
  &.is-hidden {
288
354
  display: none;
@@ -359,8 +425,9 @@
359
425
  top: 0;
360
426
  right: 0;
361
427
  bottom: var(--footer-height);
428
+ max-height: var(--fix-max-height);
362
429
  left: 0;
363
- // width: 100%;
430
+ height: var(--fix-height);
364
431
  pointer-events: none;
365
432
 
366
433
  .column_fixed {
@@ -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 {
@@ -1126,6 +1159,12 @@
1126
1159
  .bk-table .bk-table-body .prepend-row {
1127
1160
  transform: translateX(var(--prepend-left));
1128
1161
  }
1162
+ .bk-table .bk-table-body-content.bk-stripe table tbody tr:nth-child(even) td {
1163
+ background-color: #FAFBFD;
1164
+ }
1165
+ .bk-table .bk-table-body-content.bk-stripe table tbody tr td {
1166
+ border-bottom: none;
1167
+ }
1129
1168
  .bk-table .bk-fixed-bottom-border {
1130
1169
  position: sticky;
1131
1170
  bottom: 0;
@@ -1144,8 +1183,8 @@
1144
1183
  }
1145
1184
  .bk-table .bk-table-head::-webkit-scrollbar,
1146
1185
  .bk-table .bk-table-body::-webkit-scrollbar {
1147
- width: 4px;
1148
- height: 4px;
1186
+ width: 5px;
1187
+ height: 5px;
1149
1188
  }
1150
1189
  .bk-table .bk-table-head::-webkit-scrollbar-thumb,
1151
1190
  .bk-table .bk-table-body::-webkit-scrollbar-thumb {
@@ -1166,6 +1205,7 @@
1166
1205
  width: 100%;
1167
1206
  height: 100%;
1168
1207
  padding-bottom: 20px;
1208
+ position: relative;
1169
1209
  }
1170
1210
  .bk-table .bk-table-head table,
1171
1211
  .bk-table .bk-table-body table {
@@ -1205,6 +1245,13 @@
1205
1245
  .bk-table .bk-table-body table td .cell.has-sort {
1206
1246
  cursor: pointer;
1207
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
+ }
1208
1255
  .bk-table .bk-table-head table th .cell .head-text,
1209
1256
  .bk-table .bk-table-body table th .cell .head-text,
1210
1257
  .bk-table .bk-table-head table td .cell .head-text,
@@ -1245,7 +1292,6 @@
1245
1292
  .bk-table .bk-table-body table td.column_fixed {
1246
1293
  position: sticky;
1247
1294
  z-index: 1;
1248
- background: #fff;
1249
1295
  }
1250
1296
  .bk-table .bk-table-head table th.column_fixed.column_fixed_left,
1251
1297
  .bk-table .bk-table-body table th.column_fixed.column_fixed_left,
@@ -1296,6 +1342,21 @@
1296
1342
  .bk-table .bk-table-head table thead th,
1297
1343
  .bk-table .bk-table-body table thead th {
1298
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;
1299
1360
  }
1300
1361
  .bk-table .bk-table-head table thead th .cell,
1301
1362
  .bk-table .bk-table-body table thead th .cell {
@@ -1309,11 +1370,16 @@
1309
1370
  .bk-table .bk-table-head table thead th:hover,
1310
1371
  .bk-table .bk-table-body table thead th:hover {
1311
1372
  background: #f0f1f5;
1373
+ cursor: pointer;
1312
1374
  }
1313
1375
  .bk-table .bk-table-head table thead th.column_fixed,
1314
1376
  .bk-table .bk-table-body table thead th.column_fixed {
1315
1377
  transform: translateX(var(--scroll-left));
1316
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
+ }
1317
1383
  .bk-table .bk-table-head table tbody tr td.empty-cell,
1318
1384
  .bk-table .bk-table-body table tbody tr td.empty-cell {
1319
1385
  padding-bottom: 30px;
@@ -1339,6 +1405,16 @@
1339
1405
  position: relative;
1340
1406
  transform: translateX(var(--scroll-head-left));
1341
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
+ }
1342
1418
  .bk-table .bk-table-head .table-head-settings {
1343
1419
  position: absolute;
1344
1420
  top: 0;
@@ -1364,7 +1440,9 @@
1364
1440
  }
1365
1441
  .bk-table .bk-table-footer {
1366
1442
  height: var(--footer-height);
1367
- line-height: var(--footer-height);
1443
+ width: 100%;
1444
+ display: flex;
1445
+ align-items: center;
1368
1446
  }
1369
1447
  .bk-table .bk-table-footer.is-hidden {
1370
1448
  display: none;
@@ -1414,7 +1492,9 @@
1414
1492
  top: 0;
1415
1493
  right: 0;
1416
1494
  bottom: var(--footer-height);
1495
+ max-height: var(--fix-max-height);
1417
1496
  left: 0;
1497
+ height: var(--fix-height);
1418
1498
  pointer-events: none;
1419
1499
  }
1420
1500
  .bk-table .bk-table-fixed .column_fixed {
@@ -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,12 +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[];
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
+ };
11
183
  };
12
184
  export default _default;