From b208847cc98778dab4185d80e51daa155c4491aa Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Wed, 22 Jul 2020 14:54:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=96=AD=E8=A8=80=E6=8F=8F=E8=BF=B0?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=8E=E4=B8=8D=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../test/components/assertion/ApiAssertionRegex.vue | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/frontend/src/business/components/api/test/components/assertion/ApiAssertionRegex.vue b/frontend/src/business/components/api/test/components/assertion/ApiAssertionRegex.vue index ddd19f0d28..1a1bcfa84a 100644 --- a/frontend/src/business/components/api/test/components/assertion/ApiAssertionRegex.vue +++ b/frontend/src/business/components/api/test/components/assertion/ApiAssertionRegex.vue @@ -53,6 +53,15 @@ } }, + watch: { + 'regex.subject'() { + this.setRegexDescription(); + }, + 'regex.expression'() { + this.setRegexDescription(); + } + }, + methods: { add: function () { this.list.push(this.getRegex()); @@ -65,6 +74,9 @@ let regex = new Regex(this.regex); regex.description = regex.subject + " has: " + regex.expression; return regex; + }, + setRegexDescription() { + this.regex.description = this.regex.subject + " has: " + this.regex.expression; } } }