疯狂的狮子li
2022-07-07 d9e54388e7fde2462e8b7e0165c5e7da3f202593
ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/MetaVo.java
@@ -1,7 +1,7 @@
package com.ruoyi.system.domain.vo;
import lombok.*;
import lombok.experimental.Accessors;
import com.ruoyi.common.utils.StringUtils;
import lombok.Data;
/**
 * 路由显示信息
@@ -10,9 +10,8 @@
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
public class MetaVo {
    /**
     * 设置该路由在侧边栏和面包屑中展示的名字
     */
@@ -28,6 +27,11 @@
     */
    private boolean noCache;
    /**
     * 内链地址(http(s)://开头)
     */
    private String link;
    public MetaVo(String title, String icon) {
        this.title = title;
        this.icon = icon;
@@ -39,4 +43,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;
        }
    }
}