feat(jsonPath): jsonPath组件升级

This commit is contained in:
baiqi 2024-10-15 11:44:51 +08:00 committed by Craftsman
parent be5a4e9881
commit 3a2789c154
2 changed files with 3 additions and 3 deletions

View File

@ -64,7 +64,7 @@
"html2canvas-pro": "^1.5.8",
"jsencrypt": "^3.3.2",
"json-schema-traverse": "^1.0.0",
"jsonpath-plus": "^8.1.0",
"jsonpath-plus": "^10.0.0",
"jspdf": "^2.5.1",
"jspdf-autotable": "^3.8.3",
"localforage": "^1.10.0",

View File

@ -295,11 +295,11 @@
}
return res;
});
} else if (typeof results === 'object') {
} else if (typeof results === 'object' && results !== null) {
traverseJSONObject(results);
matchResult.value = results;
} else {
matchResult.value = results === null ? `${results}` : results || [];
matchResult.value = results === null || results === false ? `${results}` : results || [];
}
} catch (error) {
matchResult.value = JSONPath({ json: props.response || '', path: expressionForm.value.expression }) || [];