修复消息跳转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

@ -29,9 +29,9 @@ export default defineComponent({
}
const apply = {
title: '我的申请',
img: require('@/assets/personalCenter/apply.png'),
imgActive: require('@/assets/personalCenter/applyactive.png'),
key: 'apply',
img: require('@/assets/personalCenter/apply.png'),
imgActive: require('@/assets/personalCenter/applyactive.png'),
key: 'apply',
}
let menuList = [
car,
@ -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,10 +85,20 @@ export default defineComponent({
}
onMounted(() => {
if (menuList[1]) {
handleClick(menuList[1])
} else {
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])
}
}
}
})