menu

package
v0.0.0-...-b9c356b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ItemModel

type ItemModel struct {
	Key               string    `json:"key"`
	Title             string    `json:"title"`
	RoutePath         string    `json:"route_path"`
	RelevantRoutePath []string  `json:"relevant_route_path"` // route_path没有权限的话,关联的路由也没有权限
	Show              bool      `json:"show"`
	Leaf              bool      `json:"leaf"`
	Children          ListModel `json:"children"`
}

type ListModel

type ListModel []*ItemModel
type Menu struct {
	// contains filtered or unexported fields
}

Menu 菜单

func Instance

func Instance() *Menu
func (m *Menu) GetAllKeyData() (re map[string]*ItemModel)

GetAllKeyData 获取所有子路由数据用map返回

func (m *Menu) GetList() (re ListModel)
func (m *Menu) GetRelevantRoutePathByKey(key string) (re []string)

GetRelevantRoutePathByKey 通过key获取关联的路由

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL