Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
<span>{{leafItem.name}}</span>
<span>{{item.name}}</span>
`;
static components = {
's-menu': Menu,
's-sub-menu': Menu.Sub,
's-menu-item': Menu.Item,
's-menu-item-group': Menu.MenuItemGroup
};
static computed = {
defaultOpenKeys() {
const routes = this.data.get('routes');
return routes.map(item => item.key);
},
selectedKeys() {
return [this.data.get('currentPath')];
},
count() {
let routes = this.data.get('routes').filter(route => route.list);
let count = 0;
routes.forEach(route => {
route.list.forEach(r => {
count += r.leaf.length;