@@ -207,6 +233,7 @@ onMounted(loadData)
'is-completed': currentStep > index,
}"
:aria-current="currentStep === index ? 'step' : undefined"
+ :aria-label="`${index + 1}. ${step.title}:${step.description}`"
>
@@ -224,48 +251,64 @@ onMounted(loadData)
-
-
+
+
+
+
-
+
@@ -305,7 +348,7 @@ onMounted(loadData)
display: flex;
align-items: center;
justify-content: space-between;
- max-width: 760px;
+ max-width: 1120px;
margin: 0 auto;
padding: 0 20px;
}
@@ -319,7 +362,7 @@ onMounted(loadData)
.step-connector {
flex: 1;
height: 2px;
- margin: 0 20px;
+ margin: 0 12px;
background: #e2e8f0;
transition: background-color 0.2s ease;
}
@@ -414,6 +457,12 @@ onMounted(loadData)
margin-left: 6px;
}
+@media (max-width: 1100px) {
+ .step-description {
+ display: none;
+ }
+}
+
@media (max-width: 760px) {
.wizard-main {
padding: 24px 20px;
@@ -424,10 +473,10 @@ onMounted(loadData)
}
.step-connector {
- margin: 0 10px;
+ margin: 0 8px;
}
- .step-description {
+ .step-text {
display: none;
}
diff --git a/frontend/src/views/eval/create/DimensionFormFields.vue b/frontend/src/views/eval/create/DimensionFormFields.vue
index 346f96b..eb06a23 100644
--- a/frontend/src/views/eval/create/DimensionFormFields.vue
+++ b/frontend/src/views/eval/create/DimensionFormFields.vue
@@ -21,19 +21,28 @@ export interface DimensionFormDraft {
pass_threshold: number
}
-withDefaults(
+const props = withDefaults(
defineProps<{
evalModels: ModelItem[]
showDescription?: boolean
+ showStatusSettings?: boolean
+ allowedTypes?: DimensionType[]
}>(),
{
showDescription: true,
+ showStatusSettings: true,
+ allowedTypes: () => ['classification', 'metric', 'text_similarity'],
},
)
const form = defineModel({ required: true })
+const SCORE_STEP = 0.5
-const typeOptions = Object.entries(DIMENSION_TYPE_MAP).map(([value, label]) => ({ value, label }))
+const typeOptions = computed(() =>
+ Object.entries(DIMENSION_TYPE_MAP)
+ .filter(([value]) => props.allowedTypes.includes(value as DimensionType))
+ .map(([value, label]) => ({ value, label })),
+)
const currentMethods = computed(() => (form.value.type ? EVAL_METHODS[form.value.type] || [] : []))
/**
@@ -65,6 +74,23 @@ watch(
},
{ flush: 'sync' },
)
+
+/** 始终保持评分区间合法,并把通过阈值收敛到当前区间内。 */
+watch(
+ () => [form.value.type, form.value.score_min, form.value.score_max] as const,
+ ([type, scoreMin, scoreMax]) => {
+ if (type !== 'metric') return
+ if (scoreMax <= scoreMin) {
+ form.value.score_max = scoreMin + SCORE_STEP
+ return
+ }
+ form.value.pass_threshold = Math.min(
+ Math.max(form.value.pass_threshold, scoreMin),
+ scoreMax,
+ )
+ },
+ { flush: 'sync' },
+)
@@ -134,13 +160,24 @@ watch(
-
-
+
+
-
-
+
+
-
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+