| | |
| | | if (!Cools.isEmpty(precision) && Cools.isEmpty(column.getEnums())) { |
| | | sb.append(" fieldProps={{ precision: ").append(precision).append(" }}\n"); |
| | | } |
| | | if ("Date".equals(column.getType()) || !Cools.isEmpty(column.getEnums()) || !Cools.isEmpty(column.getForeignKeyMajor())){ |
| | | // 时间、枚举 格式化 主键修饰 |
| | | sb.append(" placeholder=\"请选择\"\n"); |
| | | } else { |
| | | sb.append(" placeholder=\"请输入\"\n"); |
| | | } |
| | | |
| | | // 非空 |
| | | if (column.isNotNull()) { |
| | | sb.append(" rules={[{ required: true, message: \"").append(column.getComment()).append("不能为空!\" }]}\n"); |
| | | sb.append(" rules={[{ required: true }]}\n"); |
| | | } |
| | | |
| | | // 枚举 |