1.定时器完成文字的移动
2.watch 中的$route
watch: {
$route: {
handler(v, a) {
if (this.pageList.find(item => item.path == v.path)) {
return false
} else {
this.pageList.push({ path: v.path, meta: v.meta })
sessionStorage.setItem('pageList', JSON.stringify(this.pageList))
this.$nextTick(() => {
if (this.hasScrolled(this.$refs.domScroll.$el, 'horizontal')) {
this.$refs.domScroll.$el.scrollLeft = this.$refs.domScroll.$el.scrollWidth
}
})
}
},
面包屑导航监视路径的变化来动态生成标签