增加修改标签标题的方法
This commit is contained in:
parent
c9da05eb8f
commit
3e496015f5
|
|
@ -214,6 +214,21 @@ export default {
|
|||
await router.push(routerObj)
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @class opened
|
||||
* @description 关闭一个 tag (关闭一个页面)
|
||||
* @param {Object} context
|
||||
* @param {Object} payload { tagName: 要更新的标签名字, title: 新的标签名字 }
|
||||
*/
|
||||
update ({ state }, { tagName, title }) {
|
||||
const index = state.opened.findIndex(page => page.fullPath === tagName)
|
||||
if (index === 0) {
|
||||
return
|
||||
}
|
||||
if (title && state.opened[index]) {
|
||||
state.opened[index].meta.title = title
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @class opened
|
||||
* @description 关闭当前标签左边的标签
|
||||
|
|
|
|||
Loading…
Reference in New Issue