Progress Group


ProgressGroup 定义如下:

  1. type ProgressGroup struct {
  2. components.Base
  3. Title template.HTML
  4. Molecular int
  5. Denominator int
  6. Color template.HTML
  7. IsHexColor bool
  8. Percent int
  9. }
  10. func New() ProgressGroup {}
  11. // 设置标题
  12. func (p ProgressGroup) SetTitle(value template.HTML) ProgressGroup {}
  13. // 设置颜色
  14. func (p ProgressGroup) SetColor(value template.HTML) ProgressGroup {}
  15. // 设置百分比
  16. func (p ProgressGroup) SetPercent(value int) ProgressGroup {}
  17. // 设置分母
  18. func (p ProgressGroup) SetDenominator(value int) ProgressGroup {}
  19. // 设置分子
  20. func (p ProgressGroup) SetMolecular(value int) ProgressGroup {}

使用:

  1. import "github.com/GoAdminGroup/themes/adminlte/components/progress_group"
  2. func xxx() {
  3. ...
  4. content := progress_group.New().SetDenominator(10).SetMolecular(3).GetContent()
  5. ...
  6. }