@@ -20,9 +20,12 @@
separatorClass: ''
};
},
+
+ inject: ['elBreadcrumb'],
mounted() {
- this.separator = this.$parent.separator;
- this.separatorClass = this.$parent.separatorClass;
+ this.separator = this.elBreadcrumb.separator;
+ this.separatorClass = this.elBreadcrumb.separatorClass;
let self = this;
if (this.to) {
let link = this.$refs.link;
@@ -17,6 +17,13 @@
default: ''
}
+ provide() {
+ return {
+ elBreadcrumb: this
+ };
+ },
const items = this.$el.querySelectorAll('.el-breadcrumb__item');
items[items.length - 1].setAttribute('aria-current', 'page');