forked from github/dataease
fix(API数据源): 没有子项的字段置灰
This commit is contained in:
parent
888ca2307b
commit
106958327e
@ -197,6 +197,14 @@ public class ApiProvider extends Provider {
|
||||
rootPath = "$";
|
||||
handleStr(apiDefinition, response, fields, rootPath);
|
||||
}
|
||||
for (JSONObject field : fields) {
|
||||
if(field.containsKey("children") && CollectionUtils.isNotEmpty(field.getJSONArray("children"))){
|
||||
field.put("disabled", false);
|
||||
}
|
||||
if(field.containsKey("children") && CollectionUtils.isEmpty(field.getJSONArray("children"))){
|
||||
field.put("disabled", true);
|
||||
}
|
||||
}
|
||||
apiDefinition.setJsonFields(fields);
|
||||
return apiDefinition;
|
||||
}
|
||||
|
@ -513,6 +513,7 @@
|
||||
<el-checkbox
|
||||
:key="scope.row.jsonPath"
|
||||
v-model="scope.row.checked"
|
||||
:disabled="scope.row.disabled"
|
||||
@change="handleCheckAllChange(scope.row)"
|
||||
>
|
||||
{{ scope.row.originName }}
|
||||
|
Loading…
Reference in New Issue
Block a user