139 Star 1.2K Fork 399

go-admin / go-admin

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
infobox.go 927 Bytes
一键复制 编辑 原始数据 按行查看 历史
package components
import (
"github.com/chenhg5/go-admin/template/types"
"html/template"
)
type InfoBoxAttribute struct {
Name string
Icon string
Text string
Number template.HTML
Content string
Color string
}
func (compo *InfoBoxAttribute) SetIcon(value string) types.InfoBoxAttribute {
compo.Icon = value
return compo
}
func (compo *InfoBoxAttribute) SetText(value string) types.InfoBoxAttribute {
compo.Text = value
return compo
}
func (compo *InfoBoxAttribute) SetNumber(value template.HTML) types.InfoBoxAttribute {
compo.Number = value
return compo
}
func (compo *InfoBoxAttribute) SetContent(value string) types.InfoBoxAttribute {
compo.Content = value
return compo
}
func (compo *InfoBoxAttribute) SetColor(value string) types.InfoBoxAttribute {
compo.Color = value
return compo
}
func (compo *InfoBoxAttribute) GetContent() template.HTML {
return ComposeHtml(*compo, "infobox")
}
Go
1
https://gitee.com/go-admin/go-admin.git
git@gitee.com:go-admin/go-admin.git
go-admin
go-admin
go-admin
v0.0.2

搜索帮助