疯狂的狮子li
2022-07-07 0b077806196ceb8a68af93f00880ccc70aee50c2
ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/MetaVo.java
@@ -1,7 +1,8 @@
package com.ruoyi.system.domain.vo;
import lombok.*;
import lombok.experimental.Accessors;
import com.ruoyi.common.utils.StringUtils;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
/**
 * 路由显示信息
@@ -10,23 +11,32 @@
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@Schema(name = "路由显示信息")
public class MetaVo {
    /**
     * 设置该路由在侧边栏和面包屑中展示的名字
     */
    @Schema(name = "设置该路由在侧边栏和面包屑中展示的名字")
    private String title;
    /**
     * 设置该路由的图标,对应路径src/assets/icons/svg
     */
    @Schema(name = "设置该路由的图标,对应路径src/assets/icons/svg")
    private String icon;
    /**
     * 设置为true,则不会被 <keep-alive>缓存
     */
    @Schema(name = "设置为true,则不会被 <keep-alive>缓存")
    private boolean noCache;
    /**
     * 内链地址(http(s)://开头)
     */
    @Schema(name = "内链地址(http(s)://开头)")
    private String link;
    public MetaVo(String title, String icon) {
        this.title = title;
@@ -39,4 +49,19 @@
        this.noCache = noCache;
    }
    public MetaVo(String title, String icon, String link) {
        this.title = title;
        this.icon = icon;
        this.link = link;
    }
    public MetaVo(String title, String icon, boolean noCache, String link) {
        this.title = title;
        this.icon = icon;
        this.noCache = noCache;
        if (StringUtils.ishttp(link)) {
            this.link = link;
        }
    }
}