mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-21 20:55:14 +00:00
chore: 批量修复优化代码与配置
1. 统一修复多处状态选项值类型从字符串转为数字 2. 优化用户更新逻辑简化代码 3. 新增ORM转Schema工具方法优化数据转换 4. 调整部门与菜单模型加载配置 5. 修复订单详情展示逻辑与样式 6. 移动主题配置到单独文件并更新gitignore
This commit is contained in:
@@ -216,8 +216,8 @@ const searchBarRef = ref<InstanceType<typeof FaSearchBarWithAudit> | null>(null)
|
||||
const searchBarRules: Record<string, unknown> = {};
|
||||
|
||||
const statusOptions = ref([
|
||||
{ label: "启用", value: "0" },
|
||||
{ label: "停用", value: "1" },
|
||||
{ label: "启用", value: 0 },
|
||||
{ label: "停用", value: 1 },
|
||||
]);
|
||||
|
||||
/** 业务搜索项(审计四字段由 FaSearchBarWithAudit 自动追加) */
|
||||
@@ -504,7 +504,7 @@ const dialogFormItems = computed<FormItem[]>(() => [
|
||||
{% set comment = column_comment[:parentheseIndex] if parentheseIndex != -1 else column_comment %}
|
||||
{% if column.column_name not in ['uuid', 'created_time', 'updated_time', 'created_id', 'updated_id', 'is_deleted', 'deleted_time', 'deleted_id', 'tenant_id'] and column.column_name != pk_column_name %}
|
||||
{% if column.column_name == "status" %}
|
||||
{ key: "status", label: "状态", type: "radio", props: { options: [{ label: "启用", value: "0" }, { label: "停用", value: "1" }] } },
|
||||
{ key: "status", label: "状态", type: "radio", props: { options: [{ label: "启用", value: 0 }, { label: "停用", value: 1 }] } },
|
||||
{% elif column.column_name == "description" %}
|
||||
{ key: "description", label: "描述", type: "textarea", placeholder: "请输入描述" },
|
||||
{% elif column.python_type == "int" or column.python_type == "float" or column.python_type == "Decimal" %}
|
||||
|
||||
Reference in New Issue
Block a user