MetaVo.java 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. package com.ruoyi.system.domain.vo;
  2. import com.ruoyi.common.utils.StringUtils;
  3. import lombok.Data;
  4. import lombok.NoArgsConstructor;
  5. import lombok.experimental.Accessors;
  6. /**
  7. * 路由显示信息
  8. *
  9. * @author ruoyi
  10. */
  11. @Data
  12. @NoArgsConstructor
  13. @Accessors(chain = true)
  14. public class MetaVo {
  15. /**
  16. * 设置该路由在侧边栏和面包屑中展示的名字
  17. */
  18. private String title;
  19. /**
  20. * 设置该路由的图标,对应路径src/assets/icons/svg
  21. */
  22. private String icon;
  23. /**
  24. * 设置为true,则不会被 <keep-alive>缓存
  25. */
  26. private boolean noCache;
  27. /**
  28. * 内链地址(http(s)://开头)
  29. */
  30. private String link;
  31. public MetaVo(String title, String icon) {
  32. this.title = title;
  33. this.icon = icon;
  34. }
  35. public MetaVo(String title, String icon, boolean noCache) {
  36. this.title = title;
  37. this.icon = icon;
  38. this.noCache = noCache;
  39. }
  40. public MetaVo(String title, String icon, String link) {
  41. this.title = title;
  42. this.icon = icon;
  43. this.link = link;
  44. }
  45. public MetaVo(String title, String icon, boolean noCache, String link) {
  46. this.title = title;
  47. this.icon = icon;
  48. this.noCache = noCache;
  49. if (StringUtils.ishttp(link)) {
  50. this.link = link;
  51. }
  52. }
  53. }