MetaVo.java 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. package com.ruoyi.system.domain.vo;
  2. import com.ruoyi.common.utils.StringUtils;
  3. /**
  4. * 路由显示信息
  5. *
  6. * @author ruoyi
  7. */
  8. public class MetaVo
  9. {
  10. /**
  11. * 设置该路由在侧边栏和面包屑中展示的名字
  12. */
  13. private String title;
  14. /**
  15. * 设置该路由的图标,对应路径src/assets/icons/svg
  16. */
  17. private String icon;
  18. /**
  19. * 设置为true,则不会被 <keep-alive>缓存
  20. */
  21. private boolean noCache;
  22. /**
  23. * 内链地址(http(s)://开头)
  24. */
  25. private String link;
  26. public MetaVo()
  27. {
  28. }
  29. public MetaVo(String title, String icon)
  30. {
  31. this.title = title;
  32. this.icon = icon;
  33. }
  34. public MetaVo(String title, String icon, boolean noCache)
  35. {
  36. this.title = title;
  37. this.icon = icon;
  38. this.noCache = noCache;
  39. }
  40. public MetaVo(String title, String icon, String link)
  41. {
  42. this.title = title;
  43. this.icon = icon;
  44. this.link = link;
  45. }
  46. public MetaVo(String title, String icon, boolean noCache, String link)
  47. {
  48. this.title = title;
  49. this.icon = icon;
  50. this.noCache = noCache;
  51. if (StringUtils.ishttp(link))
  52. {
  53. this.link = link;
  54. }
  55. }
  56. public boolean isNoCache()
  57. {
  58. return noCache;
  59. }
  60. public void setNoCache(boolean noCache)
  61. {
  62. this.noCache = noCache;
  63. }
  64. public String getTitle()
  65. {
  66. return title;
  67. }
  68. public void setTitle(String title)
  69. {
  70. this.title = title;
  71. }
  72. public String getIcon()
  73. {
  74. return icon;
  75. }
  76. public void setIcon(String icon)
  77. {
  78. this.icon = icon;
  79. }
  80. public String getLink()
  81. {
  82. return link;
  83. }
  84. public void setLink(String link)
  85. {
  86. this.link = link;
  87. }
  88. }