Commit 14eef644 authored by qingming's avatar qingming Committed by 杨奕

Breadcrumb: code optimization (#10817)

parent b414efdd
......@@ -29,14 +29,13 @@
mounted() {
this.separator = this.elBreadcrumb.separator;
this.separatorClass = this.elBreadcrumb.separatorClass;
let self = this;
if (this.to) {
let link = this.$refs.link;
let to = this.to;
link.setAttribute('role', 'link');
link.addEventListener('click', _ => {
let to = this.to;
self.replace ? self.$router.replace(to)
: self.$router.push(to);
this.replace ? this.$router.replace(to)
: this.$router.push(to);
});
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment