mirror of
https://gitee.com/ElemeFE/element.git
synced 2024-12-02 04:08:10 +08:00
Tree & Breadcrumb: fix setAttribute to undefined bug
This commit is contained in:
parent
f24aeeca00
commit
ed511e9219
@ -26,7 +26,9 @@
|
||||
|
||||
mounted() {
|
||||
const items = this.$el.querySelectorAll('.el-breadcrumb__item');
|
||||
items[items.length - 1].setAttribute('aria-current', 'page');
|
||||
if (items.length) {
|
||||
items[items.length - 1].setAttribute('aria-current', 'page');
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -194,7 +194,7 @@
|
||||
checkedItem[0].setAttribute('tabindex', 0);
|
||||
return;
|
||||
}
|
||||
this.treeItems[0].setAttribute('tabindex', 0);
|
||||
this.treeItems[0] && this.treeItems[0].setAttribute('tabindex', 0);
|
||||
},
|
||||
handelKeydown(ev) {
|
||||
const currentItem = ev.target;
|
||||
|
Loading…
Reference in New Issue
Block a user