Commit 8e191fbb authored by jingnan's avatar jingnan 👀

Tags页签偶尔会出现重复修改

parent b34796b3
......@@ -222,7 +222,16 @@ export default {
Object.keys(this.$store.state.tagsView.visitedViews).forEach(key => {
list = [...list, ...this.$store.state.tagsView.visitedViews[key]]
})
this.$set(this, 'visitedViews', list.filter(x => (x.path !== '/home' && x.path !== '/businessHome' && x.path !== '/systemHome' && x.path !== '/DevopsHome' && x.path !== '/safeHome')))
const filterViews = list.filter(x => (x.path !== '/home' && x.path !== '/businessHome' && x.path !== '/systemHome' && x.path !== '/DevopsHome' && x.path !== '/safeHome'))
const tempViews = filterViews.reduce((acc, current) => {
const exists = acc.find(item => item.title === current.title)
if (!exists) {
acc.push(current)
}
return acc
}, [])
this.$set(this, 'visitedViews', tempViews)
// this.$set(this, 'visitedViews', list.filter(x => (x.path !== '/home' && x.path !== '/businessHome' && x.path !== '/systemHome' && x.path !== '/DevopsHome' && x.path !== '/safeHome')))
}
}, 0)
},
......
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