bkui-vue 2.0.2-beta.99 → 2.1.0-dev-beta.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.
- package/dist/index.cjs.js +40 -40
- package/dist/index.esm.js +13501 -13474
- package/dist/index.umd.js +43 -43
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/cascader/index.js +1 -2
- package/lib/color-picker/index.js +1 -2
- package/lib/date-picker/index.js +1 -2
- package/lib/dialog/dialog.d.ts +11 -0
- package/lib/dialog/index.d.ts +18 -0
- package/lib/dialog/index.js +28 -4
- package/lib/dialog/props.d.ts +5 -0
- package/lib/directives/index.js +1 -2
- package/lib/form/index.js +1 -2
- package/lib/image/index.js +1 -2
- package/lib/index.js +1 -1
- package/lib/input/index.d.ts +3 -3
- package/lib/input/index.js +12 -4
- package/lib/input/input.d.ts +3 -3
- package/lib/message/messageConstructor.d.ts +1 -1
- package/lib/popover/composables/use-floating.d.ts +3 -1
- package/lib/popover/index.js +16 -27
- package/lib/progress/index.d.ts +3 -3
- package/lib/progress/progress.d.ts +1 -1
- package/lib/search-select/index.js +1 -2
- package/lib/select/index.js +1 -2
- package/lib/tab/index.js +1 -2
- package/lib/table/hooks/use-layout.d.ts +1 -0
- package/lib/table/index.js +178 -62
- package/lib/table/props.d.ts +1 -1
- package/lib/table/table.css +62 -11
- package/lib/table/table.less +87 -13
- package/lib/table/table.variable.css +62 -11
- package/lib/tag-input/index.js +1 -2
- package/lib/tree/index.js +3 -6
- package/package.json +1 -1
package/lib/table/table.less
CHANGED
|
@@ -13,12 +13,10 @@
|
|
|
13
13
|
.@{bk-prefix}-table {
|
|
14
14
|
position: relative;
|
|
15
15
|
width: 100%;
|
|
16
|
-
height: 100%;
|
|
17
16
|
overflow: hidden;
|
|
18
17
|
border-spacing: 0;
|
|
19
18
|
display: flex;
|
|
20
19
|
flex-direction: column;
|
|
21
|
-
max-height: fit-content;
|
|
22
20
|
|
|
23
21
|
.@{bk-prefix}-table-body {
|
|
24
22
|
position: relative;
|
|
@@ -45,8 +43,10 @@
|
|
|
45
43
|
.bk-table-body-wrapper {
|
|
46
44
|
position: relative;
|
|
47
45
|
width: 100%;
|
|
48
|
-
|
|
46
|
+
flex: 1 1 auto;
|
|
47
|
+
min-height: 0;
|
|
49
48
|
overflow: hidden;
|
|
49
|
+
font-size: 0;
|
|
50
50
|
|
|
51
51
|
// 表头右侧设置按钮:固定在可视区域右侧(不随横向滚动移动)
|
|
52
52
|
.bk-table-head-settings-wrapper {
|
|
@@ -336,15 +336,15 @@
|
|
|
336
336
|
|
|
337
337
|
}
|
|
338
338
|
|
|
339
|
+
&.cell-resize {
|
|
340
|
+
cursor: col-resize;
|
|
341
|
+
}
|
|
342
|
+
|
|
339
343
|
.cell {
|
|
340
344
|
display: flex;
|
|
341
345
|
align-items: center;
|
|
342
346
|
height: calc(var(--row-height) - 2px);
|
|
343
347
|
color: @table-head-font-color;
|
|
344
|
-
|
|
345
|
-
&.cell-resize {
|
|
346
|
-
cursor: col-resize;
|
|
347
|
-
}
|
|
348
348
|
}
|
|
349
349
|
|
|
350
350
|
}
|
|
@@ -372,6 +372,12 @@
|
|
|
372
372
|
}
|
|
373
373
|
}
|
|
374
374
|
|
|
375
|
+
&:last-child {
|
|
376
|
+
td {
|
|
377
|
+
border-bottom: none;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
|
|
375
381
|
td {
|
|
376
382
|
background-color: #fff;
|
|
377
383
|
border-top: 1px solid @table-bg-color;
|
|
@@ -397,6 +403,28 @@
|
|
|
397
403
|
}
|
|
398
404
|
}
|
|
399
405
|
|
|
406
|
+
&.row-height-auto {
|
|
407
|
+
td {
|
|
408
|
+
// 覆盖全局 th, td { height: var(--row-height) },让内容撑起行高
|
|
409
|
+
// auto 模式使用独立的 --row-min-height 变量,语义上明确表示最小高度而非固定高度
|
|
410
|
+
height: auto !important;
|
|
411
|
+
min-height: var(--row-min-height, 42px);
|
|
412
|
+
|
|
413
|
+
.cell {
|
|
414
|
+
display: flex;
|
|
415
|
+
align-items: center;
|
|
416
|
+
height: auto;
|
|
417
|
+
min-height: calc(var(--row-min-height, 42px) - 4px);
|
|
418
|
+
// 允许文字换行,覆盖全局 white-space: nowrap / overflow: hidden / text-overflow: ellipsis
|
|
419
|
+
white-space: normal;
|
|
420
|
+
overflow: visible;
|
|
421
|
+
text-overflow: unset;
|
|
422
|
+
word-break: break-word;
|
|
423
|
+
line-height: normal;
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
|
|
400
428
|
&:hover {
|
|
401
429
|
&.hover-highlight {
|
|
402
430
|
td {
|
|
@@ -484,6 +512,10 @@
|
|
|
484
512
|
&.is-hidden {
|
|
485
513
|
display: none;
|
|
486
514
|
}
|
|
515
|
+
|
|
516
|
+
&:not(.is-hidden) {
|
|
517
|
+
border-top: 1px solid @table-border-color;
|
|
518
|
+
}
|
|
487
519
|
}
|
|
488
520
|
|
|
489
521
|
&.bordered-row {
|
|
@@ -503,19 +535,52 @@
|
|
|
503
535
|
}
|
|
504
536
|
|
|
505
537
|
&.bordered-outer {
|
|
506
|
-
|
|
538
|
+
.bk-table-body-wrapper {
|
|
539
|
+
border: 1px solid @table-border-color;
|
|
540
|
+
border-radius: 2px;
|
|
541
|
+
box-sizing: border-box;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
.@{bk-prefix}-table-footer:not(.is-hidden) {
|
|
545
|
+
border-left: 1px solid @table-border-color;
|
|
546
|
+
border-right: 1px solid @table-border-color;
|
|
547
|
+
border-bottom: 1px solid @table-border-color;
|
|
548
|
+
border-radius: 0 0 2px 2px;
|
|
549
|
+
box-sizing: border-box;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
.bk-table-body-wrapper:has(~ .@{bk-prefix}-table-footer:not(.is-hidden)) {
|
|
553
|
+
border-bottom: none;
|
|
554
|
+
border-radius: 2px 2px 0 0;
|
|
555
|
+
}
|
|
507
556
|
}
|
|
508
557
|
|
|
509
558
|
&.bordered-horizontal {
|
|
510
|
-
|
|
511
|
-
|
|
559
|
+
.bk-table-body-wrapper {
|
|
560
|
+
border-top: 1px solid @table-border-color;
|
|
561
|
+
border-bottom: 1px solid @table-border-color;
|
|
562
|
+
box-sizing: border-box;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
.@{bk-prefix}-table-footer:not(.is-hidden) {
|
|
566
|
+
border-bottom: 1px solid @table-border-color;
|
|
567
|
+
box-sizing: border-box;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
.bk-table-body-wrapper:has(~ .@{bk-prefix}-table-footer:not(.is-hidden)) {
|
|
571
|
+
border-bottom: none;
|
|
572
|
+
}
|
|
512
573
|
}
|
|
513
574
|
|
|
514
575
|
&.bordered-outer,
|
|
515
576
|
&.bordered-horizontal {
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
577
|
+
.@{bk-prefix}-table-body {
|
|
578
|
+
tbody {
|
|
579
|
+
tr:last-child {
|
|
580
|
+
td {
|
|
581
|
+
border-bottom-color: @table-bg-color;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
519
584
|
}
|
|
520
585
|
}
|
|
521
586
|
}
|
|
@@ -559,6 +624,15 @@
|
|
|
559
624
|
}
|
|
560
625
|
}
|
|
561
626
|
}
|
|
627
|
+
|
|
628
|
+
&.bordered-outer {
|
|
629
|
+
.@{bk-prefix}-table-head {
|
|
630
|
+
border-right: none;
|
|
631
|
+
}
|
|
632
|
+
.@{bk-prefix}-table-body {
|
|
633
|
+
border-right: none;
|
|
634
|
+
}
|
|
635
|
+
}
|
|
562
636
|
}
|
|
563
637
|
|
|
564
638
|
th,
|
|
@@ -1227,12 +1227,10 @@
|
|
|
1227
1227
|
.bk-table {
|
|
1228
1228
|
position: relative;
|
|
1229
1229
|
width: 100%;
|
|
1230
|
-
height: 100%;
|
|
1231
1230
|
overflow: hidden;
|
|
1232
1231
|
border-spacing: 0;
|
|
1233
1232
|
display: flex;
|
|
1234
1233
|
flex-direction: column;
|
|
1235
|
-
max-height: fit-content;
|
|
1236
1234
|
}
|
|
1237
1235
|
.bk-table .bk-table-body {
|
|
1238
1236
|
position: relative;
|
|
@@ -1253,8 +1251,10 @@
|
|
|
1253
1251
|
.bk-table .bk-table-body-wrapper {
|
|
1254
1252
|
position: relative;
|
|
1255
1253
|
width: 100%;
|
|
1256
|
-
|
|
1254
|
+
flex: 1 1 auto;
|
|
1255
|
+
min-height: 0;
|
|
1257
1256
|
overflow: hidden;
|
|
1257
|
+
font-size: 0;
|
|
1258
1258
|
}
|
|
1259
1259
|
.bk-table .bk-table-body-wrapper .bk-table-head-settings-wrapper {
|
|
1260
1260
|
position: absolute;
|
|
@@ -1523,6 +1523,10 @@
|
|
|
1523
1523
|
transform-origin: center;
|
|
1524
1524
|
content: '';
|
|
1525
1525
|
}
|
|
1526
|
+
.bk-table .bk-table-head table thead th.cell-resize,
|
|
1527
|
+
.bk-table .bk-table-body table thead th.cell-resize {
|
|
1528
|
+
cursor: col-resize;
|
|
1529
|
+
}
|
|
1526
1530
|
.bk-table .bk-table-head table thead th .cell,
|
|
1527
1531
|
.bk-table .bk-table-body table thead th .cell {
|
|
1528
1532
|
display: flex;
|
|
@@ -1530,10 +1534,6 @@
|
|
|
1530
1534
|
height: calc(var(--row-height) - 2px);
|
|
1531
1535
|
color: #313238;
|
|
1532
1536
|
}
|
|
1533
|
-
.bk-table .bk-table-head table thead th .cell.cell-resize,
|
|
1534
|
-
.bk-table .bk-table-body table thead th .cell.cell-resize {
|
|
1535
|
-
cursor: col-resize;
|
|
1536
|
-
}
|
|
1537
1537
|
.bk-table .bk-table-head table:not(.col-resize-hover) thead th.active,
|
|
1538
1538
|
.bk-table .bk-table-body table:not(.col-resize-hover) thead th.active,
|
|
1539
1539
|
.bk-table .bk-table-head table:not(.col-resize-hover) thead th:hover,
|
|
@@ -1549,6 +1549,10 @@
|
|
|
1549
1549
|
.bk-table .bk-table-body table tbody tr.stripe-row td {
|
|
1550
1550
|
background-color: #fafbfd;
|
|
1551
1551
|
}
|
|
1552
|
+
.bk-table .bk-table-head table tbody tr:last-child td,
|
|
1553
|
+
.bk-table .bk-table-body table tbody tr:last-child td {
|
|
1554
|
+
border-bottom: none;
|
|
1555
|
+
}
|
|
1552
1556
|
.bk-table .bk-table-head table tbody tr td,
|
|
1553
1557
|
.bk-table .bk-table-body table tbody tr td {
|
|
1554
1558
|
background-color: #fff;
|
|
@@ -1573,6 +1577,23 @@
|
|
|
1573
1577
|
text-align: center;
|
|
1574
1578
|
cursor: move;
|
|
1575
1579
|
}
|
|
1580
|
+
.bk-table .bk-table-head table tbody tr.row-height-auto td,
|
|
1581
|
+
.bk-table .bk-table-body table tbody tr.row-height-auto td {
|
|
1582
|
+
height: auto !important;
|
|
1583
|
+
min-height: var(--row-min-height, 42px);
|
|
1584
|
+
}
|
|
1585
|
+
.bk-table .bk-table-head table tbody tr.row-height-auto td .cell,
|
|
1586
|
+
.bk-table .bk-table-body table tbody tr.row-height-auto td .cell {
|
|
1587
|
+
display: flex;
|
|
1588
|
+
align-items: center;
|
|
1589
|
+
height: auto;
|
|
1590
|
+
min-height: calc(var(--row-min-height, 42px) - 4px);
|
|
1591
|
+
white-space: normal;
|
|
1592
|
+
overflow: visible;
|
|
1593
|
+
text-overflow: unset;
|
|
1594
|
+
word-break: break-word;
|
|
1595
|
+
line-height: normal;
|
|
1596
|
+
}
|
|
1576
1597
|
.bk-table .bk-table-head table tbody tr:hover.hover-highlight td:not(.empty-cell),
|
|
1577
1598
|
.bk-table .bk-table-body table tbody tr:hover.hover-highlight td:not(.empty-cell) {
|
|
1578
1599
|
background: #f5f7fa;
|
|
@@ -1633,22 +1654,46 @@
|
|
|
1633
1654
|
.bk-table .bk-table-footer.is-hidden {
|
|
1634
1655
|
display: none;
|
|
1635
1656
|
}
|
|
1657
|
+
.bk-table .bk-table-footer:not(.is-hidden) {
|
|
1658
|
+
border-top: 1px solid #dcdee5;
|
|
1659
|
+
}
|
|
1636
1660
|
.bk-table.bordered-row .bk-table-head {
|
|
1637
1661
|
border-bottom: 1px solid #dcdee5;
|
|
1638
1662
|
}
|
|
1639
1663
|
.bk-table.bordered-row .bk-table-body tbody tr td {
|
|
1640
1664
|
border-bottom-color: #dcdee5;
|
|
1641
1665
|
}
|
|
1642
|
-
.bk-table.bordered-outer {
|
|
1666
|
+
.bk-table.bordered-outer .bk-table-body-wrapper {
|
|
1643
1667
|
border: 1px solid #dcdee5;
|
|
1668
|
+
border-radius: 2px;
|
|
1669
|
+
box-sizing: border-box;
|
|
1670
|
+
}
|
|
1671
|
+
.bk-table.bordered-outer .bk-table-footer:not(.is-hidden) {
|
|
1672
|
+
border-left: 1px solid #dcdee5;
|
|
1673
|
+
border-right: 1px solid #dcdee5;
|
|
1674
|
+
border-bottom: 1px solid #dcdee5;
|
|
1675
|
+
border-radius: 0 0 2px 2px;
|
|
1676
|
+
box-sizing: border-box;
|
|
1677
|
+
}
|
|
1678
|
+
.bk-table.bordered-outer .bk-table-body-wrapper:has( ~ .bk-table-footer:not(.is-hidden)) {
|
|
1679
|
+
border-bottom: none;
|
|
1680
|
+
border-radius: 2px 2px 0 0;
|
|
1644
1681
|
}
|
|
1645
|
-
.bk-table.bordered-horizontal {
|
|
1682
|
+
.bk-table.bordered-horizontal .bk-table-body-wrapper {
|
|
1646
1683
|
border-top: 1px solid #dcdee5;
|
|
1647
1684
|
border-bottom: 1px solid #dcdee5;
|
|
1685
|
+
box-sizing: border-box;
|
|
1648
1686
|
}
|
|
1649
|
-
.bk-table.bordered-
|
|
1650
|
-
.bk-table.bordered-horizontal .__is-empty .bk-table-body-content {
|
|
1687
|
+
.bk-table.bordered-horizontal .bk-table-footer:not(.is-hidden) {
|
|
1651
1688
|
border-bottom: 1px solid #dcdee5;
|
|
1689
|
+
box-sizing: border-box;
|
|
1690
|
+
}
|
|
1691
|
+
.bk-table.bordered-horizontal .bk-table-body-wrapper:has( ~ .bk-table-footer:not(.is-hidden)) {
|
|
1692
|
+
border-bottom: none;
|
|
1693
|
+
}
|
|
1694
|
+
.bk-table.bordered-outer .bk-table-body tbody tr:last-child td,
|
|
1695
|
+
.bk-table.bordered-horizontal .bk-table-body tbody tr:last-child td {
|
|
1696
|
+
border-bottom-color: white;
|
|
1652
1697
|
}
|
|
1653
1698
|
.bk-table.bordered-col .bk-table-head {
|
|
1654
1699
|
border-right: 1px solid #dcdee5;
|
|
@@ -1674,6 +1719,12 @@
|
|
|
1674
1719
|
.bk-table.bordered-col .bk-table-body tbody tr:hover.hover-highlight td:not(.empty-cell) {
|
|
1675
1720
|
border-right-color: #dcdee5;
|
|
1676
1721
|
}
|
|
1722
|
+
.bk-table.bordered-col.bordered-outer .bk-table-head {
|
|
1723
|
+
border-right: none;
|
|
1724
|
+
}
|
|
1725
|
+
.bk-table.bordered-col.bordered-outer .bk-table-body {
|
|
1726
|
+
border-right: none;
|
|
1727
|
+
}
|
|
1677
1728
|
.bk-table th,
|
|
1678
1729
|
.bk-table td {
|
|
1679
1730
|
border-right: 1px solid white;
|
package/lib/tag-input/index.js
CHANGED
|
@@ -1462,12 +1462,10 @@ function renderContent(opts) {
|
|
|
1462
1462
|
theme = opts.theme,
|
|
1463
1463
|
extCls = opts.extCls;
|
|
1464
1464
|
var isLight = theme === 'light';
|
|
1465
|
-
var zIndex = shared_namespaceObject.bkZIndexManager.getPopperIndex();
|
|
1466
1465
|
var content = document.createElement('div');
|
|
1467
1466
|
var prefix = document.documentElement.style.getPropertyValue('--bk-prefix') || 'bk';
|
|
1468
1467
|
content.className = "".concat((0,shared_namespaceObject.resolveClassName)('popper', prefix), " ").concat(isLight ? 'light' : 'dark', " ").concat(extCls);
|
|
1469
1468
|
content.innerText = value;
|
|
1470
|
-
content.style.zIndex = String(zIndex);
|
|
1471
1469
|
renderContext(value, content);
|
|
1472
1470
|
if (hasArrow) {
|
|
1473
1471
|
var arrow = renderArrow();
|
|
@@ -1546,6 +1544,7 @@ function show(el) {
|
|
|
1546
1544
|
_opts$modifiers = opts.modifiers,
|
|
1547
1545
|
modifiers = _opts$modifiers === void 0 ? [] : _opts$modifiers;
|
|
1548
1546
|
if (disabled) return;
|
|
1547
|
+
popper.style.zIndex = String(shared_namespaceObject.bkZIndexManager.getPopperIndex());
|
|
1549
1548
|
renderContext(content, popper);
|
|
1550
1549
|
if (hasArrow) {
|
|
1551
1550
|
var arrow = renderArrow();
|
package/lib/tree/index.js
CHANGED
|
@@ -19065,8 +19065,9 @@ var use_node_action_this = undefined;
|
|
|
19065
19065
|
}
|
|
19066
19066
|
/**
|
|
19067
19067
|
* 处理异步节点多层级展开选中
|
|
19068
|
+
* 仅在 autoOpen 为 true 时才触发异步加载和展开
|
|
19068
19069
|
*/
|
|
19069
|
-
if (getNodeAttr(resolvedItem, NODE_ATTRIBUTES.IS_ASYNC)) {
|
|
19070
|
+
if (autoOpen && getNodeAttr(resolvedItem, NODE_ATTRIBUTES.IS_ASYNC)) {
|
|
19070
19071
|
if (isRemoteFnExec(event)) {
|
|
19071
19072
|
asyncNodeClick(resolvedItem).then(function () {
|
|
19072
19073
|
(0,external_vue_namespaceObject.nextTick)(function () {
|
|
@@ -19105,11 +19106,7 @@ var use_node_action_this = undefined;
|
|
|
19105
19106
|
var isCheckboxEvent = event === 'checked';
|
|
19106
19107
|
// 1. 处理 selected 行为:选中节点
|
|
19107
19108
|
if (nodeActions.includes('selected')) {
|
|
19108
|
-
|
|
19109
|
-
// 让展开/收起逻辑由 expand/collapse 单独处理
|
|
19110
|
-
var hasExpandOrCollapse = nodeActions.includes('expand') || nodeActions.includes('collapse');
|
|
19111
|
-
var autoOpen = !hasExpandOrCollapse;
|
|
19112
|
-
_setSelect(item, true, autoOpen, true, event);
|
|
19109
|
+
_setSelect(item, true, false, true, event);
|
|
19113
19110
|
}
|
|
19114
19111
|
// 2. 处理 expand 行为:仅当节点是收起状态时展开
|
|
19115
19112
|
if (nodeActions.includes('expand') && !isOpened && !isCheckboxEvent) {
|