diff --git a/src/features/generation-config/components/GenerationModelControls.vue b/src/features/generation-config/components/GenerationModelControls.vue
index ed0f725..614b996 100644
--- a/src/features/generation-config/components/GenerationModelControls.vue
+++ b/src/features/generation-config/components/GenerationModelControls.vue
@@ -48,9 +48,19 @@ function updateOption(key: string, value: string | number | boolean | null) {
}
function choices(item: GenerationModelItem['generationOptions'][number]): SelectOption[] {
- return [...(item.options ?? []), ...(item.specialValues ?? [])]
+ const options = [...(item.options ?? []), ...(item.specialValues ?? [])]
.filter(option => typeof option.value === 'string' || typeof option.value === 'number')
.map(option => ({ label: option.label, value: option.value as string | number }))
+ if (
+ /duration|时长/i.test(`${item.key} ${item.label}`) &&
+ Number.isInteger(item.min) &&
+ Number.isInteger(item.max) &&
+ item.max! >= item.min! &&
+ item.max! - item.min! <= 60
+ ) {
+ for (let value = item.min!; value <= item.max!; value++) options.push({ label: `${value} 秒`, value })
+ }
+ return options
}
function selectValue(key: string): string | number | null {
@@ -88,6 +98,13 @@ function selectValue(key: string): string | number | null {
/>
{{ options[item.key] ? '已启用' : '未启用' }}
+