修改卡片列表样式.

This commit is contained in:
lijiahang
2023-10-18 10:35:22 +08:00
parent f13395f351
commit 9a05b303bd
19 changed files with 124 additions and 92 deletions

View File

@@ -65,16 +65,17 @@ public class CodeGenerator {
.build(),
Template.create("dict_key", "字典配置项", "dict")
.cache("dict:keys", "字典配置项")
.expire(1, TimeUnit.HOURS)
.expire(1, TimeUnit.DAYS)
.vue("system", "dict-key")
.enums("value_type")
.names("STRING", "NUMBER", "BOOLEAN", "COLOR")
.label("字符串", "", "布尔值", "颜色")
.names("STRING", "INTEGER", "DECIMAL", "BOOLEAN", "COLOR")
.label("字符串", "整数", "", "布尔值", "颜色")
.build(),
Template.create("dict_value", "字典配置值", "dict")
.cache("dict:value:{}", "字典配置值 ${key}")
.expire(1, TimeUnit.HOURS)
.expire(1, TimeUnit.DAYS)
.vue("system", "dict-value")
.enableRowSelection()
.build(),
};
// jdbc 配置 - 使用配置文件

View File

@@ -9,6 +9,7 @@ import com.orion.lang.utils.ansi.style.AnsiFont;
import com.orion.lang.utils.ansi.style.color.AnsiForeground;
import com.orion.lang.utils.awt.Clipboards;
import com.orion.lang.utils.reflect.Fields;
import com.orion.ops.framework.common.constant.Const;
import com.orion.ops.module.infra.enums.UserStatusEnum;
import java.util.List;
@@ -47,8 +48,8 @@ public class EnumGenerator {
MultiLinkedHashMap<String, String, Object> result = MultiLinkedHashMap.create();
for (Enum<?> e : constants) {
String name = e.name();
result.put(name, "value", valueFunction.apply((E) e));
result.put(name, "label", labelFunction.apply((E) e));
result.put(name, Const.VALUE, valueFunction.apply((E) e));
result.put(name, Const.LABEL, labelFunction.apply((E) e));
for (String field : fields) {
result.put(name, field, Fields.getFieldValue(e, field));
}

View File

@@ -466,9 +466,9 @@ public class VelocityTemplateEngine extends AbstractTemplateEngine {
enumInfo.put(name, field, value);
}
// 检查是否有 value
if (!meta.getFields().contains("value")) {
if (!meta.getFields().contains(Const.VALUE)) {
// 没有 value 用 name
enumInfo.put(name, "value", name);
enumInfo.put(name, Const.VALUE, name);
}
}
enumMap.put(tableField.getPropertyName(), new EnumMeta(meta.getClassName(), meta.getComment(), enumInfo));

View File

@@ -3,6 +3,7 @@ package com.orion.ops.launch.generator.template;
import com.orion.lang.utils.Enums;
import com.orion.lang.utils.collect.Lists;
import com.orion.lang.utils.reflect.Fields;
import com.orion.ops.framework.common.constant.Const;
import java.util.List;
import java.util.stream.Collectors;
@@ -113,7 +114,7 @@ public class EnumsTemplate extends VueTemplate {
* @return this
*/
public EnumsTemplate label(Object... labels) {
return this.values("label", labels);
return this.values(Const.LABEL, labels);
}
/**
@@ -124,7 +125,7 @@ public class EnumsTemplate extends VueTemplate {
* @return this
*/
public EnumsTemplate value(Object... values) {
return this.values("value", values);
return this.values(Const.VALUE, values);
}
/**
@@ -134,7 +135,7 @@ public class EnumsTemplate extends VueTemplate {
* @return this
*/
public EnumsTemplate color(Object... colors) {
return this.values("color", colors);
return this.values(Const.COLOR, colors);
}
/**
@@ -144,7 +145,7 @@ public class EnumsTemplate extends VueTemplate {
* @return this
*/
public EnumsTemplate status(Object... status) {
return this.values("status", status);
return this.values(Const.STATUS, status);
}
}

View File

@@ -2,7 +2,6 @@
<card-list v-model:searchValue="formModel.searchValue"
search-input-placeholder="输入xxx"
create-card-position="head"
:card-height="172"
:loading="loading"
:fieldConfig="fieldConfig"
:list="list"

View File

@@ -1,5 +1,5 @@
<template>
<a-drawer :visible="visible"
<a-drawer v-model:visible="visible"
:title="title"
:width="430"
:mask-closable="false"

View File

@@ -1,5 +1,5 @@
<template>
<a-modal :visible="visible"
<a-modal v-model:visible="visible"
body-class="modal-form"
title-align="start"
:title="title"