Skip to content

Commit

Permalink
fix: 修复保存生成配置校验失效的问题,并优化部分提示效果
Browse files Browse the repository at this point in the history
Gitee fixes #I8GWVY
  • Loading branch information
Charles7c committed Nov 16, 2023
1 parent 3dd81a1 commit c34e934
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.util.ArrayList;
import java.util.List;

import jakarta.validation.Valid;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;

Expand All @@ -47,13 +48,15 @@ public class GenConfigReq implements Serializable {
/**
* 字段配置信息
*/
@Valid
@Schema(description = "字段配置信息")
@NotEmpty(message = "字段配置不能为空")
private List<FieldConfigDO> fieldConfigs = new ArrayList<>();

/**
* 生成配置信息
*/
@Valid
@Schema(description = "生成配置信息")
@NotNull(message = "生成配置不能为空")
private GenConfigDO genConfig;
Expand Down
18 changes: 11 additions & 7 deletions continew-admin-ui/src/views/tool/generator/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,17 @@
ellipsis
tooltip
/>
<a-table-column
title="类型"
data-index="fieldType"
:width="95"
ellipsis
tooltip
/>
<a-table-column title="类型" :width="95" ellipsis tooltip>
<template #cell="{ record }">
<span v-if="record.fieldType">{{ record.fieldType }}</span>
<a-tooltip v-else content="请检查 generator.properties 配置">
<icon-exclamation-circle-fill
size="large"
style="color: #f53f3f"
/>
</a-tooltip>
</template>
</a-table-column>
<a-table-column title="描述" :width="170">
<template #cell="{ record }">
<a-input v-model="record.comment" />
Expand Down

0 comments on commit c34e934

Please sign in to comment.