refactor: 简化评测创建向导规则来源
移除已有维度/基线两种规则来源,评测创建仅保留新建维度流程并自动生成维度名称;维度名称字段回归独立创建页,表单校验改为返回精确布尔值并启用 scroll-to-error。
This commit is contained in:
@@ -22,7 +22,7 @@ const editId = computed(() => route.params.id as string | undefined)
|
||||
|
||||
const evalModels = ref<ModelItem[]>([])
|
||||
|
||||
const form = reactive<DimensionFormDraft>({
|
||||
const form = reactive<DimensionFormDraft & { name: string }>({
|
||||
name: '',
|
||||
type: '',
|
||||
description: '',
|
||||
@@ -140,6 +140,9 @@ onMounted(() => {
|
||||
<template>
|
||||
<PageCard :title="isEdit ? '编辑评测维度' : '添加评测维度'">
|
||||
<el-form ref="formRef" :model="form" :rules="rules" label-width="130px" style="max-width: 760px">
|
||||
<el-form-item label="维度名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入维度名称" maxlength="50" show-word-limit />
|
||||
</el-form-item>
|
||||
<DimensionFormFields v-model="form" :eval-models="evalModels" />
|
||||
|
||||
<el-form-item>
|
||||
|
||||
Reference in New Issue
Block a user