fix(接口定义): 修复断言复制没有复制禁用状态的缺陷

This commit is contained in:
wxg0103 2022-11-16 18:18:12 +08:00 committed by wxg0103
parent 80c1217fb9
commit 56e8e6ffca
2 changed files with 6 additions and 2 deletions

View File

@ -114,7 +114,9 @@ export default {
this.jsonPath.description = this.jsonPath.expression + " expect: " + (this.jsonPath.expect ? this.jsonPath.expect : ''); this.jsonPath.description = this.jsonPath.expression + " expect: " + (this.jsonPath.expect ? this.jsonPath.expect : '');
}, },
copyRow() { copyRow() {
this.list.splice(this.index + 1, 0, this.getJSONPath()); let jsonPath = new JSONPath(this.jsonPath);
jsonPath.description = jsonPath.expression + " expect: " + (jsonPath.expect ? jsonPath.expect : '');
this.list.splice(this.index + 1, 0, jsonPath);
} }
} }
} }

View File

@ -99,7 +99,9 @@ export default {
this.regex.description = this.regex.subject + " has: " + this.regex.expression; this.regex.description = this.regex.subject + " has: " + this.regex.expression;
}, },
copyRow() { copyRow() {
this.list.splice(this.index + 1, 0, this.getRegex()); let regex = new Regex(this.regex);
regex.description = regex.subject + " has: " + regex.expression;
this.list.splice(this.index + 1, 0, regex);
} }
} }
} }