Skip to content

Commit

Permalink
fix tagView bug
Browse files Browse the repository at this point in the history
  • Loading branch information
uncleLian committed Aug 23, 2019
1 parent 26d2b3c commit 0616fd6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions src/store/modules/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ function setRedirect(routes, redirect = '') {
let redirectName = defaultRedirectRoute.name
route.redirect = `${redirect}/${route.name}/${redirectName}`
}
// let index = route.redirect && route.redirect.lastIndexOf('/')
// let fatherDir = route.redirect && route.redirect.substring(0, index)
let fatherDir = route.redirect && `${redirect}/${route.name}`
route.children = setRedirect(route.children, fatherDir)
}
Expand Down
2 changes: 1 addition & 1 deletion src/store/modules/tagsView.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default {
const isHas = state.tagsView.some((v, index) => {
if (v.path === view.path) {
// 存在时进行替换(场景:参数变化)
state.tagsView.splice(index, 1, view)
state.tagsView.splice(index, 1, { ...view })
return true
}
})
Expand Down

0 comments on commit 0616fd6

Please sign in to comment.