From b88af68e1a4c0b465e5662f87cf2c6708df9bfb4 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Thu, 2 Jun 2022 15:41:40 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E7=94=A8=E4=BE=8B=E5=90=8D=E7=A7=B0=E8=B6=85?= =?UTF-8?q?=E5=87=BA=E9=99=90=E5=BA=A6=E5=90=8E=E5=8F=AF=E4=BB=A5=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E6=88=90=E5=8A=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1013750 --user=李玉号 【测试跟踪】标题长度为255字符,复制用例保存后,标题长度超过255 可以保存成功 https://www.tapd.cn/55049933/s/1172790 --- .../components/track/case/components/TestCaseBaseInfo.vue | 6 +++++- .../components/track/case/components/TestCaseEdit.vue | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/frontend/src/business/components/track/case/components/TestCaseBaseInfo.vue b/frontend/src/business/components/track/case/components/TestCaseBaseInfo.vue index ae6dd7da69..7759dfa1e6 100644 --- a/frontend/src/business/components/track/case/components/TestCaseBaseInfo.vue +++ b/frontend/src/business/components/track/case/components/TestCaseBaseInfo.vue @@ -14,7 +14,7 @@ v-model="form.name" size="small" class="ms-case-input" - maxlength="225" + maxlength="255" show-word-limit :disabled="readOnly"/> @@ -130,6 +130,10 @@ export default { isValidate = false; } }); + return isValidate; + }, + validateCustomForm() { + let isValidate = true; this.$refs['customFieldForm'].validate((valid) => { if (!valid) { isValidate = false; diff --git a/frontend/src/business/components/track/case/components/TestCaseEdit.vue b/frontend/src/business/components/track/case/components/TestCaseEdit.vue index 69cf29540a..be5aa8189d 100644 --- a/frontend/src/business/components/track/case/components/TestCaseEdit.vue +++ b/frontend/src/business/components/track/case/components/TestCaseEdit.vue @@ -1001,7 +1001,11 @@ export default { return false; } }); - let customValidate = this.$refs.testCaseBaseInfo.validateForm(); + let baseInfoValidate = this.$refs.testCaseBaseInfo.validateForm(); + if (!baseInfoValidate) { + return false; + } + let customValidate = this.$refs.testCaseBaseInfo.validateCustomForm(); if (!customValidate) { let customFieldFormFields = this.$refs.testCaseBaseInfo.getCustomFields(); for (let i = 0; i < customFieldFormFields.length; i++) {