app/@overflow/commons/ui/component/menu/menu-bar.component.ts
2018-08-17 15:27:22 +09:00

97 lines
2.0 KiB
TypeScript

import { Component, OnInit } from '@angular/core';
import { MenuItem } from 'primeng/primeng';
@Component({
selector: 'app-menu-bar',
templateUrl: './menu-bar.component.html',
})
export class MenuBarComponent implements OnInit {
private items: MenuItem[];
constructor(
) { }
ngOnInit() {
this.items = [
{
label: 'File',
icon: 'pi pi-fw pi-file',
items: [{
label: 'New',
icon: 'pi pi-fw pi-plus',
items: [
{ label: 'Project' },
{ label: 'Other' },
]
},
{ label: 'Open' },
{ separator: true },
{ label: 'Quit' }
]
},
{
label: 'Edit',
icon: 'pi pi-fw pi-pencil',
items: [
{ label: 'Delete', icon: 'pi pi-fw pi-trash' },
{ label: 'Refresh', icon: 'pi pi-fw pi-refresh' }
]
},
{
label: 'Help',
icon: 'pi pi-fw pi-question',
items: [
{
label: 'Contents'
},
{
label: 'Search',
icon: 'pi pi-fw pi-search',
items: [
{
label: 'Text',
items: [
{
label: 'Workspace'
}
]
},
{
label: 'File'
}
]
}
]
},
{
label: 'Actions',
icon: 'pi pi-fw pi-cog',
items: [
{
label: 'Edit',
icon: 'pi pi-fw pi-pencil',
items: [
{ label: 'Save', icon: 'pi pi-fw pi-save' },
{ label: 'Update', icon: 'pi pi-fw pi-save' },
]
},
{
label: 'Other',
icon: 'pi pi-fw pi-tags',
items: [
{ label: 'Delete', icon: 'pi pi-fw pi-minus' }
]
}
]
},
{
label: 'Quit', icon: 'pi pi-fw pi-times'
}
];
}
onTitlebarDoubleClick() {
}
}