Documentation ¶
Index ¶
- Constants
- func Render(ctx echo.Context, tmpl string, data interface{}) template.HTML
- type Block
- func (c *Block) IsHidden(ctx echo.Context) (hidden bool)
- func (c *Block) Ready(ctx echo.Context) error
- func (c *Block) SetContentGenerator(content func(echo.Context) error) *Block
- func (c *Block) SetExtra(extra echo.H) *Block
- func (c *Block) SetExtraKV(key string, value interface{}) *Block
- func (c *Block) SetFooter(footer string) *Block
- func (c *Block) SetHidden(hidden bool) *Block
- func (c *Block) SetHiddenDetector(hidden func(echo.Context) bool) *Block
- func (c *Block) SetIdent(ident string) *Block
- func (c *Block) SetTitle(title string) *Block
- func (c *Block) SetTmpl(tmpl string) *Block
- type Blocks
- func (c *Blocks) Add(index int, list ...*Block)
- func (c Blocks) All(ctx echo.Context) Blocks
- func (c *Blocks) FindTmpl(tmpl string) int
- func (c *Blocks) Ready(ctx echo.Context) error
- func (c *Blocks) Register(block ...*Block)
- func (c *Blocks) Remove(index int)
- func (c *Blocks) RemoveByTmpl(tmpl string)
- func (c *Blocks) Search(cb func(*Block) bool) int
- func (c *Blocks) Set(index int, list ...*Block)
- func (c *Blocks) Size() int
- type Button
- type Buttons
- type Card
- type Cards
- func (c *Cards) Add(index int, list ...*Card)
- func (c *Cards) All(_ echo.Context) *Cards
- func (c *Cards) Build(ctx echo.Context) Cards
- func (c *Cards) FindShort(short string) int
- func (c *Cards) Register(card ...*Card)
- func (c *Cards) Remove(index int)
- func (c *Cards) RemoveByShort(tmpl string)
- func (c *Cards) Search(cb func(*Card) bool) int
- func (c *Cards) Set(index int, list ...*Card)
- func (c *Cards) Size() int
- type Dashboard
- func (d *Dashboard) Get(c echo.Context, dtype string) interface{}
- func (d *Dashboard) GetButtonsByGroup(group string) (btn *Buttons)
- func (d *Dashboard) GetExtend(name string) (dashboard *Dashboard)
- func (d *Dashboard) GetOrNewExtend(name string) (dashboard *Dashboard)
- func (d *Dashboard) GetOrNewGroupedButtons(name string) (btn *Buttons)
- func (d *Dashboard) SetExtend(name string, dashboard *Dashboard)
- func (d *Dashboard) SetGroupedButtons(group string, btn *Buttons)
- type GlobalFooter
- type GlobalFooters
- type GlobalHead
- type GlobalHeads
- type IReady
- type IsHidden
- type Page
- type Tmplx
- type Tmplxs
- func (c *Tmplxs) Add(index int, list ...*Tmplx)
- func (c Tmplxs) All(_ echo.Context) Tmplxs
- func (c Tmplxs) ButtonAll(_ echo.Context) Buttons
- func (c *Tmplxs) FindTmpl(tmpl string) int
- func (c Tmplxs) FooterAll(_ echo.Context) GlobalFooters
- func (c Tmplxs) HeadAll(_ echo.Context) GlobalHeads
- func (c *Tmplxs) Ready(ctx echo.Context) error
- func (c *Tmplxs) Register(footer ...*GlobalFooter)
- func (c *Tmplxs) Remove(index int)
- func (c *Tmplxs) RemoveByTmpl(tmpl string)
- func (c Tmplxs) Render(ctx echo.Context) template.HTML
- func (c *Tmplxs) Search(cb func(*Tmplx) bool) int
- func (c *Tmplxs) Set(index int, list ...*Tmplx)
- func (c *Tmplxs) Size() int
Constants ¶
View Source
const ( TypeCards = `Cards` TypeBlocks = `Blocks` TypeGlobalHeads = `GlobalHeads` TypeTopButtons = `TopButtons` TypeGroupedButtons = `GroupedButtons` )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Block ¶
type Block struct { Title string `json:",omitempty" xml:",omitempty"` // 标题 Ident string `json:",omitempty" xml:",omitempty"` // 英文标识 Extra echo.H `json:",omitempty" xml:",omitempty"` // 附加数据 Hidden sql.NullBool Tmpl string //模板文件 // contains filtered or unexported fields }
func (*Block) SetContentGenerator ¶
func (*Block) SetExtraKV ¶
func (*Block) SetHiddenDetector ¶
type Card ¶
type Card struct { IconName string //图标名称:fa-tasks IconColor string //图标颜色:primary、success、danger、warning、info Short string //简称 Name string //中文名称 Summary string //说明 Content interface{} //数字等内容 Hidden sql.NullBool // contains filtered or unexported fields }
func (*Card) SetContentGenerator ¶
type Dashboard ¶
type Dashboard struct { Cards *Cards Blocks *Blocks GlobalHeads *GlobalHeads TopButtons *Buttons GroupedButtons map[string]*Buttons Extend map[string]*Dashboard }
func (*Dashboard) GetButtonsByGroup ¶
func (*Dashboard) GetOrNewExtend ¶
func (*Dashboard) GetOrNewGroupedButtons ¶
func (*Dashboard) SetGroupedButtons ¶
type GlobalFooter ¶
type GlobalFooter = Tmplx
func NewGlobalFooter ¶
func NewGlobalFooter(tmpl string, handle ...func(echo.Context) error) *GlobalFooter
type GlobalFooters ¶
type GlobalFooters = Tmplxs
type GlobalHead ¶
type GlobalHead = Tmplx
func NewGlobalHead ¶
func NewGlobalHead(tmpl string, handle ...func(echo.Context) error) *GlobalHead
type GlobalHeads ¶
type GlobalHeads = Tmplxs
type Tmplx ¶
type Tmplx struct { Tmpl string //模板文件 // contains filtered or unexported fields }
func (*Tmplx) SetContentGenerator ¶
type Tmplxs ¶
type Tmplxs []*Tmplx
func (*Tmplxs) Register ¶
func (c *Tmplxs) Register(footer ...*GlobalFooter)
func (*Tmplxs) RemoveByTmpl ¶
Click to show internal directories.
Click to hide internal directories.