MetaVo.java 1.2 KB

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