You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
类型“MenuItemType | SubMenuType | MenuItemGroupType | MenuDividerType”上不存在属性“children”。 类型“MenuItemType”上不存在属性“children”
类型“MenuItemType | SubMenuType | MenuItemGroupType | MenuDividerType”上不存在属性“children”。 类型“MenuItemType”上不存在属性“children”
let parentId = ''
let newMenuTarget: {[id: string]: ItemType} = {}
while(oldMenus.length) {
const item = oldMenus.shift() as IModelsGlobal['menu'][number]
const menuItem: ItemType = {
key: item.id,
icon: <i className="anticon">
<i className={`iconfont ${item.icon}`} />
</i>,
label: item.title
newMenuTarget[item.id] = menuItem
if (item.children) {
oldMenus.push(...item.children)
const {parent_id} = item
if (parent_id && newMenuTarget[parent_id]) {
const target = newMenuTarget[parent_id as string]
if (target?.children) {
target.children.push(menuItem)
我该如何解决这个错误提示。