menuList:[{
path: '/contacts',
name: 'contacts',
component: () => import('@/views/Contacts/index.vue'),
meta: {
title: 'Contacts',
icon: ' icon-contacts',
iconActive: ' icon-contacts',
hidden: false,
ishowiconActive: false
}
},
{
path: '/contacts',
name: 'contacts',
component: () => import('@/views/Contacts/index.vue'),
meta: {
title: 'Contacts',
icon: ' icon-contacts',
iconActive: ' icon-contacts',
hidden: false,
ishowiconActive: false
}
},
]
报错: data.menuList[i].meta.hidden = false
更正后:(data.menuList[i].meta as any).ishowiconActive = false
重点:为data.menuList[i].meta 指定类型
Object is possibly ‘undefined‘ (2532) 2022/8/4am
最新推荐文章于 2024-08-06 10:00:04 发布