我收到此类错误:
import * as i18next from 'i18next';
export default [
{
label: 'config:leftnav.Dashboard',
icon: 'svg-icon-nav-dashboard',
children: [
{
label: 'config:leftnav.Overview',
sref: 'global.nav.overview'
}, {
label: 'config:leftnav.Performance',
sref: 'global.nav.dashboard'
}, {
label: 'config:leftnav.ClusterView',
sref: 'global.nav.clusterDashboard'
}
]
},
import leftNavConfig from './leftnav-config';
for(var i=0;i<=leftNavConfig.length-1;i++){
leftNavConfig[i].label= i18next.t(leftNavConfig[i].label);
for( var j=0;j<=leftNavConfig[i].**children**.length-1;j++) {
leftNavConfig[i].**children**[j].label=i18next.t(leftNavConfig[i].**children**[j].label);
}
}
我收到以下错误
Property 'children' does not exist on type '{ label: string; icon: string; children: { label: string; sref: string; }[]; } | { label: string;...'.
Property 'children' does not exist on type '{ label: string; icon: string; sref: string; }'.