|
@@ -61,10 +61,6 @@ export function useVariableTree(params: {
|
|
|
children = (type.properties || [])
|
|
children = (type.properties || [])
|
|
|
.map((_property) => renderVariable(_property as VariableField, [...parentFields, variable]))
|
|
.map((_property) => renderVariable(_property as VariableField, [...parentFields, variable]))
|
|
|
.filter(Boolean) as TreeNodeData[];
|
|
.filter(Boolean) as TreeNodeData[];
|
|
|
-
|
|
|
|
|
- if (!children?.length) {
|
|
|
|
|
- return null;
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const keyPath = [...parentFields.map((_field) => _field.key), variable.key];
|
|
const keyPath = [...parentFields.map((_field) => _field.key), variable.key];
|
|
@@ -76,6 +72,7 @@ export function useVariableTree(params: {
|
|
|
const isSchemaExclude = excludeSchema
|
|
const isSchemaExclude = excludeSchema
|
|
|
? JsonSchemaUtils.isASTMatchSchema(type, excludeSchema)
|
|
? JsonSchemaUtils.isASTMatchSchema(type, excludeSchema)
|
|
|
: false;
|
|
: false;
|
|
|
|
|
+
|
|
|
const isSchemaMatch = isSchemaInclude && !isSchemaExclude;
|
|
const isSchemaMatch = isSchemaInclude && !isSchemaExclude;
|
|
|
|
|
|
|
|
// If not match, and no children, return null
|
|
// If not match, and no children, return null
|