fix(接口测试): 修复推荐提取数字显示精确度错误问题

--bug=1009465 --user=赵勇 [github#9090]JSONPath提取器数据精度丢失 https://www.tapd.cn/55049933/s/1090126
This commit is contained in:
fit2-zhao 2022-01-10 18:29:53 +08:00 committed by 刘瑞斌
parent 6e29f06940
commit fe3caea2d9
2 changed files with 108 additions and 106 deletions

View File

@ -130,6 +130,7 @@ export default {
this.fullTreeNodes = [];
this.failsTreeNodes = [];
this.isRequestResult = false;
this.activeName = "total";
},
handleClick(tab, event) {
this.isRequestResult = false;

View File

@ -28,11 +28,13 @@ const clickoutside = {
binding.value(e)
}
}
// 便unbind
el.__vueClickOutside__ = documentHandler
document.addEventListener('click', documentHandler)
},
update () { },
update() {
},
unbind(el, binding) {
//
document.removeEventListener('click', el.__vueClickOutside__)
@ -67,9 +69,8 @@ export default {
this.data = {};
try {
//
// let stringedJSON = objStr.replace(/:\s*([-+Ee0-9.]+)/g, ': "$1"');
//
let param = JSON.parse(objStr);
let JSONBig = require('json-bigint')({"storeAsString": true});
let param = JSON.parse(JSON.stringify(JSONBig.parse(objStr)));
if (param instanceof Array) {
this.$warning('不支持解析JSON数组');
return;