fix: 项目图片尺寸使用模型合法默认值
This commit is contained in:
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)
|
if ((schema.type === 'integer' || schema.type === 'number') && schema.min !== undefined)
|
||||||
return [[schema.key, schema.min]]
|
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 []
|
return []
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in new issue
Block a user