AdminForthConfigMenuItem
Menu item which displayed in the left sidebar of the admin panel.
Properties
badge?
optionalbadge: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.
badgeTooltip?
optionalbadgeTooltip:string
Tooltip shown on hover for badge
children?
optionalchildren:AdminForthConfigMenuItem[]
Children menu items which will be displayed in this group. Supported for AdminForthMenuTypes.GROUP only!
component?
optionalcomponent: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?
optionalhomepage: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?
optionalicon: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?
optionalisStaticRoute: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.
itemId?
optionalitemId:string
Item id will be automatically generated from hashed resourceId+Path+label
label?
optionallabel:string
Label for menu item which will be displayed in the admin panel.
meta?
optionalmeta:object
title?
optionaltitle:string
open?
optionalopen:boolean
Where Group is open by default Supported for AdminForthMenuTypes.GROUP only!
path?
optionalpath:string
Path to custom component which will be displayed in the admin panel.
resourceId?
optionalresourceId:string
Resource ID which will be used to fetch data from. Supported for AdminForthMenuTypes.RESOURCE only!
type?
optionaltype:"heading"|"group"|"resource"|"page"|"gap"|"divider"|AdminForthMenuTypes
visible()?
optionalvisible: (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