-
Notifications
You must be signed in to change notification settings - Fork 1
/
linkage-select.go
71 lines (57 loc) · 1.6 KB
/
linkage-select.go
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
package vuetifyx
import (
"context"
h "github.com/theplant/htmlgo"
)
type VXLinkageSelectBuilber struct {
tag *h.HTMLTagBuilder
}
func VXLinkageSelect() *VXLinkageSelectBuilber {
b := &VXLinkageSelectBuilber{
tag: h.Tag("vx-linkageselect"),
}
return b
}
type LinkageSelectItem struct {
ID string
Name string
ChildrenIDs []string
}
func (b *VXLinkageSelectBuilber) Items(vs ...[]*LinkageSelectItem) (r *VXLinkageSelectBuilber) {
b.tag.Attr(":items", vs)
return b
}
func (b *VXLinkageSelectBuilber) Labels(vs ...string) (r *VXLinkageSelectBuilber) {
b.tag.Attr(":labels", vs)
return b
}
func (b *VXLinkageSelectBuilber) ErrorMessages(vs ...[]string) (r *VXLinkageSelectBuilber) {
b.tag.Attr(":error-messages", vs)
return b
}
func (b *VXLinkageSelectBuilber) Disabled(v bool) (r *VXLinkageSelectBuilber) {
b.tag.Attr(":disabled", h.JSONString(v))
return b
}
func (b *VXLinkageSelectBuilber) SelectOutOfOrder(v bool) (r *VXLinkageSelectBuilber) {
b.tag.Attr(":select-out-of-order", h.JSONString(v))
return b
}
func (b *VXLinkageSelectBuilber) Chips(v bool) (r *VXLinkageSelectBuilber) {
b.tag.Attr(":chips", h.JSONString(v))
return b
}
func (b *VXLinkageSelectBuilber) Row(v bool) (r *VXLinkageSelectBuilber) {
b.tag.Attr(":row", h.JSONString(v))
return b
}
func (b *VXLinkageSelectBuilber) SetAttr(k string, v interface{}) {
b.tag.SetAttr(k, v)
}
func (b *VXLinkageSelectBuilber) Attr(vs ...interface{}) (r *VXLinkageSelectBuilber) {
b.tag.Attr(vs...)
return b
}
func (b *VXLinkageSelectBuilber) MarshalHTML(ctx context.Context) ([]byte, error) {
return b.tag.MarshalHTML(ctx)
}