btn-fix.go 463 B

1234567891011121314151617181920212223
  1. package vuetify
  2. import (
  3. "github.com/qor5/web"
  4. h "github.com/theplant/htmlgo"
  5. )
  6. func VBtn(text string) (r *VBtnBuilder) {
  7. r = &VBtnBuilder{
  8. tag: h.Tag("v-btn").Text(text),
  9. }
  10. return
  11. }
  12. func (b *VBtnBuilder) OnClick(eventFuncId string) (r *VBtnBuilder) {
  13. b.tag.Attr("@click", web.Plaid().EventFunc(eventFuncId).Go())
  14. return b
  15. }
  16. func (b *VBtnBuilder) AttrIf(key, value interface{}, add bool) (r *VBtnBuilder) {
  17. b.tag.AttrIf(key, value, add)
  18. return b
  19. }