components

package
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComposeHtml

func ComposeHtml(temList map[string]string, compo interface{}, templateName ...string) template.HTML

Types

type AlertAttribute

type AlertAttribute struct {
	Name    string
	Theme   string
	Title   template.HTML
	Content template.HTML
	types.Attribute
}

func (*AlertAttribute) GetContent

func (compo *AlertAttribute) GetContent() template.HTML

func (*AlertAttribute) SetContent

func (compo *AlertAttribute) SetContent(value template.HTML) types.AlertAttribute

func (*AlertAttribute) SetTheme

func (compo *AlertAttribute) SetTheme(value string) types.AlertAttribute

func (*AlertAttribute) SetTitle

func (compo *AlertAttribute) SetTitle(value template.HTML) types.AlertAttribute

type Base

type Base struct {
	Attribute types.Attribute
}

func (Base) Alert

func (b Base) Alert() types.AlertAttribute

func (Base) Box

func (b Base) Box() types.BoxAttribute

func (Base) Button

func (b Base) Button() types.ButtonAttribute

func (Base) Col

func (b Base) Col() types.ColAttribute

func (Base) DataTable

func (b Base) DataTable() types.DataTableAttribute

func (Base) Form

func (b Base) Form() types.FormAttribute

func (Base) Image

func (b Base) Image() types.ImgAttribute

func (Base) Label

func (b Base) Label() types.LabelAttribute

func (Base) Paginator

func (b Base) Paginator() types.PaginatorAttribute

func (Base) Popup

func (b Base) Popup() types.PopupAttribute

func (Base) Row

func (b Base) Row() types.RowAttribute

func (Base) Table

func (b Base) Table() types.TableAttribute

func (Base) Tabs

func (b Base) Tabs() types.TabsAttribute

func (Base) Tree

func (b Base) Tree() types.TreeAttribute

type BoxAttribute

type BoxAttribute struct {
	Name              string
	Header            template.HTML
	Body              template.HTML
	Footer            template.HTML
	Title             template.HTML
	Theme             string
	HeadBorder        string
	HeadColor         string
	SecondHeaderClass string
	SecondHeader      template.HTML
	SecondHeadBorder  string
	SecondHeadColor   string
	Style             template.HTMLAttr
	Padding           string
	types.Attribute
}

func (*BoxAttribute) GetContent

func (compo *BoxAttribute) GetContent() template.HTML

func (*BoxAttribute) SetBody

func (compo *BoxAttribute) SetBody(value template.HTML) types.BoxAttribute

func (*BoxAttribute) SetFooter

func (compo *BoxAttribute) SetFooter(value template.HTML) types.BoxAttribute

func (*BoxAttribute) SetHeadColor

func (compo *BoxAttribute) SetHeadColor(value string) types.BoxAttribute

func (*BoxAttribute) SetHeader

func (compo *BoxAttribute) SetHeader(value template.HTML) types.BoxAttribute

func (*BoxAttribute) SetNoPadding

func (compo *BoxAttribute) SetNoPadding() types.BoxAttribute

func (*BoxAttribute) SetSecondHeadColor

func (compo *BoxAttribute) SetSecondHeadColor(value string) types.BoxAttribute

func (*BoxAttribute) SetSecondHeader

func (compo *BoxAttribute) SetSecondHeader(value template.HTML) types.BoxAttribute

func (*BoxAttribute) SetSecondHeaderClass

func (compo *BoxAttribute) SetSecondHeaderClass(value string) types.BoxAttribute

func (*BoxAttribute) SetTheme

func (compo *BoxAttribute) SetTheme(value string) types.BoxAttribute

func (*BoxAttribute) SetTitle

func (compo *BoxAttribute) SetTitle(value template.HTML) types.BoxAttribute

func (*BoxAttribute) WithHeadBorder

func (compo *BoxAttribute) WithHeadBorder() types.BoxAttribute

func (*BoxAttribute) WithSecondHeadBorder

func (compo *BoxAttribute) WithSecondHeadBorder() types.BoxAttribute

type ButtonAttribute

type ButtonAttribute struct {
	Name        string
	Content     template.HTML
	Orientation string
	LoadingText template.HTML
	Theme       string
	Type        string
	Size        string
	Href        string
	Style       template.HTMLAttr
	MarginLeft  int
	MarginRight int
	types.Attribute
}

func (*ButtonAttribute) GetContent

func (compo *ButtonAttribute) GetContent() template.HTML

func (*ButtonAttribute) SetContent

func (compo *ButtonAttribute) SetContent(value template.HTML) types.ButtonAttribute

func (*ButtonAttribute) SetHref

func (compo *ButtonAttribute) SetHref(href string) types.ButtonAttribute

func (*ButtonAttribute) SetLoadingText

func (compo *ButtonAttribute) SetLoadingText(value template.HTML) types.ButtonAttribute

func (*ButtonAttribute) SetMarginLeft

func (compo *ButtonAttribute) SetMarginLeft(px int) types.ButtonAttribute

func (*ButtonAttribute) SetMarginRight

func (compo *ButtonAttribute) SetMarginRight(px int) types.ButtonAttribute

func (*ButtonAttribute) SetMiddleSize

func (compo *ButtonAttribute) SetMiddleSize() types.ButtonAttribute

func (*ButtonAttribute) SetOrientationLeft

func (compo *ButtonAttribute) SetOrientationLeft() types.ButtonAttribute

func (*ButtonAttribute) SetOrientationRight

func (compo *ButtonAttribute) SetOrientationRight() types.ButtonAttribute

func (*ButtonAttribute) SetSmallSize

func (compo *ButtonAttribute) SetSmallSize() types.ButtonAttribute

func (*ButtonAttribute) SetTheme

func (compo *ButtonAttribute) SetTheme(value string) types.ButtonAttribute

func (*ButtonAttribute) SetThemeDefault

func (compo *ButtonAttribute) SetThemeDefault() types.ButtonAttribute

func (*ButtonAttribute) SetThemePrimary

func (compo *ButtonAttribute) SetThemePrimary() types.ButtonAttribute

func (*ButtonAttribute) SetThemeWarning

func (compo *ButtonAttribute) SetThemeWarning() types.ButtonAttribute

func (*ButtonAttribute) SetType

func (compo *ButtonAttribute) SetType(value string) types.ButtonAttribute

type ColAttribute

type ColAttribute struct {
	Name    string
	Content template.HTML
	Size    string
	types.Attribute
}

func (*ColAttribute) AddContent

func (compo *ColAttribute) AddContent(value template.HTML) types.ColAttribute

func (*ColAttribute) GetContent

func (compo *ColAttribute) GetContent() template.HTML

func (*ColAttribute) SetContent

func (compo *ColAttribute) SetContent(value template.HTML) types.ColAttribute

func (*ColAttribute) SetSize

func (compo *ColAttribute) SetSize(value map[string]string) types.ColAttribute

type DataTableAttribute

type DataTableAttribute struct {
	TableAttribute
	EditUrl          string
	NewUrl           string
	UpdateUrl        string
	DeleteUrl        string
	PrimaryKey       string
	IsTab            bool
	ExportUrl        string
	InfoUrl          string
	Buttons          template.HTML
	ActionJs         template.JS
	IsHideFilterArea bool
	NoAction         bool
	HasFilter        bool
	Action           template.HTML
	types.Attribute
}

func (*DataTableAttribute) GetContent

func (compo *DataTableAttribute) GetContent() template.HTML

func (*DataTableAttribute) GetDataTableHeader

func (compo *DataTableAttribute) GetDataTableHeader() template.HTML

func (*DataTableAttribute) SetAction

func (compo *DataTableAttribute) SetAction(action template.HTML) types.DataTableAttribute

func (*DataTableAttribute) SetActionJs

func (compo *DataTableAttribute) SetActionJs(aj template.JS) types.DataTableAttribute

func (*DataTableAttribute) SetButtons

func (compo *DataTableAttribute) SetButtons(btns template.HTML) types.DataTableAttribute

func (*DataTableAttribute) SetDeleteUrl

func (compo *DataTableAttribute) SetDeleteUrl(value string) types.DataTableAttribute

func (*DataTableAttribute) SetEditUrl

func (compo *DataTableAttribute) SetEditUrl(value string) types.DataTableAttribute

func (*DataTableAttribute) SetExportUrl

func (compo *DataTableAttribute) SetExportUrl(value string) types.DataTableAttribute

func (*DataTableAttribute) SetHasFilter

func (compo *DataTableAttribute) SetHasFilter(hasFilter bool) types.DataTableAttribute

func (*DataTableAttribute) SetHideFilterArea

func (compo *DataTableAttribute) SetHideFilterArea(value bool) types.DataTableAttribute

func (*DataTableAttribute) SetInfoList

func (compo *DataTableAttribute) SetInfoList(value []map[string]template.HTML) types.DataTableAttribute

func (*DataTableAttribute) SetInfoUrl

func (compo *DataTableAttribute) SetInfoUrl(value string) types.DataTableAttribute

func (*DataTableAttribute) SetIsTab

func (compo *DataTableAttribute) SetIsTab(value bool) types.DataTableAttribute

func (*DataTableAttribute) SetNewUrl

func (compo *DataTableAttribute) SetNewUrl(value string) types.DataTableAttribute

func (*DataTableAttribute) SetPrimaryKey

func (compo *DataTableAttribute) SetPrimaryKey(value string) types.DataTableAttribute

func (*DataTableAttribute) SetThead

func (compo *DataTableAttribute) SetThead(value []map[string]string) types.DataTableAttribute

func (*DataTableAttribute) SetUpdateUrl

func (compo *DataTableAttribute) SetUpdateUrl(value string) types.DataTableAttribute

type FormAttribute

type FormAttribute struct {
	Name            string
	Header          template.HTML
	Content         []types.FormField
	ContentList     [][]types.FormField
	Layout          form.Layout
	TabContents     [][]types.FormField
	TabHeaders      []string
	Footer          template.HTML
	Url             string
	Method          string
	PrimaryKey      string
	InfoUrl         string
	CSRFToken       string
	Title           template.HTML
	OperationFooter template.HTML
	Prefix          string
	CdnUrl          string
	types.Attribute
}

func (*FormAttribute) GetBoxHeader

func (compo *FormAttribute) GetBoxHeader() template.HTML

func (*FormAttribute) GetBoxHeaderNoButton

func (compo *FormAttribute) GetBoxHeaderNoButton() template.HTML

func (*FormAttribute) GetContent

func (compo *FormAttribute) GetContent() template.HTML

func (*FormAttribute) SetContent

func (compo *FormAttribute) SetContent(value []types.FormField) types.FormAttribute

func (*FormAttribute) SetFooter

func (compo *FormAttribute) SetFooter(value template.HTML) types.FormAttribute

func (*FormAttribute) SetHeader

func (compo *FormAttribute) SetHeader(value template.HTML) types.FormAttribute

func (*FormAttribute) SetInfoUrl

func (compo *FormAttribute) SetInfoUrl(value string) types.FormAttribute

func (*FormAttribute) SetLayout

func (compo *FormAttribute) SetLayout(layout form.Layout) types.FormAttribute

func (*FormAttribute) SetMethod

func (compo *FormAttribute) SetMethod(value string) types.FormAttribute

func (*FormAttribute) SetOperationFooter

func (compo *FormAttribute) SetOperationFooter(value template.HTML) types.FormAttribute

func (*FormAttribute) SetPrefix

func (compo *FormAttribute) SetPrefix(value string) types.FormAttribute

func (*FormAttribute) SetPrimaryKey

func (compo *FormAttribute) SetPrimaryKey(value string) types.FormAttribute

func (*FormAttribute) SetTabContents

func (compo *FormAttribute) SetTabContents(value [][]types.FormField) types.FormAttribute

func (*FormAttribute) SetTabHeaders

func (compo *FormAttribute) SetTabHeaders(value []string) types.FormAttribute

func (*FormAttribute) SetTitle

func (compo *FormAttribute) SetTitle(value template.HTML) types.FormAttribute

func (*FormAttribute) SetToken

func (compo *FormAttribute) SetToken(value string) types.FormAttribute

func (*FormAttribute) SetUrl

func (compo *FormAttribute) SetUrl(value string) types.FormAttribute

type ImgAttribute

type ImgAttribute struct {
	Name     string
	Width    string
	Height   string
	Uuid     string
	HasModal bool
	Src      template.HTML
	types.Attribute
}

func (*ImgAttribute) GetContent

func (compo *ImgAttribute) GetContent() template.HTML

func (*ImgAttribute) SetHeight

func (compo *ImgAttribute) SetHeight(value string) types.ImgAttribute

func (*ImgAttribute) SetSrc

func (compo *ImgAttribute) SetSrc(value template.HTML) types.ImgAttribute

func (*ImgAttribute) SetWidth

func (compo *ImgAttribute) SetWidth(value string) types.ImgAttribute

func (*ImgAttribute) WithModal

func (compo *ImgAttribute) WithModal() types.ImgAttribute

type LabelAttribute

type LabelAttribute struct {
	Name    string
	Color   template.HTML
	Type    string
	Content template.HTML
	types.Attribute
}

func (*LabelAttribute) GetContent

func (compo *LabelAttribute) GetContent() template.HTML

func (*LabelAttribute) SetColor

func (compo *LabelAttribute) SetColor(value template.HTML) types.LabelAttribute

func (*LabelAttribute) SetContent

func (compo *LabelAttribute) SetContent(value template.HTML) types.LabelAttribute

func (*LabelAttribute) SetType

func (compo *LabelAttribute) SetType(value string) types.LabelAttribute

type PaginatorAttribute

type PaginatorAttribute struct {
	Name              string
	CurPageStartIndex string
	CurPageEndIndex   string
	Total             string
	PreviousClass     string
	PreviousUrl       string
	Pages             []map[string]string
	NextClass         string
	NextUrl           string
	PageSizeList      []string
	Option            map[string]template.HTML
	Url               string
	types.Attribute
}

func (*PaginatorAttribute) GetContent

func (compo *PaginatorAttribute) GetContent() template.HTML

func (*PaginatorAttribute) SetCurPageEndIndex

func (compo *PaginatorAttribute) SetCurPageEndIndex(value string) types.PaginatorAttribute

func (*PaginatorAttribute) SetCurPageStartIndex

func (compo *PaginatorAttribute) SetCurPageStartIndex(value string) types.PaginatorAttribute

func (*PaginatorAttribute) SetNextClass

func (compo *PaginatorAttribute) SetNextClass(value string) types.PaginatorAttribute

func (*PaginatorAttribute) SetNextUrl

func (compo *PaginatorAttribute) SetNextUrl(value string) types.PaginatorAttribute

func (*PaginatorAttribute) SetOption

func (compo *PaginatorAttribute) SetOption(value map[string]template.HTML) types.PaginatorAttribute

func (*PaginatorAttribute) SetPageSizeList

func (compo *PaginatorAttribute) SetPageSizeList(value []string) types.PaginatorAttribute

func (*PaginatorAttribute) SetPages

func (compo *PaginatorAttribute) SetPages(value []map[string]string) types.PaginatorAttribute

func (*PaginatorAttribute) SetPreviousClass

func (compo *PaginatorAttribute) SetPreviousClass(value string) types.PaginatorAttribute

func (*PaginatorAttribute) SetPreviousUrl

func (compo *PaginatorAttribute) SetPreviousUrl(value string) types.PaginatorAttribute

func (*PaginatorAttribute) SetTotal

func (compo *PaginatorAttribute) SetTotal(value string) types.PaginatorAttribute

func (*PaginatorAttribute) SetUrl

func (compo *PaginatorAttribute) SetUrl(value string) types.PaginatorAttribute

type PopupAttribute

type PopupAttribute struct {
	Name   string
	ID     string
	Body   template.HTML
	Footer template.HTML
	Title  template.HTML
	Size   string
	types.Attribute
}

func (*PopupAttribute) GetContent

func (compo *PopupAttribute) GetContent() template.HTML

func (*PopupAttribute) SetBody

func (compo *PopupAttribute) SetBody(value template.HTML) types.PopupAttribute

func (*PopupAttribute) SetFooter

func (compo *PopupAttribute) SetFooter(value template.HTML) types.PopupAttribute

func (*PopupAttribute) SetID

func (compo *PopupAttribute) SetID(value string) types.PopupAttribute

func (*PopupAttribute) SetSize

func (compo *PopupAttribute) SetSize(value string) types.PopupAttribute

func (*PopupAttribute) SetTitle

func (compo *PopupAttribute) SetTitle(value template.HTML) types.PopupAttribute

type RowAttribute

type RowAttribute struct {
	Name    string
	Content template.HTML
	types.Attribute
}

func (*RowAttribute) AddContent

func (compo *RowAttribute) AddContent(value template.HTML) types.RowAttribute

func (*RowAttribute) GetContent

func (compo *RowAttribute) GetContent() template.HTML

func (*RowAttribute) SetContent

func (compo *RowAttribute) SetContent(value template.HTML) types.RowAttribute

type TableAttribute

type TableAttribute struct {
	Name       string
	Thead      []map[string]string
	InfoList   []map[string]template.HTML
	Type       string
	PrimaryKey string
	NoAction   bool
	Action     template.HTML
	EditUrl    string
	MinWidth   int
	DeleteUrl  string
	UpdateUrl  string
	IsTab      bool
	ExportUrl  string
	types.Attribute
}

func (*TableAttribute) GetContent

func (compo *TableAttribute) GetContent() template.HTML

func (*TableAttribute) SetInfoList

func (compo *TableAttribute) SetInfoList(value []map[string]template.HTML) types.TableAttribute

func (*TableAttribute) SetMinWidth

func (compo *TableAttribute) SetMinWidth(value int) types.TableAttribute

func (*TableAttribute) SetThead

func (compo *TableAttribute) SetThead(value []map[string]string) types.TableAttribute

func (*TableAttribute) SetType

func (compo *TableAttribute) SetType(value string) types.TableAttribute

type TabsAttribute

type TabsAttribute struct {
	Name string
	Data []map[string]template.HTML
	types.Attribute
}

func (*TabsAttribute) GetContent

func (compo *TabsAttribute) GetContent() template.HTML

func (*TabsAttribute) SetData

func (compo *TabsAttribute) SetData(value []map[string]template.HTML) types.TabsAttribute

type TreeAttribute

type TreeAttribute struct {
	Name      string
	Tree      []menu.Item
	EditUrl   string
	DeleteUrl string
	UrlPrefix string
	OrderUrl  string
	types.Attribute
}

func (*TreeAttribute) GetContent

func (compo *TreeAttribute) GetContent() template.HTML

func (*TreeAttribute) GetTreeHeader

func (compo *TreeAttribute) GetTreeHeader() template.HTML

func (*TreeAttribute) SetDeleteUrl

func (compo *TreeAttribute) SetDeleteUrl(value string) types.TreeAttribute

func (*TreeAttribute) SetEditUrl

func (compo *TreeAttribute) SetEditUrl(value string) types.TreeAttribute

func (*TreeAttribute) SetOrderUrl

func (compo *TreeAttribute) SetOrderUrl(value string) types.TreeAttribute

func (*TreeAttribute) SetTree

func (compo *TreeAttribute) SetTree(value []menu.Item) types.TreeAttribute

func (*TreeAttribute) SetUrlPrefix

func (compo *TreeAttribute) SetUrlPrefix(value string) types.TreeAttribute

Jump to

Keyboard shortcuts

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