修复消息跳转tab显示不对问题

This commit is contained in:
guoyue 2022-10-11 16:40:22 +08:00
parent 1382f22cb5
commit 177cc4e9c7
1 changed files with 18 additions and 6 deletions

View File

@ -76,6 +76,8 @@ export default defineComponent({
const type = JSON.parse(window.sessionStorage.getItem('type'))
if (type) {
selectedKeys.value = [type]
console.log('selectedKeys------------>', selectedKeys);
}
const handleClick = (item) => {
console.log('click', item)
@ -83,11 +85,21 @@ export default defineComponent({
}
onMounted(() => {
if (itShowXiHaiAn) {
handleClick(menuList[0])
} else {
if (type) {
console.log('type---------->', type)
let _obj = menuList.find(v => v.key == type)
handleClick(_obj)
} else {
if (menuList[1]) {
handleClick(menuList[1])
}else {
handleClick(menuList[0])
}
}
}
})
return {