Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

下拉@ChoiceType的VL能不能加一个className,用于给不同的下拉标签设置不同的颜色 #222

Open
aazainn opened this issue Dec 1, 2023 · 1 comment

Comments

@aazainn
Copy link

aazainn commented Dec 1, 2023

版本情况

JDK版本: openjdk21
erupt版本: 1.12.7 (请确保最新尝试是否还有问题)

问题描述(包括截图)

下拉@ChoiceType的VL能不能加一个className,用于给不同的下拉标签设置不同的颜色

  1. 复现代码
 @EruptField(
            views = @View(title = "状态", sortable = true, width = "5em")
            , edit = @Edit(title = "状态", search = @Search(vague = true), type = EditType.CHOICE, choiceType = @ChoiceType(vl = {
            @VL(label = "<p class='text-red'>待操作</p>", value = "0"),
            @VL(label = "<p class='text-green'>已操作</p>", value = "1"),
            @VL(label = "<p class='text-blue'>已撤销</p>", value = "2"),
    }))
    )
    @Schema(description = "状态")
    @Column(name = "`status`", columnDefinition = "tinyint")
    @JsonProperty("status")
    private Integer status = 0;

目前这样配置在label里面也能有不同颜色。但是顶部的筛选看到的就是带代码的了。如果可以,最好是vl内部除了label和value外,再添加一个className

@erupts
Copy link
Owner

erupts commented Jan 24, 2024

好的后续版本会做支持

  • CHOICE 组件需要支持回显标签
  • CHOICE 增加统一的颜色定义支持定义

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants