select.go 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376
  1. package vuetifyx
  2. import (
  3. "fmt"
  4. h "github.com/theplant/htmlgo"
  5. )
  6. func (b *VXSelectBuilder) AppendIcon(v string) (r *VXSelectBuilder) {
  7. b.tag.Attr("append-icon", v)
  8. return b
  9. }
  10. func (b *VXSelectBuilder) AppendOuterIcon(v string) (r *VXSelectBuilder) {
  11. b.tag.Attr("append-outer-icon", v)
  12. return b
  13. }
  14. func (b *VXSelectBuilder) Attach(v interface{}) (r *VXSelectBuilder) {
  15. b.tag.Attr(":attach", h.JSONString(v))
  16. return b
  17. }
  18. func (b *VXSelectBuilder) Autofocus(v bool) (r *VXSelectBuilder) {
  19. b.tag.Attr(":autofocus", fmt.Sprint(v))
  20. return b
  21. }
  22. func (b *VXSelectBuilder) BackgroundColor(v string) (r *VXSelectBuilder) {
  23. b.tag.Attr("background-color", v)
  24. return b
  25. }
  26. func (b *VXSelectBuilder) CacheItems(v bool) (r *VXSelectBuilder) {
  27. b.tag.Attr(":cache-items", fmt.Sprint(v))
  28. return b
  29. }
  30. func (b *VXSelectBuilder) Chips(v bool) (r *VXSelectBuilder) {
  31. b.tag.Attr(":chips", fmt.Sprint(v))
  32. return b
  33. }
  34. func (b *VXSelectBuilder) ClearIcon(v string) (r *VXSelectBuilder) {
  35. b.tag.Attr("clear-icon", v)
  36. return b
  37. }
  38. func (b *VXSelectBuilder) Clearable(v bool) (r *VXSelectBuilder) {
  39. b.tag.Attr(":clearable", fmt.Sprint(v))
  40. return b
  41. }
  42. func (b *VXSelectBuilder) Color(v string) (r *VXSelectBuilder) {
  43. b.tag.Attr("color", v)
  44. return b
  45. }
  46. func (b *VXSelectBuilder) Counter(v int) (r *VXSelectBuilder) {
  47. b.tag.Attr(":counter", fmt.Sprint(v))
  48. return b
  49. }
  50. func (b *VXSelectBuilder) CounterValue(v interface{}) (r *VXSelectBuilder) {
  51. b.tag.Attr(":counter-value", h.JSONString(v))
  52. return b
  53. }
  54. func (b *VXSelectBuilder) Dark(v bool) (r *VXSelectBuilder) {
  55. b.tag.Attr(":dark", fmt.Sprint(v))
  56. return b
  57. }
  58. func (b *VXSelectBuilder) DeletableChips(v bool) (r *VXSelectBuilder) {
  59. b.tag.Attr(":deletable-chips", fmt.Sprint(v))
  60. return b
  61. }
  62. func (b *VXSelectBuilder) Dense(v bool) (r *VXSelectBuilder) {
  63. b.tag.Attr(":dense", fmt.Sprint(v))
  64. return b
  65. }
  66. func (b *VXSelectBuilder) DisableLookup(v bool) (r *VXSelectBuilder) {
  67. b.tag.Attr(":disable-lookup", fmt.Sprint(v))
  68. return b
  69. }
  70. func (b *VXSelectBuilder) Disabled(v bool) (r *VXSelectBuilder) {
  71. b.tag.Attr(":disabled", fmt.Sprint(v))
  72. return b
  73. }
  74. func (b *VXSelectBuilder) Eager(v bool) (r *VXSelectBuilder) {
  75. b.tag.Attr(":eager", fmt.Sprint(v))
  76. return b
  77. }
  78. func (b *VXSelectBuilder) Error(v bool) (r *VXSelectBuilder) {
  79. b.tag.Attr(":error", fmt.Sprint(v))
  80. return b
  81. }
  82. func (b *VXSelectBuilder) ErrorCount(v int) (r *VXSelectBuilder) {
  83. b.tag.Attr(":error-count", fmt.Sprint(v))
  84. return b
  85. }
  86. func (b *VXSelectBuilder) Filled(v bool) (r *VXSelectBuilder) {
  87. b.tag.Attr(":filled", fmt.Sprint(v))
  88. return b
  89. }
  90. func (b *VXSelectBuilder) Flat(v bool) (r *VXSelectBuilder) {
  91. b.tag.Attr(":flat", fmt.Sprint(v))
  92. return b
  93. }
  94. func (b *VXSelectBuilder) FullWidth(v bool) (r *VXSelectBuilder) {
  95. b.tag.Attr(":full-width", fmt.Sprint(v))
  96. return b
  97. }
  98. func (b *VXSelectBuilder) Height(v int) (r *VXSelectBuilder) {
  99. b.tag.Attr(":height", fmt.Sprint(v))
  100. return b
  101. }
  102. func (b *VXSelectBuilder) HideDetails(v bool) (r *VXSelectBuilder) {
  103. b.tag.Attr(":hide-details", fmt.Sprint(v))
  104. return b
  105. }
  106. func (b *VXSelectBuilder) HideSelected(v bool) (r *VXSelectBuilder) {
  107. b.tag.Attr(":hide-selected", fmt.Sprint(v))
  108. return b
  109. }
  110. func (b *VXSelectBuilder) Hint(v string) (r *VXSelectBuilder) {
  111. b.tag.Attr("hint", v)
  112. return b
  113. }
  114. func (b *VXSelectBuilder) Id(v string) (r *VXSelectBuilder) {
  115. b.tag.Attr("id", v)
  116. return b
  117. }
  118. func (b *VXSelectBuilder) ItemColor(v string) (r *VXSelectBuilder) {
  119. b.tag.Attr("item-color", v)
  120. return b
  121. }
  122. func (b *VXSelectBuilder) ItemDisabled(v string) (r *VXSelectBuilder) {
  123. b.tag.Attr("item-disabled", v)
  124. return b
  125. }
  126. func (b *VXSelectBuilder) ItemText(v string) (r *VXSelectBuilder) {
  127. b.tag.Attr("item-text", v)
  128. return b
  129. }
  130. func (b *VXSelectBuilder) ItemValue(v string) (r *VXSelectBuilder) {
  131. b.tag.Attr("item-value", v)
  132. return b
  133. }
  134. func (b *VXSelectBuilder) Label(v string) (r *VXSelectBuilder) {
  135. b.tag.Attr("label", v)
  136. return b
  137. }
  138. func (b *VXSelectBuilder) Light(v bool) (r *VXSelectBuilder) {
  139. b.tag.Attr(":light", fmt.Sprint(v))
  140. return b
  141. }
  142. func (b *VXSelectBuilder) LoaderHeight(v int) (r *VXSelectBuilder) {
  143. b.tag.Attr(":loader-height", fmt.Sprint(v))
  144. return b
  145. }
  146. func (b *VXSelectBuilder) Loading(v bool) (r *VXSelectBuilder) {
  147. b.tag.Attr(":loading", fmt.Sprint(v))
  148. return b
  149. }
  150. func (b *VXSelectBuilder) MenuProps(v interface{}) (r *VXSelectBuilder) {
  151. b.tag.Attr(":menu-props", h.JSONString(v))
  152. return b
  153. }
  154. func (b *VXSelectBuilder) Messages(v string) (r *VXSelectBuilder) {
  155. b.tag.Attr("messages", v)
  156. return b
  157. }
  158. func (b *VXSelectBuilder) Multiple(v bool) (r *VXSelectBuilder) {
  159. b.tag.Attr(":multiple", fmt.Sprint(v))
  160. return b
  161. }
  162. func (b *VXSelectBuilder) NoDataText(v string) (r *VXSelectBuilder) {
  163. b.tag.Attr("no-data-text", v)
  164. return b
  165. }
  166. func (b *VXSelectBuilder) OpenOnClear(v bool) (r *VXSelectBuilder) {
  167. b.tag.Attr(":open-on-clear", fmt.Sprint(v))
  168. return b
  169. }
  170. func (b *VXSelectBuilder) Outlined(v bool) (r *VXSelectBuilder) {
  171. b.tag.Attr(":outlined", fmt.Sprint(v))
  172. return b
  173. }
  174. func (b *VXSelectBuilder) PersistentHint(v bool) (r *VXSelectBuilder) {
  175. b.tag.Attr(":persistent-hint", fmt.Sprint(v))
  176. return b
  177. }
  178. func (b *VXSelectBuilder) PersistentPlaceholder(v bool) (r *VXSelectBuilder) {
  179. b.tag.Attr(":persistent-placeholder", fmt.Sprint(v))
  180. return b
  181. }
  182. func (b *VXSelectBuilder) Placeholder(v string) (r *VXSelectBuilder) {
  183. b.tag.Attr("placeholder", v)
  184. return b
  185. }
  186. func (b *VXSelectBuilder) Prefix(v string) (r *VXSelectBuilder) {
  187. b.tag.Attr("prefix", v)
  188. return b
  189. }
  190. func (b *VXSelectBuilder) PrependIcon(v string) (r *VXSelectBuilder) {
  191. b.tag.Attr("prepend-icon", v)
  192. return b
  193. }
  194. func (b *VXSelectBuilder) PrependInnerIcon(v string) (r *VXSelectBuilder) {
  195. b.tag.Attr("prepend-inner-icon", v)
  196. return b
  197. }
  198. func (b *VXSelectBuilder) Readonly(v bool) (r *VXSelectBuilder) {
  199. b.tag.Attr(":readonly", fmt.Sprint(v))
  200. return b
  201. }
  202. func (b *VXSelectBuilder) ReturnObject(v bool) (r *VXSelectBuilder) {
  203. b.tag.Attr(":return-object", fmt.Sprint(v))
  204. return b
  205. }
  206. func (b *VXSelectBuilder) Reverse(v bool) (r *VXSelectBuilder) {
  207. b.tag.Attr(":reverse", fmt.Sprint(v))
  208. return b
  209. }
  210. func (b *VXSelectBuilder) Rounded(v bool) (r *VXSelectBuilder) {
  211. b.tag.Attr(":rounded", fmt.Sprint(v))
  212. return b
  213. }
  214. func (b *VXSelectBuilder) Rules(v interface{}) (r *VXSelectBuilder) {
  215. b.tag.Attr(":rules", h.JSONString(v))
  216. return b
  217. }
  218. func (b *VXSelectBuilder) Shaped(v bool) (r *VXSelectBuilder) {
  219. b.tag.Attr(":shaped", fmt.Sprint(v))
  220. return b
  221. }
  222. func (b *VXSelectBuilder) SingleLine(v bool) (r *VXSelectBuilder) {
  223. b.tag.Attr(":single-line", fmt.Sprint(v))
  224. return b
  225. }
  226. func (b *VXSelectBuilder) SmallChips(v bool) (r *VXSelectBuilder) {
  227. b.tag.Attr(":small-chips", fmt.Sprint(v))
  228. return b
  229. }
  230. func (b *VXSelectBuilder) Solo(v bool) (r *VXSelectBuilder) {
  231. b.tag.Attr(":solo", fmt.Sprint(v))
  232. return b
  233. }
  234. func (b *VXSelectBuilder) SoloInverted(v bool) (r *VXSelectBuilder) {
  235. b.tag.Attr(":solo-inverted", fmt.Sprint(v))
  236. return b
  237. }
  238. func (b *VXSelectBuilder) Success(v bool) (r *VXSelectBuilder) {
  239. b.tag.Attr(":success", fmt.Sprint(v))
  240. return b
  241. }
  242. func (b *VXSelectBuilder) SuccessMessages(v string) (r *VXSelectBuilder) {
  243. b.tag.Attr("success-messages", v)
  244. return b
  245. }
  246. func (b *VXSelectBuilder) Suffix(v string) (r *VXSelectBuilder) {
  247. b.tag.Attr("suffix", v)
  248. return b
  249. }
  250. func (b *VXSelectBuilder) Type(v string) (r *VXSelectBuilder) {
  251. b.tag.Attr("type", v)
  252. return b
  253. }
  254. func (b *VXSelectBuilder) ValidateOnBlur(v bool) (r *VXSelectBuilder) {
  255. b.tag.Attr(":validate-on-blur", fmt.Sprint(v))
  256. return b
  257. }
  258. func (b *VXSelectBuilder) Value(v interface{}) (r *VXSelectBuilder) {
  259. b.tag.Attr(":value", h.JSONString(v))
  260. return b
  261. }
  262. func (b *VXSelectBuilder) ValueComparator(v interface{}) (r *VXSelectBuilder) {
  263. b.tag.Attr(":value-comparator", h.JSONString(v))
  264. return b
  265. }
  266. func (b *VXSelectBuilder) SetAttr(k string, v interface{}) {
  267. b.tag.SetAttr(k, v)
  268. }
  269. func (b *VXSelectBuilder) Attr(vs ...interface{}) (r *VXSelectBuilder) {
  270. b.tag.Attr(vs...)
  271. return b
  272. }
  273. func (b *VXSelectBuilder) Children(children ...h.HTMLComponent) (r *VXSelectBuilder) {
  274. b.tag.Children(children...)
  275. return b
  276. }
  277. func (b *VXSelectBuilder) AppendChildren(children ...h.HTMLComponent) (r *VXSelectBuilder) {
  278. b.tag.AppendChildren(children...)
  279. return b
  280. }
  281. func (b *VXSelectBuilder) PrependChildren(children ...h.HTMLComponent) (r *VXSelectBuilder) {
  282. b.tag.PrependChildren(children...)
  283. return b
  284. }
  285. func (b *VXSelectBuilder) Class(names ...string) (r *VXSelectBuilder) {
  286. b.tag.Class(names...)
  287. return b
  288. }
  289. func (b *VXSelectBuilder) ClassIf(name string, add bool) (r *VXSelectBuilder) {
  290. b.tag.ClassIf(name, add)
  291. return b
  292. }
  293. func (b *VXSelectBuilder) On(name string, value string) (r *VXSelectBuilder) {
  294. b.tag.Attr(fmt.Sprintf("v-on:%s", name), value)
  295. return b
  296. }
  297. func (b *VXSelectBuilder) Bind(name string, value string) (r *VXSelectBuilder) {
  298. b.tag.Attr(fmt.Sprintf("v-bind:%s", name), value)
  299. return b
  300. }