fix(接口定义): 修复接口定义case列表,点击编辑查看变更记录查看详情报错的缺陷

--bug=1010573 --user=王孝刚 【接口测试】-接口定义-case列表,点击编辑查看 变更记录,点击查看详情报错
https://www.tapd.cn/55049933/s/1109146
This commit is contained in:
wxg0103 2022-02-23 17:43:14 +08:00 committed by CountryBuilder
parent a580ce9387
commit 4960ab2c59

View File

@ -39,8 +39,8 @@
methods: {
getDiff(v1, v2) {
if (this.detail.columnName==='request' && v1 && v2){
let delta = jsondiffpatch.diff(JSON.parse(v1) , JSON.parse(v2));
return formattersHtml.format(delta, JSON.parse(v1));
let delta = jsondiffpatch.diff(JSON.parse(JSON.stringify(v1)), JSON.parse(JSON.stringify(v2)));
return formattersHtml.format(delta, JSON.parse(JSON.stringify(v1)));
}
let delta = jsondiffpatch.diff(v1 , v2);
return formattersHtml.format(delta, v1);