From ef9e4a0f68a1e3f1b44e8cf5af35f487566a7472 Mon Sep 17 00:00:00 2001 From: 670788339 <670788339@qq.com> Date: Wed, 5 Nov 2025 14:38:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A3=80=E6=9F=A5=E6=A0=87=E7=AD=BE=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E5=9C=A8=E4=B8=8B=E6=8B=89=E6=A1=86=E4=B8=AD=E5=B7=B2?= =?UTF-8?q?=E5=AD=98=E5=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Course/courseTag.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/Course/courseTag.vue b/src/components/Course/courseTag.vue index 4b64113c..b87ac90a 100644 --- a/src/components/Course/courseTag.vue +++ b/src/components/Course/courseTag.vue @@ -230,6 +230,12 @@ export default { this.$message.error('标签不能超过8个字') return; } + // 检查标签是否在下拉框中已存在 + const isExistInSearch = this.searchResults.some(tag => tag.tagName === tagName); + if (isExistInSearch) { + this.$message.warning('已存在此标签,请选择'); + return; + } // 首先检查是否与已选择的标签重复 const isDuplicate = this.selectedTags.some(tag => tag.tagName === tagName); if (isDuplicate) {