fix: 项目图片尺寸使用模型合法默认值

This commit is contained in:
GouJ committed 2026-09-25 20:17:17 +08:00
1 parent 66bbae3630
commit e5a65e514e
1 file changed
+4 -1
@@ -66,7 +66,10 @@ function defaultOptions(item: GenerationModelItem): GenerationOptions {
}
if ((schema.type === 'integer' || schema.type === 'number') && schema.min !== undefined)
return [[schema.key, schema.min]]
if (schema.type === 'size') return [[schema.key, 'auto']]
if (schema.type === 'size' && schema.options?.length) {
const first = schema.options[0]
return first ? [[schema.key, first.value]] : []
}
return []
})
)