File size: 1,674 Bytes
530729e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
package components
import (
"html/template"
"github.com/GoAdminGroup/go-admin/template/types"
)
type PopupAttribute struct {
Name string
ID string
Body template.HTML
Footer template.HTML
FooterHTML template.HTML
Title template.HTML
Size string
HideFooter bool
Height string
Width string
Draggable bool
types.Attribute
}
func (compo *PopupAttribute) SetID(value string) types.PopupAttribute {
compo.ID = value
return compo
}
func (compo *PopupAttribute) SetTitle(value template.HTML) types.PopupAttribute {
compo.Title = value
return compo
}
func (compo *PopupAttribute) SetFooter(value template.HTML) types.PopupAttribute {
compo.Footer = value
return compo
}
func (compo *PopupAttribute) SetFooterHTML(value template.HTML) types.PopupAttribute {
compo.FooterHTML = value
return compo
}
func (compo *PopupAttribute) SetWidth(width string) types.PopupAttribute {
compo.Width = width
return compo
}
func (compo *PopupAttribute) SetHeight(height string) types.PopupAttribute {
compo.Height = height
return compo
}
func (compo *PopupAttribute) SetDraggable() types.PopupAttribute {
compo.Draggable = true
return compo
}
func (compo *PopupAttribute) SetHideFooter() types.PopupAttribute {
compo.HideFooter = true
return compo
}
func (compo *PopupAttribute) SetBody(value template.HTML) types.PopupAttribute {
compo.Body = value
return compo
}
func (compo *PopupAttribute) SetSize(value string) types.PopupAttribute {
compo.Size = value
return compo
}
func (compo *PopupAttribute) GetContent() template.HTML {
return ComposeHtml(compo.TemplateList, compo.Separation, *compo, "popup")
}
|