Update service.md

This commit is contained in:
liaoxuezhi 2020-08-25 18:14:07 +08:00 committed by GitHub
parent 84b5c48991
commit ac525935e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,6 +78,8 @@ order: 49
}
```
## 接口联动
Service 中的`api`和`schemaApi`都支持**接口联动**。
@ -168,4 +170,27 @@ Service 中的`api`和`schemaApi`都支持**接口联动**。
}
```
`schemaApi` 同样支持 []()
`schemaApi` 除了能返回表单项之外,还能同时返回表单数据,如果你这样返回接口
```json
{
"status": 0,
"msg": "",
"data": {
"data": {
"a": "b" // 这样返回的选项会选中第二个选项B
},
"controls": [
{
"type": "select",
"name": "a",
"label": "选项",
"options": [
{"label": "A", "value": "a"},
{"label": "B", "value": "b"}
]
}
]
}
}
```