mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-10-09 04:57:11 +08:00
refactor: 公告类型适配字典数据
1.新增 <dict-tag> 自定义组件,用于回显字典标签 2.重构 useDict 方法,支持查询字典数据 3.优化部分字典相关数据类型
This commit is contained in:
@@ -23,6 +23,8 @@ import lombok.NoArgsConstructor;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
|
||||
/**
|
||||
* 键值对信息
|
||||
*
|
||||
@@ -49,8 +51,21 @@ public class LabelValueVO<V> implements Serializable {
|
||||
@Schema(description = "值", example = "1")
|
||||
private V value;
|
||||
|
||||
/**
|
||||
* 颜色
|
||||
*/
|
||||
@Schema(description = "颜色", example = "#165DFF")
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
private String color;
|
||||
|
||||
public LabelValueVO(String label, V value) {
|
||||
this.label = label;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public LabelValueVO(String label, V value, String color) {
|
||||
this.label = label;
|
||||
this.value = value;
|
||||
this.color = color;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user