From 627b884d8ceb0137c41a39ed19f7cda2d85b7faf Mon Sep 17 00:00:00 2001 From: WangXu10 Date: Fri, 7 Jul 2023 14:20:22 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E9=A1=B9=E7=9B=AE=E8=AE=BE=E7=BD=AE):=20?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E4=BB=A3=E7=A0=81=E7=89=87=E6=AE=B5?= =?UTF-8?q?=EF=BC=8C=E6=A0=87=E7=AD=BE=E8=BF=87=E9=95=BF=E5=AF=BC=E8=87=B4?= =?UTF-8?q?sql=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1027547 --user=王旭 【项目设置】github#25349-更多选项-自定义代码片段:标签字段输入字符数过长时点击确定提示提示sql error https://www.tapd.cn/55049933/s/1390363 --- framework/sdk-parent/frontend/src/components/MsInputTag.vue | 6 +++++- framework/sdk-parent/frontend/src/i18n/lang/en-US.js | 1 + framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js | 1 + framework/sdk-parent/frontend/src/i18n/lang/zh-TW.js | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/framework/sdk-parent/frontend/src/components/MsInputTag.vue b/framework/sdk-parent/frontend/src/components/MsInputTag.vue index ade0f5b5af..a6a4dd5eee 100644 --- a/framework/sdk-parent/frontend/src/components/MsInputTag.vue +++ b/framework/sdk-parent/frontend/src/components/MsInputTag.vue @@ -124,7 +124,11 @@ export default { addTag(tag) { tag = tag.trim() if (tag && !this.innerTags.includes(tag)) { - this.innerTags.push(tag) + if (tag.length > 15) { + this.$error(this.$t('commons.tag_length_tip')); + return false + } + this.innerTags.push(tag); return true } else { if (tag !== "" && this.errorInfo) { diff --git a/framework/sdk-parent/frontend/src/i18n/lang/en-US.js b/framework/sdk-parent/frontend/src/i18n/lang/en-US.js index bd6eed5054..5dc0df7f7c 100644 --- a/framework/sdk-parent/frontend/src/i18n/lang/en-US.js +++ b/framework/sdk-parent/frontend/src/i18n/lang/en-US.js @@ -389,6 +389,7 @@ const message = { }, image: "Image", tag: "Tag", + tag_length_tip: "The length of the tag cannot exceed 15 characters", append_tag: "Append Tag", append_tag_tip: "Checked: add a new label; unchecked: overwrite the original label;", diff --git a/framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js b/framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js index 7fa0d78341..78bed20804 100644 --- a/framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js +++ b/framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js @@ -382,6 +382,7 @@ const message = { }, image: "镜像", tag: "标签", + tag_length_tip: "标签长度不能超过15个字符", append_tag: "追加标签", append_tag_tip: "勾选:新增标签;不勾选:覆盖原有标签;", module: { diff --git a/framework/sdk-parent/frontend/src/i18n/lang/zh-TW.js b/framework/sdk-parent/frontend/src/i18n/lang/zh-TW.js index 5c3e3c6b77..f9e3ba55f0 100644 --- a/framework/sdk-parent/frontend/src/i18n/lang/zh-TW.js +++ b/framework/sdk-parent/frontend/src/i18n/lang/zh-TW.js @@ -383,6 +383,7 @@ const message = { image: "鏡像", tag: "標簽", append_tag: "追加標籤", + tag_length_tip: "標籤長度不能超過15個字符", append_tag_tip: "勾選:新增標籤;不勾選:覆蓋原有標籤;", module: { select_module: "選擇模塊",