fix: 模型超参/驾驶舱编排内容卡片化(a-card 包裹,对齐 FBA 原生页观感)

This commit is contained in:
2026-08-06 14:28:27 +08:00
parent 4fb216cde0
commit 62426ef7bb
3 changed files with 11 additions and 22 deletions
Binary file not shown.
@@ -29,12 +29,13 @@ const [Form, formApi] = useVbenForm({
<template>
<Page title="模型超参配置" description="PRD 5.3 · 超参包 JSON(vben-form)">
<div class="hyper-layout">
<Form class="hyper-form" />
<div class="hyper-preview">
<div class="preview-title">超参包 JSON 实时预览</div>
<a-card title="超参表单" :bordered="false" class="hyper-form">
<Form />
</a-card>
<a-card title="超参包 JSON 实时预览" :bordered="false" class="hyper-preview">
<pre class="preview-body">{{ preview || '提交表单后此处生成超参包 JSON' }}</pre>
<VbenButton type="submit" variant="solid" @click="formApi.submitForm">保存超参包</VbenButton>
</div>
</a-card>
</div>
</Page>
</template>
@@ -51,11 +52,6 @@ const [Form, formApi] = useVbenForm({
.hyper-preview {
flex: 1;
}
.preview-title {
font-size: 13px;
color: hsl(var(--muted-foreground));
margin-bottom: 6px;
}
.preview-body {
background: hsl(var(--muted) / 0.6);
color: hsl(var(--foreground));
@@ -30,22 +30,20 @@ const layoutJson = () => JSON.stringify({ widgets: components.value.filter((c) =
<template>
<Page title="驾驶舱布局编排" description="PRD 5.7 · 组件清单排序 / 启用 / 导出布局 JSON">
<div class="layout-row">
<div class="col">
<div class="col-title">组件库(点击 ↑ ↓ 调整顺序)</div>
<a-list size="small" bordered>
<a-card title="组件库(点击 ↑ ↓ 调整顺序)" :bordered="false" class="col">
<a-list size="small" :bordered="false">
<a-list-item v-for="(c, i) in components" :key="i">
<a-checkbox v-model:checked="c.enabled" />
<span class="item-title">{{ c.title }}</span>
<a-button size="small" @click="move(i, -1)">↑</a-button>
<a-button size="small" style="margin-left: 4px" @click="move(i, 1)">↓</a-button>
<a-button size="small" class="ml-1" @click="move(i, 1)">↓</a-button>
</a-list-item>
</a-list>
</div>
<div class="col">
<div class="col-title">导出布局 JSON(由驾驶舱渲染)</div>
</a-card>
<a-card title="导出布局 JSON(由驾驶舱渲染)" :bordered="false" class="col">
<pre class="json-body">{{ layoutJson() }}</pre>
<VbenButton variant="solid"><MaterialSymbolsEdit class="size-4" />发布布局(版本发布见「版本发布」页)</VbenButton>
</div>
</a-card>
</div>
</Page>
</template>
@@ -59,11 +57,6 @@ const layoutJson = () => JSON.stringify({ widgets: components.value.filter((c) =
flex: 1;
min-width: 0;
}
.col-title {
font-size: 13px;
color: hsl(var(--muted-foreground));
margin-bottom: 6px;
}
.item-title {
flex: 1;
margin-left: 8px;