@britecore/bc-design-system 3.32.1 → 3.32.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/lib/actions-failure-dialog.js +6 -6
- package/lib/alert.js +6 -6
- package/lib/autocomplete.js +14 -14
- package/lib/badge.js +6 -6
- package/lib/breadcrumb-item.js +9 -8
- package/lib/breadcrumb.js +89 -15
- package/lib/breakpoint.js +14 -14
- package/lib/button-link.js +6 -6
- package/lib/card.js +6 -6
- package/lib/cascader-panel.js +6 -6
- package/lib/cascader.js +21 -21
- package/lib/col.js +4 -4
- package/lib/collapse-item.js +6 -6
- package/lib/collapse.js +6 -6
- package/lib/data-filter.js +6 -6
- package/lib/data-table-action-buttons.js +6 -6
- package/lib/data-table-cell.js +8 -8
- package/lib/data-table-collapsible-row.js +6 -6
- package/lib/data-table-column-header.js +4 -4
- package/lib/data-table-column.js +4 -4
- package/lib/data-table-row.js +6 -6
- package/lib/data-table.js +78 -74
- package/lib/date-display.js +8 -8
- package/lib/date-picker.js +11 -11
- package/lib/dialog.js +2 -2
- package/lib/dropdown.js +25 -25
- package/lib/element-ui.common.js +713 -647
- package/lib/filter-badges.js +6 -6
- package/lib/filter-button.js +6 -6
- package/lib/filters-display.js +18 -18
- package/lib/form-filter-item.js +7 -7
- package/lib/form-filter.js +7 -7
- package/lib/form-item.js +6 -6
- package/lib/form.js +6 -6
- package/lib/index.js +1 -1
- package/lib/infinite-scroll.js +8 -8
- package/lib/inline-editor.js +6 -6
- package/lib/inline-status.js +6 -6
- package/lib/input-number.js +2 -2
- package/lib/input-password.js +21 -21
- package/lib/input-phone-number.js +12 -12
- package/lib/input-tag.js +8 -8
- package/lib/input-validation-code.js +17 -17
- package/lib/input.js +3 -3
- package/lib/list-group-item.js +6 -6
- package/lib/list-group.js +6 -6
- package/lib/loading-wrapper.js +6 -6
- package/lib/loading.js +10 -10
- package/lib/message-box.js +2 -2
- package/lib/notification.js +8 -8
- package/lib/pagination.js +74 -74
- package/lib/radio-filter.js +6 -6
- package/lib/row.js +4 -4
- package/lib/scrollbar.js +6 -6
- package/lib/search.js +6 -6
- package/lib/select-filter.js +6 -6
- package/lib/select.js +13 -13
- package/lib/slider.js +14 -14
- package/lib/spinner.js +6 -6
- package/lib/spreadsheet-preview.js +8 -8
- package/lib/step.js +6 -6
- package/lib/steps.js +8 -8
- package/lib/switch.js +2 -2
- package/lib/tab-pane.js +6 -6
- package/lib/table.js +15 -15
- package/lib/tabs.js +12 -12
- package/lib/theme-chalk/breadcrumb.css +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/lib/time-picker.js +11 -11
- package/lib/time-select.js +11 -11
- package/lib/tooltip.js +2 -2
- package/lib/transfer.js +13 -13
- package/lib/tree.js +18 -18
- package/lib/upload.js +41 -41
- package/package.json +1 -1
- package/packages/breadcrumb/src/breadcrumb-item.vue +1 -0
- package/packages/breadcrumb/src/breadcrumb.vue +48 -5
- package/packages/data-table/src/DataTable.vue +2 -0
- package/packages/theme-chalk/lib/breadcrumb.css +1 -1
- package/packages/theme-chalk/lib/index.css +1 -1
- package/packages/theme-chalk/src/breadcrumb.scss +12 -3
- package/src/index.js +1 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="el-breadcrumb" aria-label="Breadcrumb" role="navigation">
|
|
3
|
-
<slot></slot>
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
1
|
<script>
|
|
2
|
+
import { get } from 'lodash';
|
|
3
|
+
|
|
4
|
+
const ITEMS_AFTER_TRUNCATION = 3; // items are partitioned in the format [0], [rest of the items - ITEMS_AFTER_TRUNCATION], [ITEMS_AFTER_TRUNCATION]
|
|
5
|
+
|
|
6
|
+
const isBreadcrumbItem = node => get(node, 'componentOptions.tag') === 'el-breadcrumb-item';
|
|
7
|
+
|
|
7
8
|
export default {
|
|
8
9
|
name: 'ElBreadcrumb',
|
|
9
10
|
|
|
@@ -18,6 +19,48 @@
|
|
|
18
19
|
if (items.length) {
|
|
19
20
|
items[items.length - 1].setAttribute('aria-current', 'page');
|
|
20
21
|
}
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
render() {
|
|
25
|
+
const breadcrumbItems = this.$slots.default && this.$slots.default.length
|
|
26
|
+
? this.$slots.default.filter(vnode => isBreadcrumbItem(vnode))
|
|
27
|
+
: [];
|
|
28
|
+
const [itemsBeforeTruncation, itemsBeingTruncated, itemsAfterTruncation] = [[], [], []];
|
|
29
|
+
|
|
30
|
+
// partition the passed items into arrays of lengths
|
|
31
|
+
// `1`, `length - 1 - ITEMS_AFTER_TRUNCATION` and `ITEMS_AFTER_TRUNCATION` respectively
|
|
32
|
+
for (let item of breadcrumbItems) {
|
|
33
|
+
if (itemsBeforeTruncation.length < 1) itemsBeforeTruncation.push(item);
|
|
34
|
+
else if (itemsAfterTruncation.length < ITEMS_AFTER_TRUNCATION) itemsAfterTruncation.push(item);
|
|
35
|
+
else {
|
|
36
|
+
itemsBeingTruncated.push(itemsAfterTruncation.shift());
|
|
37
|
+
itemsAfterTruncation.push(item);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// no need to add the dropdown if only a single item is being truncated
|
|
42
|
+
const truncatedItemsComponent = itemsBeingTruncated.length > 1 ? (
|
|
43
|
+
<el-breadcrumb-item>
|
|
44
|
+
<el-dropdown placement="bottom">
|
|
45
|
+
<a class="el-dropdown-link">
|
|
46
|
+
<fa-icon icon={['far', 'ellipsis-h']}></fa-icon>
|
|
47
|
+
</a>
|
|
48
|
+
<el-dropdown-menu class="el-breadcrumb__truncation-dropdown" slot="dropdown">
|
|
49
|
+
{itemsBeingTruncated.map(item => (
|
|
50
|
+
<el-dropdown-item>{item}</el-dropdown-item>
|
|
51
|
+
))}
|
|
52
|
+
</el-dropdown-menu>
|
|
53
|
+
</el-dropdown>
|
|
54
|
+
</el-breadcrumb-item>
|
|
55
|
+
) : itemsBeingTruncated;
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<div class="el-breadcrumb" aria-label="Breadcrumb" role="navigation">
|
|
59
|
+
{ itemsBeforeTruncation }
|
|
60
|
+
{ truncatedItemsComponent }
|
|
61
|
+
{ itemsAfterTruncation }
|
|
62
|
+
</div>
|
|
63
|
+
);
|
|
21
64
|
}
|
|
22
65
|
};
|
|
23
66
|
</script>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:export{xsOnly:(max-width: 767px);smOnly:(min-width: 768px) and (max-width: 991px);smAndDown:(max-width: 991px);smAndUp:(min-width: 768px);mdOnly:(min-width: 992px) and (max-width: 1199px);mdAndDown:(max-width: 1199px);mdAndUp:(min-width: 992px);lgOnly:(min-width: 1200px) and (max-width: 1919px);lgAndDown:(max-width: 1919px);lgAndUp:(min-width: 1200px);xlOnly:(min-width: 1920px)}.el-breadcrumb{font-size:
|
|
1
|
+
:export{xsOnly:(max-width: 767px);smOnly:(min-width: 768px) and (max-width: 991px);smAndDown:(max-width: 991px);smAndUp:(min-width: 768px);mdOnly:(min-width: 992px) and (max-width: 1199px);mdAndDown:(max-width: 1199px);mdAndUp:(min-width: 992px);lgOnly:(min-width: 1200px) and (max-width: 1919px);lgAndDown:(max-width: 1919px);lgAndUp:(min-width: 1200px);xlOnly:(min-width: 1920px)}.el-breadcrumb{font-size:15px;line-height:1}.el-breadcrumb::after,.el-breadcrumb::before{display:table;content:""}.el-breadcrumb::after{clear:both}.el-breadcrumb__separator{margin:auto 9px;font-weight:700;color:#82a9b0}.el-breadcrumb__separator[class*=icon]{margin:0 6px;font-weight:400}.el-breadcrumb__item{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.el-breadcrumb__item:last-child .el-breadcrumb__inner,.el-breadcrumb__item:last-child .el-breadcrumb__inner a,.el-breadcrumb__item:last-child .el-breadcrumb__inner a:hover,.el-breadcrumb__item:last-child .el-breadcrumb__inner:hover{font-weight:400;color:#2b4145;cursor:text}.el-breadcrumb__item:last-child .el-breadcrumb__separator{display:none}.el-breadcrumb__truncation-dropdown .el-breadcrumb__item:last-child .el-breadcrumb__inner,.el-breadcrumb__truncation-dropdown .el-breadcrumb__item:last-child .el-breadcrumb__inner a,.el-breadcrumb__truncation-dropdown .el-breadcrumb__item:last-child .el-breadcrumb__inner a:hover,.el-breadcrumb__truncation-dropdown .el-breadcrumb__item:last-child .el-breadcrumb__inner:hover{cursor:pointer}.el-breadcrumb__inner{color:#2b4145;margin-top:auto;margin-bottom:auto}.el-breadcrumb__inner a,.el-breadcrumb__inner.is-link{font-weight:700;text-decoration:none;-webkit-transition:color .2s cubic-bezier(.645,.045,.355,1);transition:color .2s cubic-bezier(.645,.045,.355,1);color:#182426}.el-breadcrumb__inner a:hover,.el-breadcrumb__inner.is-link:hover{color:#08859b;cursor:pointer}
|