@@ -214,6 +214,21 @@ export default {
|
|||||||
await router.push(routerObj)
|
await router.push(routerObj)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* @class opened
|
||||||
|
* @description 更新一个 tag title
|
||||||
|
* @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
|
* @class opened
|
||||||
* @description 关闭当前标签左边的标签
|
* @description 关闭当前标签左边的标签
|
||||||
|
|||||||
Reference in New Issue
Block a user