menu

package
v4.1.5 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(name string, menu *Menu)

func Unregister

func Unregister(name string)

Types

type Item

type Item struct {
	Name       string         `json:"name,omitempty"`
	Type       string         `json:"type,omitempty"` //route 路由, web 嵌入web, window 独立弹出
	Url        string         `json:"url,omitempty"`
	Query      map[string]any `json:"query,omitempty"`
	Privileges []string       `json:"privileges,omitempty"`
}
type Menu struct {
	Name       string   `json:"name"`
	Icon       string   `json:"icon,omitempty"`
	Domain     []string `json:"domain"` //域 admin project 或 dealer等
	Privileges []string `json:"privileges,omitempty"`
	Items      []*Item  `json:"items"`
}

Jump to

Keyboard shortcuts

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