Documentation ¶
Index ¶
- func Accordion() *accordionElement
- func Card() *cardElement
- func Carousel() *carouselElement
- func Check(name, text string) *checkElement
- func Datalist(name, text string) *datalistElement
- func Dropdown(text string) *dropdownElement
- func Form(cb func(p easyweb.Page, id string, info map[string]string)) *formElement
- func InputGroup(name, text string) *inputElement
- func Label(text string) *labelElement
- func Link(text, url string) *linkElement
- func List(in ...any) *listElement
- func Map2Table(keyWidth int, in map[string]any) *tableElement
- func Modal(btnText, title string) *modalElement
- func Navbar(name string) *navbarElement
- func Pagination(items []string, cb func(p easyweb.Page, id, item string)) *paginationElement
- func Radio(name string) *radioElement
- func RangeInput(name, text string) *rangeElement
- func Row(items ...IElement) *rowElement
- func Select(name string) *selectElement
- func Sidebar(title string) *elementSidebar
- func Table(head ...string) *tableElement
- func Tabs() *tabsElement
- func Textarea(name, title string) *textareaElement
- func Video(url string) *videoElement
- type HtmlToken
- func (n *HtmlToken) Add(in ...IElement) IElement
- func (n *HtmlToken) AddAny1(in ...any) IElement
- func (n *HtmlToken) AfterElementLoadedFromFramwork(p easyweb.Page)
- func (n HtmlToken) ContainerID() string
- func (n *HtmlToken) Copy() IElement
- func (n HtmlToken) GetAttr(k string) string
- func (n HtmlToken) GetChilds() []IElement
- func (n HtmlToken) GetID() string
- func (n HtmlToken) GetText() string
- func (n HtmlToken) HtmlTag() string
- func (n HtmlToken) MessageCallbackFromFramwork(p easyweb.Page, id string, dataType easyweb.CbDataType, data []byte) bool
- func (n HtmlToken) Refresh(p easyweb.Page) error
- func (n *HtmlToken) SetAttr(k, v string) IElement
- func (n *HtmlToken) SetCb(typ string, cb ICallback) IElement
- func (n *HtmlToken) SetChild(child ...IElement) IElement
- func (n *HtmlToken) SetContainerID(cid string) IElement
- func (n *HtmlToken) SetText(text string) IElement
- func (n HtmlToken) String() string
- func (n *HtmlToken) Traverse(parent IElement, cb ITraverseCb) error
- type ICallback
- type IElement
- func Box(items ...any) IElement
- func Button(text string, cb func(p easyweb.Page, id string)) IElement
- func Col(width int, item IElement) IElement
- func Div(text string) IElement
- func H(level uint, msg string) IElement
- func Image(url string) IElement
- func Loading() IElement
- func MustParseHtml(text string) IElement
- func P(text string) IElement
- func ParseHtml(text string) (IElement, error)
- func Text(text string) IElement
- type ITraverseCb
- type InputType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InputGroup ¶
func InputGroup(name, text string) *inputElement
func Navbar ¶
func Navbar(name string) *navbarElement
Navbar creates a new navbarElement with the given name.
Parameters: - name: a string representing the name of the navbarElement.
Returns: - a pointer to the created navbarElement.
func Pagination ¶ added in v0.1.4
func RangeInput ¶
func RangeInput(name, text string) *rangeElement
Types ¶
type HtmlToken ¶
func (*HtmlToken) AfterElementLoadedFromFramwork ¶ added in v0.1.2
func (HtmlToken) ContainerID ¶ added in v0.1.7
func (HtmlToken) MessageCallbackFromFramwork ¶
func (*HtmlToken) SetContainerID ¶ added in v0.1.7
If the same container id is set, the content will be updated when written multiple times.
type IElement ¶ added in v0.2.0
type IElement interface { String() string GetID() string GetAttr(k string) string //set Attribute, if v=="",will remove it SetAttr(k, v string) IElement SetCb(typ string, cb ICallback) IElement AfterElementLoadedFromFramwork(p easyweb.Page) MessageCallbackFromFramwork(p easyweb.Page, id string, dataType easyweb.CbDataType, data []byte) bool Traverse(parent IElement, cb ITraverseCb) error Add(in ...IElement) IElement SetChild(child ...IElement) IElement SetContainerID(cid string) IElement ContainerID() string GetChilds() []IElement Copy() IElement GetText() string SetText(text string) IElement Refresh(p easyweb.Page) error HtmlTag() string }
func Col ¶ added in v0.1.1
Col generates a col Element.
Parameters:
- width: an integer representing the width of the colElement, 0-12, 0=auto.
- item: any item that needs to be added to the colElement.
func MustParseHtml ¶ added in v0.2.0
type ITraverseCb ¶
type InputType ¶ added in v0.1.4
type InputType string
const ( InputTypeButton InputType = "button" InputTypeCheckbox InputType = "checkbox" InputTypeColor InputType = "color" InputTypeDate InputType = "date" InputTypeDatetime InputType = "datetime-local" InputTypeEmail InputType = "email" InputTypeFile InputType = "file" InputTypeHidden InputType = "hidden" InputTypeImage InputType = "image" InputTypeMonth InputType = "month" InputTypeNumber InputType = "number" InputTypePassword InputType = "password" InputTypeRadio InputType = "radio" InputTypeRange InputType = "range" InputTypeReset InputType = "reset" InputTypeSearch InputType = "search" InputTypeSubmit InputType = "submit" InputTypeTel InputType = "tel" InputTypeText InputType = "text" InputTypeTime InputType = "time" InputTypeUrl InputType = "url" InputTypeWeek InputType = "week" )
Source Files ¶
Click to show internal directories.
Click to hide internal directories.