page.go 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. package e20_vuetify_expansion_panels
  2. import (
  3. "time"
  4. . "github.com/qor5/ui/vuetify"
  5. vx "github.com/qor5/ui/vuetifyx"
  6. "github.com/qor5/web"
  7. h "github.com/theplant/htmlgo"
  8. )
  9. type Event struct {
  10. Title string
  11. CreatedAt time.Time
  12. }
  13. func ExpansionPanelDemo(ctx *web.EventContext) (pr web.PageResponse, err error) {
  14. pr.Body = VApp(
  15. VMain(
  16. VExpansionPanels(
  17. VExpansionPanel(
  18. VExpansionPanelHeader(
  19. h.Text("VISA •••• 4242 11 / 2028"),
  20. web.Slot(
  21. VIcon("search"),
  22. ).Name("actions"),
  23. ).DisableIconRotate(true),
  24. VExpansionPanelContent(
  25. VDivider(),
  26. vx.DetailInfo(
  27. vx.DetailColumn(
  28. vx.DetailField(vx.OptionalText("FENGMIN SUN").ZeroLabel("No Name")).Label("Name"),
  29. vx.DetailField(vx.OptionalText("•••• 4242").ZeroLabel("No Number")).Label("Number"),
  30. vx.DetailField(vx.OptionalText("QlfGjXhL3I1xfKVV").ZeroLabel("No Fingerprint")).Label("Fingerprint"),
  31. vx.DetailField(vx.OptionalText("11 / 2028").ZeroLabel("No Expires")).Label("Expires"),
  32. vx.DetailField(vx.OptionalText("Visa credit card").ZeroLabel("No Type")).Label("Type"),
  33. vx.DetailField(vx.OptionalText("card_1EJtLGAqkzzGorqLeFb6h2YV").ZeroLabel("No Type")).Label("ID"),
  34. ),
  35. ).Class("pa-0"),
  36. ),
  37. ),
  38. VExpansionPanel(
  39. VExpansionPanelHeader(
  40. h.Text("VISA •••• 2121 11 / 2028"),
  41. ),
  42. VExpansionPanelContent(
  43. VDivider(),
  44. vx.DetailInfo(
  45. vx.DetailColumn(
  46. vx.DetailField(vx.OptionalText("FENGMIN SUN").ZeroLabel("No Name")).Label("Name"),
  47. vx.DetailField(vx.OptionalText("•••• 4242").ZeroLabel("No Number")).Label("Number"),
  48. vx.DetailField(vx.OptionalText("QlfGjXhL3I1xfKVV").ZeroLabel("No Fingerprint")).Label("Fingerprint"),
  49. vx.DetailField(vx.OptionalText("11 / 2028").ZeroLabel("No Expires")).Label("Expires"),
  50. vx.DetailField(vx.OptionalText("Visa credit card").ZeroLabel("No Type")).Label("Type"),
  51. vx.DetailField(vx.OptionalText("card_1EJtLGAqkzzGorqLeFb6h2YV").ZeroLabel("No Type")).Label("ID"),
  52. ),
  53. ).Class("pa-0"),
  54. ),
  55. ),
  56. ),
  57. ),
  58. )
  59. return
  60. }