docs: 补充 dimension.separator 字段说明
JSON 无法携带 JS 函数,dimension 类型需通过 separator 字段 让前端在运行时生成等价的 parse/format 逻辑。
This commit is contained in:
parent
3d5d356700
commit
ac7a592618
@ -128,6 +128,7 @@ GET /api/v1/models/:modelId/config
|
|||||||
"label": "尺寸",
|
"label": "尺寸",
|
||||||
"default": "1024*1024",
|
"default": "1024*1024",
|
||||||
"dimension": {
|
"dimension": {
|
||||||
|
"separator": "*",
|
||||||
"width": { "min": 256, "max": 6197 },
|
"width": { "min": 256, "max": 6197 },
|
||||||
"height": { "min": 256, "max": 4096 }
|
"height": { "min": 256, "max": 4096 }
|
||||||
}
|
}
|
||||||
@ -171,6 +172,8 @@ GET /api/v1/models/:modelId/config
|
|||||||
| `imageUpload` | `ImageUploader` | 参考图上传,`maxCount` 控制数量上限 |
|
| `imageUpload` | `ImageUploader` | 参考图上传,`maxCount` 控制数量上限 |
|
||||||
| `hidden` | 无 | 静默写入默认值,不渲染控件 |
|
| `hidden` | 无 | 静默写入默认值,不渲染控件 |
|
||||||
|
|
||||||
|
> **关于 `dimension.separator`:** 当前前端 Painting 配置中 `parse/format` 为 JS 函数(`s.split('*')` / `` `${w}*${h}` ``),后端返回 JSON 无法携带函数。因此 `dimension` 类型的配置需包含 `separator` 字段,前端据此在运行时生成等价的 parse/format 逻辑,无需硬编码分隔符。拆分模式(`dimensionWidth` + `dimensionHeight`)无此字段。
|
||||||
|
|
||||||
### 3.4 条件显示
|
### 3.4 条件显示
|
||||||
|
|
||||||
```json
|
```json
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user