AdminForthConfigMenuItem
Menu item which displayed in the left sidebar of the admin panel.
Properties
_itemId?
optional
_itemId:string
Item id will be automatically generated from hashed resourceId+Path+label
badge?
optional
badge:string
| (user
) =>Promise
<string
>
Optional callback which will be called before rendering the menu for each item. Result of callback if not null will be used as a small badge near the menu item.
children?
optional
children:AdminForthConfigMenuItem
[]
Children menu items which will be displayed in this group. Supported for AdminForthMenuTypes.GROUP only!
component?
optional
component:string
Component to be used for this menu item. Component should be placed in custom folder and referenced with @@/
prefix.
Supported for AdminForthMenuTypes.PAGE only!
Example:
component: '@@/Dashboard.vue',
homepage?
optional
homepage:boolean
If true, group will be open by default after user login to the admin panel. Also will be used to redirect from root path.
icon?
optional
icon:string
Icon for menu item which will be displayed in the admin panel.
Supports iconify icons in format <icon set name>:<icon name>
Browse available icons here: https://icon-sets.iconify.design/
Example:
icon: 'flowbite:brain-solid',
isStaticRoute?
optional
isStaticRoute:boolean
By default all pages are imported dynamically with lazy import(). If you wish to import page statically, set this option to true. Homepage will be imported statically by default. but you can override it with this option.
label?
optional
label:string
Label for menu item which will be displayed in the admin panel.
meta?
optional
meta:object
title?
optional
title:string
open?
optional
open:boolean
Where Group is open by default Supported for AdminForthMenuTypes.GROUP only!
path?
optional
path:string
Path to custom component which will be displayed in the admin panel.
resourceId?
optional
resourceId:string
Resource ID which will be used to fetch data from. Supported for AdminForthMenuTypes.RESOURCE only!
type?
optional
type:"resource"
|"heading"
|"group"
|"page"
|"gap"
|"divider"
|AdminForthMenuTypes
visible()?
optional
visible: (user
) =>boolean
Optional callback which will be called before rendering the menu for each item. You can use it to hide menu items depending on some user
Parameters
Parameter | Type |
---|---|
user | AdminUser |
Returns
boolean